Debian Codegraph @

gkeonprem/v1/gkeonprem-gen.go

raw
1 // Copyright 2026 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 gkeonprem provides access to the GKE On-Prem API.
8 //
9 // For product documentation, see: https://cloud.google.com/anthos/clusters/docs/on-prem/
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/gkeonprem/v1"
27 // ...
28 // ctx := context.Background()
29 // gkeonpremService, err := gkeonprem.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 // gkeonpremService, err := gkeonprem.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 // gkeonpremService, err := gkeonprem.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
49 //
50 // See [google.golang.org/api/option.ClientOption] for details on options.
51 package gkeonprem // import "google.golang.org/api/gkeonprem/v1"
52
53 import (
54 "bytes"
55 "context"
56 "encoding/json"
57 "errors"
58 "fmt"
59 "io"
60 "log/slog"
61 "net/http"
62 "net/url"
63 "strconv"
64 "strings"
65
66 "github.com/googleapis/gax-go/v2/internallog"
67 googleapi "google.golang.org/api/googleapi"
68 internal "google.golang.org/api/internal"
69 gensupport "google.golang.org/api/internal/gensupport"
70 option "google.golang.org/api/option"
71 internaloption "google.golang.org/api/option/internaloption"
72 htransport "google.golang.org/api/transport/http"
73 )
74
75 // Always reference these packages, just in case the auto-generated code
76 // below doesn't.
77 var _ = bytes.NewBuffer
78 var _ = strconv.Itoa
79 var _ = fmt.Sprintf
80 var _ = json.NewDecoder
81 var _ = io.Copy
82 var _ = url.Parse
83 var _ = gensupport.MarshalJSON
84 var _ = googleapi.Version
85 var _ = errors.New
86 var _ = strings.Replace
87 var _ = context.Canceled
88 var _ = internaloption.WithDefaultEndpoint
89 var _ = internal.Version
90 var _ = internallog.New
91
92 const apiId = "gkeonprem:v1"
93 const apiName = "gkeonprem"
94 const apiVersion = "v1"
95 const basePath = "https://gkeonprem.googleapis.com/"
96 const basePathTemplate = "https://gkeonprem.UNIVERSE_DOMAIN/"
97 const mtlsBasePath = "https://gkeonprem.mtls.googleapis.com/"
98
99 // OAuth2 scopes used by this API.
100 const (
101 // See, edit, configure, and delete your Google Cloud data and see the email
102 // address for your Google Account.
103 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
104 )
105
106 // NewService creates a new Service.
107 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
108 scopesOption := internaloption.WithDefaultScopes(
109 "https://www.googleapis.com/auth/cloud-platform",
110 )
111 // NOTE: prepend, so we don't override user-specified scopes.
112 opts = append([]option.ClientOption{scopesOption}, opts...)
113 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
114 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
115 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
116 opts = append(opts, internaloption.EnableNewAuthLibrary())
117 client, endpoint, err := htransport.NewClient(ctx, opts...)
118 if err != nil {
119 return nil, err
120 }
121 s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)}
122 s.Projects = NewProjectsService(s)
123 if endpoint != "" {
124 s.BasePath = endpoint
125 }
126 return s, nil
127 }
128
129 // New creates a new Service. It uses the provided http.Client for requests.
130 //
131 // Deprecated: please use NewService instead.
132 // To provide a custom HTTP client, use option.WithHTTPClient.
133 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
134 func New(client *http.Client) (*Service, error) {
135 if client == nil {
136 return nil, errors.New("client is nil")
137 }
138 return NewService(context.TODO(), option.WithHTTPClient(client))
139 }
140
141 type Service struct {
142 client *http.Client
143 logger *slog.Logger
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.Locations = NewProjectsLocationsService(s)
160 return rs
161 }
162
163 type ProjectsService struct {
164 s *Service
165
166 Locations *ProjectsLocationsService
167 }
168
169 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
170 rs := &ProjectsLocationsService{s: s}
171 rs.BareMetalAdminClusters = NewProjectsLocationsBareMetalAdminClustersService(s)
172 rs.BareMetalClusters = NewProjectsLocationsBareMetalClustersService(s)
173 rs.Operations = NewProjectsLocationsOperationsService(s)
174 rs.VmwareAdminClusters = NewProjectsLocationsVmwareAdminClustersService(s)
175 rs.VmwareClusters = NewProjectsLocationsVmwareClustersService(s)
176 return rs
177 }
178
179 type ProjectsLocationsService struct {
180 s *Service
181
182 BareMetalAdminClusters *ProjectsLocationsBareMetalAdminClustersService
183
184 BareMetalClusters *ProjectsLocationsBareMetalClustersService
185
186 Operations *ProjectsLocationsOperationsService
187
188 VmwareAdminClusters *ProjectsLocationsVmwareAdminClustersService
189
190 VmwareClusters *ProjectsLocationsVmwareClustersService
191 }
192
193 func NewProjectsLocationsBareMetalAdminClustersService(s *Service) *ProjectsLocationsBareMetalAdminClustersService {
194 rs := &ProjectsLocationsBareMetalAdminClustersService{s: s}
195 rs.Operations = NewProjectsLocationsBareMetalAdminClustersOperationsService(s)
196 return rs
197 }
198
199 type ProjectsLocationsBareMetalAdminClustersService struct {
200 s *Service
201
202 Operations *ProjectsLocationsBareMetalAdminClustersOperationsService
203 }
204
205 func NewProjectsLocationsBareMetalAdminClustersOperationsService(s *Service) *ProjectsLocationsBareMetalAdminClustersOperationsService {
206 rs := &ProjectsLocationsBareMetalAdminClustersOperationsService{s: s}
207 return rs
208 }
209
210 type ProjectsLocationsBareMetalAdminClustersOperationsService struct {
211 s *Service
212 }
213
214 func NewProjectsLocationsBareMetalClustersService(s *Service) *ProjectsLocationsBareMetalClustersService {
215 rs := &ProjectsLocationsBareMetalClustersService{s: s}
216 rs.BareMetalNodePools = NewProjectsLocationsBareMetalClustersBareMetalNodePoolsService(s)
217 rs.Operations = NewProjectsLocationsBareMetalClustersOperationsService(s)
218 return rs
219 }
220
221 type ProjectsLocationsBareMetalClustersService struct {
222 s *Service
223
224 BareMetalNodePools *ProjectsLocationsBareMetalClustersBareMetalNodePoolsService
225
226 Operations *ProjectsLocationsBareMetalClustersOperationsService
227 }
228
229 func NewProjectsLocationsBareMetalClustersBareMetalNodePoolsService(s *Service) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsService {
230 rs := &ProjectsLocationsBareMetalClustersBareMetalNodePoolsService{s: s}
231 rs.Operations = NewProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsService(s)
232 return rs
233 }
234
235 type ProjectsLocationsBareMetalClustersBareMetalNodePoolsService struct {
236 s *Service
237
238 Operations *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsService
239 }
240
241 func NewProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsService(s *Service) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsService {
242 rs := &ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsService{s: s}
243 return rs
244 }
245
246 type ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsService struct {
247 s *Service
248 }
249
250 func NewProjectsLocationsBareMetalClustersOperationsService(s *Service) *ProjectsLocationsBareMetalClustersOperationsService {
251 rs := &ProjectsLocationsBareMetalClustersOperationsService{s: s}
252 return rs
253 }
254
255 type ProjectsLocationsBareMetalClustersOperationsService struct {
256 s *Service
257 }
258
259 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
260 rs := &ProjectsLocationsOperationsService{s: s}
261 return rs
262 }
263
264 type ProjectsLocationsOperationsService struct {
265 s *Service
266 }
267
268 func NewProjectsLocationsVmwareAdminClustersService(s *Service) *ProjectsLocationsVmwareAdminClustersService {
269 rs := &ProjectsLocationsVmwareAdminClustersService{s: s}
270 rs.Operations = NewProjectsLocationsVmwareAdminClustersOperationsService(s)
271 return rs
272 }
273
274 type ProjectsLocationsVmwareAdminClustersService struct {
275 s *Service
276
277 Operations *ProjectsLocationsVmwareAdminClustersOperationsService
278 }
279
280 func NewProjectsLocationsVmwareAdminClustersOperationsService(s *Service) *ProjectsLocationsVmwareAdminClustersOperationsService {
281 rs := &ProjectsLocationsVmwareAdminClustersOperationsService{s: s}
282 return rs
283 }
284
285 type ProjectsLocationsVmwareAdminClustersOperationsService struct {
286 s *Service
287 }
288
289 func NewProjectsLocationsVmwareClustersService(s *Service) *ProjectsLocationsVmwareClustersService {
290 rs := &ProjectsLocationsVmwareClustersService{s: s}
291 rs.Operations = NewProjectsLocationsVmwareClustersOperationsService(s)
292 rs.VmwareNodePools = NewProjectsLocationsVmwareClustersVmwareNodePoolsService(s)
293 return rs
294 }
295
296 type ProjectsLocationsVmwareClustersService struct {
297 s *Service
298
299 Operations *ProjectsLocationsVmwareClustersOperationsService
300
301 VmwareNodePools *ProjectsLocationsVmwareClustersVmwareNodePoolsService
302 }
303
304 func NewProjectsLocationsVmwareClustersOperationsService(s *Service) *ProjectsLocationsVmwareClustersOperationsService {
305 rs := &ProjectsLocationsVmwareClustersOperationsService{s: s}
306 return rs
307 }
308
309 type ProjectsLocationsVmwareClustersOperationsService struct {
310 s *Service
311 }
312
313 func NewProjectsLocationsVmwareClustersVmwareNodePoolsService(s *Service) *ProjectsLocationsVmwareClustersVmwareNodePoolsService {
314 rs := &ProjectsLocationsVmwareClustersVmwareNodePoolsService{s: s}
315 rs.Operations = NewProjectsLocationsVmwareClustersVmwareNodePoolsOperationsService(s)
316 return rs
317 }
318
319 type ProjectsLocationsVmwareClustersVmwareNodePoolsService struct {
320 s *Service
321
322 Operations *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsService
323 }
324
325 func NewProjectsLocationsVmwareClustersVmwareNodePoolsOperationsService(s *Service) *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsService {
326 rs := &ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsService{s: s}
327 return rs
328 }
329
330 type ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsService struct {
331 s *Service
332 }
333
334 // Authorization: Authorization defines the On-Prem cluster authorization
335 // configuration to bootstrap onto the admin cluster.
336 type Authorization struct {
337 // AdminUsers: For VMware and bare metal user clusters, users will be granted
338 // the cluster-admin role on the cluster, which provides full administrative
339 // access to the cluster. For bare metal admin clusters, users will be granted
340 // the cluster-view role, which limits users to read-only access.
341 AdminUsers []*ClusterUser `json:"adminUsers,omitempty"`
342 // ForceSendFields is a list of field names (e.g. "AdminUsers") to
343 // unconditionally include in API requests. By default, fields with empty or
344 // default values are omitted from API requests. See
345 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
346 // details.
347 ForceSendFields []string `json:"-"`
348 // NullFields is a list of field names (e.g. "AdminUsers") to include in API
349 // requests with the JSON null value. By default, fields with empty values are
350 // omitted from API requests. See
351 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
352 NullFields []string `json:"-"`
353 }
354
355 func (s Authorization) MarshalJSON() ([]byte, error) {
356 type NoMethod Authorization
357 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
358 }
359
360 // BareMetalAdminApiServerArgument: BareMetalAdminApiServerArgument represents
361 // an arg name->value pair. Only a subset of customized flags are supported.
362 // Please refer to the API server documentation below to know the exact format:
363 // https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/
364 type BareMetalAdminApiServerArgument struct {
365 // Argument: Required. The argument name as it appears on the API Server
366 // command line please make sure to remove the leading dashes.
367 Argument string `json:"argument,omitempty"`
368 // Value: Required. The value of the arg as it will be passed to the API Server
369 // command line.
370 Value string `json:"value,omitempty"`
371 // ForceSendFields is a list of field names (e.g. "Argument") to
372 // unconditionally include in API requests. By default, fields with empty or
373 // default values are omitted from API requests. See
374 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
375 // details.
376 ForceSendFields []string `json:"-"`
377 // NullFields is a list of field names (e.g. "Argument") to include in API
378 // requests with the JSON null value. By default, fields with empty values are
379 // omitted from API requests. See
380 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
381 NullFields []string `json:"-"`
382 }
383
384 func (s BareMetalAdminApiServerArgument) MarshalJSON() ([]byte, error) {
385 type NoMethod BareMetalAdminApiServerArgument
386 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
387 }
388
389 // BareMetalAdminBgpLbConfig: BareMetalAdminBgpLbConfig represents
390 // configuration parameters for a Border Gateway Protocol (BGP) load balancer.
391 type BareMetalAdminBgpLbConfig struct {
392 // AddressPools: Required. AddressPools is a list of non-overlapping IP pools
393 // used by load balancer typed services. All addresses must be routable to load
394 // balancer nodes. IngressVIP must be included in the pools.
395 AddressPools []*BareMetalAdminLoadBalancerAddressPool `json:"addressPools,omitempty"`
396 // Asn: Required. BGP autonomous system number (ASN) of the cluster. This field
397 // can be updated after cluster creation.
398 Asn int64 `json:"asn,omitempty,string"`
399 // BgpPeerConfigs: Required. The list of BGP peers that the cluster will
400 // connect to. At least one peer must be configured for each control plane
401 // node. Control plane nodes will connect to these peers to advertise the
402 // control plane VIP. The Services load balancer also uses these peers by
403 // default. This field can be updated after cluster creation.
404 BgpPeerConfigs []*BareMetalAdminBgpPeerConfig `json:"bgpPeerConfigs,omitempty"`
405 // LoadBalancerNodePoolConfig: Specifies the node pool running data plane load
406 // balancing. L2 connectivity is required among nodes in this pool. If missing,
407 // the control plane node pool is used for data plane load balancing.
408 LoadBalancerNodePoolConfig *BareMetalAdminLoadBalancerNodePoolConfig `json:"loadBalancerNodePoolConfig,omitempty"`
409 // ForceSendFields is a list of field names (e.g. "AddressPools") to
410 // unconditionally include in API requests. By default, fields with empty or
411 // default values are omitted from API requests. See
412 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
413 // details.
414 ForceSendFields []string `json:"-"`
415 // NullFields is a list of field names (e.g. "AddressPools") to include in API
416 // requests with the JSON null value. By default, fields with empty values are
417 // omitted from API requests. See
418 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
419 NullFields []string `json:"-"`
420 }
421
422 func (s BareMetalAdminBgpLbConfig) MarshalJSON() ([]byte, error) {
423 type NoMethod BareMetalAdminBgpLbConfig
424 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
425 }
426
427 // BareMetalAdminBgpPeerConfig: BareMetalAdminBgpPeerConfig represents
428 // configuration parameters for a Border Gateway Protocol (BGP) peer.
429 type BareMetalAdminBgpPeerConfig struct {
430 // Asn: Required. BGP autonomous system number (ASN) for the network that
431 // contains the external peer device.
432 Asn int64 `json:"asn,omitempty,string"`
433 // ControlPlaneNodes: The IP address of the control plane node that connects to
434 // the external peer. If you don't specify any control plane nodes, all control
435 // plane nodes can connect to the external peer. If you specify one or more IP
436 // addresses, only the nodes specified participate in peering sessions.
437 ControlPlaneNodes []string `json:"controlPlaneNodes,omitempty"`
438 // IpAddress: Required. The IP address of the external peer device.
439 IpAddress string `json:"ipAddress,omitempty"`
440 // ForceSendFields is a list of field names (e.g. "Asn") to unconditionally
441 // include in API requests. By default, fields with empty or default values are
442 // omitted from API requests. See
443 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
444 // details.
445 ForceSendFields []string `json:"-"`
446 // NullFields is a list of field names (e.g. "Asn") to include in API requests
447 // with the JSON null value. By default, fields with empty values are omitted
448 // from API requests. See
449 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
450 NullFields []string `json:"-"`
451 }
452
453 func (s BareMetalAdminBgpPeerConfig) MarshalJSON() ([]byte, error) {
454 type NoMethod BareMetalAdminBgpPeerConfig
455 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
456 }
457
458 // BareMetalAdminCluster: Resource that represents a bare metal admin cluster.
459 type BareMetalAdminCluster struct {
460 // Annotations: Annotations on the bare metal admin cluster. This field has the
461 // same restrictions as Kubernetes annotations. The total size of all keys and
462 // values combined is limited to 256k. Key can have 2 segments: prefix
463 // (optional) and name (required), separated by a slash (/). Prefix must be a
464 // DNS subdomain. Name must be 63 characters or less, begin and end with
465 // alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics
466 // between.
467 Annotations map[string]string `json:"annotations,omitempty"`
468 // BareMetalVersion: The Anthos clusters on bare metal version for the bare
469 // metal admin cluster.
470 BareMetalVersion string `json:"bareMetalVersion,omitempty"`
471 // BinaryAuthorization: Binary Authorization related configurations.
472 BinaryAuthorization *BinaryAuthorization `json:"binaryAuthorization,omitempty"`
473 // ClusterOperations: Cluster operations configuration.
474 ClusterOperations *BareMetalAdminClusterOperationsConfig `json:"clusterOperations,omitempty"`
475 // ControlPlane: Control plane configuration.
476 ControlPlane *BareMetalAdminControlPlaneConfig `json:"controlPlane,omitempty"`
477 // CreateTime: Output only. The time at which this bare metal admin cluster was
478 // created.
479 CreateTime string `json:"createTime,omitempty"`
480 // DeleteTime: Output only. The time at which this bare metal admin cluster was
481 // deleted. If the resource is not deleted, this must be empty
482 DeleteTime string `json:"deleteTime,omitempty"`
483 // Description: A human readable description of this bare metal admin cluster.
484 Description string `json:"description,omitempty"`
485 // Endpoint: Output only. The IP address name of bare metal admin cluster's API
486 // server.
487 Endpoint string `json:"endpoint,omitempty"`
488 // Etag: This checksum is computed by the server based on the value of other
489 // fields, and may be sent on update and delete requests to ensure the client
490 // has an up-to-date value before proceeding. Allows clients to perform
491 // consistent read-modify-writes through optimistic concurrency control.
492 Etag string `json:"etag,omitempty"`
493 // Fleet: Output only. Fleet configuration for the cluster.
494 Fleet *Fleet `json:"fleet,omitempty"`
495 // LoadBalancer: Load balancer configuration.
496 LoadBalancer *BareMetalAdminLoadBalancerConfig `json:"loadBalancer,omitempty"`
497 // LocalName: Output only. The object name of the bare metal cluster custom
498 // resource. This field is used to support conflicting names when enrolling
499 // existing clusters to the API. When used as a part of cluster enrollment,
500 // this field will differ from the ID in the resource name. For new clusters,
501 // this field will match the user provided cluster name and be visible in the
502 // last component of the resource name. It is not modifiable. All users should
503 // use this name to access their cluster using gkectl or kubectl and should
504 // expect to see the local name when viewing admin cluster controller logs.
505 LocalName string `json:"localName,omitempty"`
506 // MaintenanceConfig: Maintenance configuration.
507 MaintenanceConfig *BareMetalAdminMaintenanceConfig `json:"maintenanceConfig,omitempty"`
508 // MaintenanceStatus: Output only. MaintenanceStatus representing state of
509 // maintenance.
510 MaintenanceStatus *BareMetalAdminMaintenanceStatus `json:"maintenanceStatus,omitempty"`
511 // Name: Immutable. The bare metal admin cluster resource name.
512 Name string `json:"name,omitempty"`
513 // NetworkConfig: Network configuration.
514 NetworkConfig *BareMetalAdminNetworkConfig `json:"networkConfig,omitempty"`
515 // NodeAccessConfig: Node access related configurations.
516 NodeAccessConfig *BareMetalAdminNodeAccessConfig `json:"nodeAccessConfig,omitempty"`
517 // NodeConfig: Workload node configuration.
518 NodeConfig *BareMetalAdminWorkloadNodeConfig `json:"nodeConfig,omitempty"`
519 // OsEnvironmentConfig: OS environment related configurations.
520 OsEnvironmentConfig *BareMetalAdminOsEnvironmentConfig `json:"osEnvironmentConfig,omitempty"`
521 // Proxy: Proxy configuration.
522 Proxy *BareMetalAdminProxyConfig `json:"proxy,omitempty"`
523 // Reconciling: Output only. If set, there are currently changes in flight to
524 // the bare metal Admin Cluster.
525 Reconciling bool `json:"reconciling,omitempty"`
526 // SecurityConfig: Security related configuration.
527 SecurityConfig *BareMetalAdminSecurityConfig `json:"securityConfig,omitempty"`
528 // State: Output only. The current state of the bare metal admin cluster.
529 //
530 // Possible values:
531 // "STATE_UNSPECIFIED" - Not set.
532 // "PROVISIONING" - The PROVISIONING state indicates the cluster is being
533 // created.
534 // "RUNNING" - The RUNNING state indicates the cluster has been created and
535 // is fully usable.
536 // "RECONCILING" - The RECONCILING state indicates that the cluster is being
537 // updated. It remains available, but potentially with degraded performance.
538 // "STOPPING" - The STOPPING state indicates the cluster is being deleted.
539 // "ERROR" - The ERROR state indicates the cluster is in a broken
540 // unrecoverable state.
541 // "DEGRADED" - The DEGRADED state indicates the cluster requires user action
542 // to restore full functionality.
543 State string `json:"state,omitempty"`
544 // Status: Output only. ResourceStatus representing detailed cluster status.
545 Status *ResourceStatus `json:"status,omitempty"`
546 // Storage: Storage configuration.
547 Storage *BareMetalAdminStorageConfig `json:"storage,omitempty"`
548 // Uid: Output only. The unique identifier of the bare metal admin cluster.
549 Uid string `json:"uid,omitempty"`
550 // UpdateTime: Output only. The time at which this bare metal admin cluster was
551 // last updated.
552 UpdateTime string `json:"updateTime,omitempty"`
553 // ValidationCheck: Output only. ValidationCheck representing the result of the
554 // preflight check.
555 ValidationCheck *ValidationCheck `json:"validationCheck,omitempty"`
556
557 // ServerResponse contains the HTTP response code and headers from the server.
558 googleapi.ServerResponse `json:"-"`
559 // ForceSendFields is a list of field names (e.g. "Annotations") to
560 // unconditionally include in API requests. By default, fields with empty or
561 // default values are omitted from API requests. See
562 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
563 // details.
564 ForceSendFields []string `json:"-"`
565 // NullFields is a list of field names (e.g. "Annotations") to include in API
566 // requests with the JSON null value. By default, fields with empty values are
567 // omitted from API requests. See
568 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
569 NullFields []string `json:"-"`
570 }
571
572 func (s BareMetalAdminCluster) MarshalJSON() ([]byte, error) {
573 type NoMethod BareMetalAdminCluster
574 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
575 }
576
577 // BareMetalAdminClusterOperationsConfig: BareMetalAdminClusterOperationsConfig
578 // specifies the admin cluster's observability infrastructure.
579 type BareMetalAdminClusterOperationsConfig struct {
580 // EnableApplicationLogs: Whether collection of application logs/metrics should
581 // be enabled (in addition to system logs/metrics).
582 EnableApplicationLogs bool `json:"enableApplicationLogs,omitempty"`
583 // ForceSendFields is a list of field names (e.g. "EnableApplicationLogs") to
584 // unconditionally include in API requests. By default, fields with empty or
585 // default values are omitted from API requests. See
586 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
587 // details.
588 ForceSendFields []string `json:"-"`
589 // NullFields is a list of field names (e.g. "EnableApplicationLogs") to
590 // include in API requests with the JSON null value. By default, fields with
591 // empty values are omitted from API requests. See
592 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
593 NullFields []string `json:"-"`
594 }
595
596 func (s BareMetalAdminClusterOperationsConfig) MarshalJSON() ([]byte, error) {
597 type NoMethod BareMetalAdminClusterOperationsConfig
598 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
599 }
600
601 // BareMetalAdminControlPlaneConfig: BareMetalAdminControlPlaneConfig specifies
602 // the control plane configuration.
603 type BareMetalAdminControlPlaneConfig struct {
604 // ApiServerArgs: Customizes the default API server args. Only a subset of
605 // customized flags are supported. Please refer to the API server documentation
606 // below to know the exact format:
607 // https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/
608 ApiServerArgs []*BareMetalAdminApiServerArgument `json:"apiServerArgs,omitempty"`
609 // ControlPlaneNodePoolConfig: Required. Configures the node pool running the
610 // control plane. If specified the corresponding NodePool will be created for
611 // the cluster's control plane. The NodePool will have the same name and
612 // namespace as the cluster.
613 ControlPlaneNodePoolConfig *BareMetalAdminControlPlaneNodePoolConfig `json:"controlPlaneNodePoolConfig,omitempty"`
614 // ForceSendFields is a list of field names (e.g. "ApiServerArgs") to
615 // unconditionally include in API requests. By default, fields with empty or
616 // default values are omitted from API requests. See
617 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
618 // details.
619 ForceSendFields []string `json:"-"`
620 // NullFields is a list of field names (e.g. "ApiServerArgs") to include in API
621 // requests with the JSON null value. By default, fields with empty values are
622 // omitted from API requests. See
623 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
624 NullFields []string `json:"-"`
625 }
626
627 func (s BareMetalAdminControlPlaneConfig) MarshalJSON() ([]byte, error) {
628 type NoMethod BareMetalAdminControlPlaneConfig
629 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
630 }
631
632 // BareMetalAdminControlPlaneNodePoolConfig:
633 // BareMetalAdminControlPlaneNodePoolConfig specifies the control plane node
634 // pool configuration. We have a control plane specific node pool config so
635 // that we can flexible about supporting control plane specific fields in the
636 // future.
637 type BareMetalAdminControlPlaneNodePoolConfig struct {
638 // NodePoolConfig: Required. The generic configuration for a node pool running
639 // the control plane.
640 NodePoolConfig *BareMetalNodePoolConfig `json:"nodePoolConfig,omitempty"`
641 // ForceSendFields is a list of field names (e.g. "NodePoolConfig") to
642 // unconditionally include in API requests. By default, fields with empty or
643 // default values are omitted from API requests. See
644 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
645 // details.
646 ForceSendFields []string `json:"-"`
647 // NullFields is a list of field names (e.g. "NodePoolConfig") to include in
648 // API requests with the JSON null value. By default, fields with empty values
649 // are omitted from API requests. See
650 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
651 NullFields []string `json:"-"`
652 }
653
654 func (s BareMetalAdminControlPlaneNodePoolConfig) MarshalJSON() ([]byte, error) {
655 type NoMethod BareMetalAdminControlPlaneNodePoolConfig
656 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
657 }
658
659 // BareMetalAdminDrainedMachine: BareMetalAdminDrainedMachine represents the
660 // machines that are drained.
661 type BareMetalAdminDrainedMachine struct {
662 // NodeIp: Drained machine IP address.
663 NodeIp string `json:"nodeIp,omitempty"`
664 // ForceSendFields is a list of field names (e.g. "NodeIp") to unconditionally
665 // include in API requests. By default, fields with empty or default values are
666 // omitted from API requests. See
667 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
668 // details.
669 ForceSendFields []string `json:"-"`
670 // NullFields is a list of field names (e.g. "NodeIp") to include in API
671 // requests with the JSON null value. By default, fields with empty values are
672 // omitted from API requests. See
673 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
674 NullFields []string `json:"-"`
675 }
676
677 func (s BareMetalAdminDrainedMachine) MarshalJSON() ([]byte, error) {
678 type NoMethod BareMetalAdminDrainedMachine
679 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
680 }
681
682 // BareMetalAdminDrainingMachine: BareMetalAdminDrainingMachine represents the
683 // machines that are currently draining.
684 type BareMetalAdminDrainingMachine struct {
685 // NodeIp: Draining machine IP address.
686 NodeIp string `json:"nodeIp,omitempty"`
687 // PodCount: The count of pods yet to drain.
688 PodCount int64 `json:"podCount,omitempty"`
689 // ForceSendFields is a list of field names (e.g. "NodeIp") to unconditionally
690 // include in API requests. By default, fields with empty or default values are
691 // omitted from API requests. See
692 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
693 // details.
694 ForceSendFields []string `json:"-"`
695 // NullFields is a list of field names (e.g. "NodeIp") to include in API
696 // requests with the JSON null value. By default, fields with empty values are
697 // omitted from API requests. See
698 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
699 NullFields []string `json:"-"`
700 }
701
702 func (s BareMetalAdminDrainingMachine) MarshalJSON() ([]byte, error) {
703 type NoMethod BareMetalAdminDrainingMachine
704 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
705 }
706
707 // BareMetalAdminIslandModeCidrConfig: BareMetalAdminIslandModeCidrConfig
708 // specifies the cluster CIDR configuration while running in island mode.
709 type BareMetalAdminIslandModeCidrConfig struct {
710 // PodAddressCidrBlocks: Required. All pods in the cluster are assigned an
711 // RFC1918 IPv4 address from these ranges. This field cannot be changed after
712 // creation.
713 PodAddressCidrBlocks []string `json:"podAddressCidrBlocks,omitempty"`
714 // ServiceAddressCidrBlocks: Required. All services in the cluster are assigned
715 // an RFC1918 IPv4 address from these ranges. This field cannot be changed
716 // after creation.
717 ServiceAddressCidrBlocks []string `json:"serviceAddressCidrBlocks,omitempty"`
718 // ForceSendFields is a list of field names (e.g. "PodAddressCidrBlocks") to
719 // unconditionally include in API requests. By default, fields with empty or
720 // default values are omitted from API requests. See
721 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
722 // details.
723 ForceSendFields []string `json:"-"`
724 // NullFields is a list of field names (e.g. "PodAddressCidrBlocks") to include
725 // in API requests with the JSON null value. By default, fields with empty
726 // values are omitted from API requests. See
727 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
728 NullFields []string `json:"-"`
729 }
730
731 func (s BareMetalAdminIslandModeCidrConfig) MarshalJSON() ([]byte, error) {
732 type NoMethod BareMetalAdminIslandModeCidrConfig
733 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
734 }
735
736 // BareMetalAdminLoadBalancerAddressPool: Represents an IP pool used by the
737 // load balancer.
738 type BareMetalAdminLoadBalancerAddressPool struct {
739 // Addresses: Required. The addresses that are part of this pool. Each address
740 // must be either in the CIDR form (1.2.3.0/24) or range form
741 // (1.2.3.1-1.2.3.5).
742 Addresses []string `json:"addresses,omitempty"`
743 // AvoidBuggyIps: If true, avoid using IPs ending in .0 or .255. This avoids
744 // buggy consumer devices mistakenly dropping IPv4 traffic for those special IP
745 // addresses.
746 AvoidBuggyIps bool `json:"avoidBuggyIps,omitempty"`
747 // ManualAssign: If true, prevent IP addresses from being automatically
748 // assigned.
749 ManualAssign bool `json:"manualAssign,omitempty"`
750 // Pool: Required. The name of the address pool.
751 Pool string `json:"pool,omitempty"`
752 // ForceSendFields is a list of field names (e.g. "Addresses") to
753 // unconditionally include in API requests. By default, fields with empty or
754 // default values are omitted from API requests. See
755 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
756 // details.
757 ForceSendFields []string `json:"-"`
758 // NullFields is a list of field names (e.g. "Addresses") to include in API
759 // requests with the JSON null value. By default, fields with empty values are
760 // omitted from API requests. See
761 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
762 NullFields []string `json:"-"`
763 }
764
765 func (s BareMetalAdminLoadBalancerAddressPool) MarshalJSON() ([]byte, error) {
766 type NoMethod BareMetalAdminLoadBalancerAddressPool
767 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
768 }
769
770 // BareMetalAdminLoadBalancerConfig: BareMetalAdminLoadBalancerConfig specifies
771 // the load balancer configuration.
772 type BareMetalAdminLoadBalancerConfig struct {
773 // BgpLbConfig: Configuration for BGP typed load balancers.
774 BgpLbConfig *BareMetalAdminBgpLbConfig `json:"bgpLbConfig,omitempty"`
775 // ManualLbConfig: Manually configured load balancers.
776 ManualLbConfig *BareMetalAdminManualLbConfig `json:"manualLbConfig,omitempty"`
777 // PortConfig: Configures the ports that the load balancer will listen on.
778 PortConfig *BareMetalAdminPortConfig `json:"portConfig,omitempty"`
779 // VipConfig: The VIPs used by the load balancer.
780 VipConfig *BareMetalAdminVipConfig `json:"vipConfig,omitempty"`
781 // ForceSendFields is a list of field names (e.g. "BgpLbConfig") to
782 // unconditionally include in API requests. By default, fields with empty or
783 // default values are omitted from API requests. See
784 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
785 // details.
786 ForceSendFields []string `json:"-"`
787 // NullFields is a list of field names (e.g. "BgpLbConfig") to include in API
788 // requests with the JSON null value. By default, fields with empty values are
789 // omitted from API requests. See
790 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
791 NullFields []string `json:"-"`
792 }
793
794 func (s BareMetalAdminLoadBalancerConfig) MarshalJSON() ([]byte, error) {
795 type NoMethod BareMetalAdminLoadBalancerConfig
796 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
797 }
798
799 // BareMetalAdminLoadBalancerNodePoolConfig: Specifies the load balancer's node
800 // pool configuration.
801 type BareMetalAdminLoadBalancerNodePoolConfig struct {
802 // NodePoolConfig: The generic configuration for a node pool running a load
803 // balancer.
804 NodePoolConfig *BareMetalNodePoolConfig `json:"nodePoolConfig,omitempty"`
805 // ForceSendFields is a list of field names (e.g. "NodePoolConfig") to
806 // unconditionally include in API requests. By default, fields with empty or
807 // default values are omitted from API requests. See
808 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
809 // details.
810 ForceSendFields []string `json:"-"`
811 // NullFields is a list of field names (e.g. "NodePoolConfig") to include in
812 // API requests with the JSON null value. By default, fields with empty values
813 // are omitted from API requests. See
814 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
815 NullFields []string `json:"-"`
816 }
817
818 func (s BareMetalAdminLoadBalancerNodePoolConfig) MarshalJSON() ([]byte, error) {
819 type NoMethod BareMetalAdminLoadBalancerNodePoolConfig
820 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
821 }
822
823 // BareMetalAdminMachineDrainStatus: BareMetalAdminMachineDrainStatus
824 // represents the status of bare metal node machines that are undergoing drain
825 // operations.
826 type BareMetalAdminMachineDrainStatus struct {
827 // DrainedMachines: The list of drained machines.
828 DrainedMachines []*BareMetalAdminDrainedMachine `json:"drainedMachines,omitempty"`
829 // DrainingMachines: The list of draning machines.
830 DrainingMachines []*BareMetalAdminDrainingMachine `json:"drainingMachines,omitempty"`
831 // ForceSendFields is a list of field names (e.g. "DrainedMachines") to
832 // unconditionally include in API requests. By default, fields with empty or
833 // default values are omitted from API requests. See
834 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
835 // details.
836 ForceSendFields []string `json:"-"`
837 // NullFields is a list of field names (e.g. "DrainedMachines") to include in
838 // API requests with the JSON null value. By default, fields with empty values
839 // are omitted from API requests. See
840 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
841 NullFields []string `json:"-"`
842 }
843
844 func (s BareMetalAdminMachineDrainStatus) MarshalJSON() ([]byte, error) {
845 type NoMethod BareMetalAdminMachineDrainStatus
846 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
847 }
848
849 // BareMetalAdminMaintenanceConfig: BareMetalAdminMaintenanceConfig specifies
850 // configurations to put bare metal Admin cluster CRs nodes in and out of
851 // maintenance.
852 type BareMetalAdminMaintenanceConfig struct {
853 // MaintenanceAddressCidrBlocks: Required. All IPv4 address from these ranges
854 // will be placed into maintenance mode. Nodes in maintenance mode will be
855 // cordoned and drained. When both of these are true, the
856 // "baremetal.cluster.gke.io/maintenance" annotation will be set on the node
857 // resource.
858 MaintenanceAddressCidrBlocks []string `json:"maintenanceAddressCidrBlocks,omitempty"`
859 // ForceSendFields is a list of field names (e.g.
860 // "MaintenanceAddressCidrBlocks") to unconditionally include in API requests.
861 // By default, fields with empty or default values are omitted from API
862 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
863 // for more details.
864 ForceSendFields []string `json:"-"`
865 // NullFields is a list of field names (e.g. "MaintenanceAddressCidrBlocks") to
866 // include in API requests with the JSON null value. By default, fields with
867 // empty values are omitted from API requests. See
868 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
869 NullFields []string `json:"-"`
870 }
871
872 func (s BareMetalAdminMaintenanceConfig) MarshalJSON() ([]byte, error) {
873 type NoMethod BareMetalAdminMaintenanceConfig
874 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
875 }
876
877 // BareMetalAdminMaintenanceStatus: BareMetalAdminMaintenanceStatus represents
878 // the maintenance status for bare metal Admin cluster CR's nodes.
879 type BareMetalAdminMaintenanceStatus struct {
880 // MachineDrainStatus: Represents the status of draining and drained machine
881 // nodes. This is used to show the progress of cluster upgrade.
882 MachineDrainStatus *BareMetalAdminMachineDrainStatus `json:"machineDrainStatus,omitempty"`
883 // ForceSendFields is a list of field names (e.g. "MachineDrainStatus") to
884 // unconditionally include in API requests. By default, fields with empty or
885 // default values are omitted from API requests. See
886 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
887 // details.
888 ForceSendFields []string `json:"-"`
889 // NullFields is a list of field names (e.g. "MachineDrainStatus") to include
890 // in API requests with the JSON null value. By default, fields with empty
891 // values are omitted from API requests. See
892 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
893 NullFields []string `json:"-"`
894 }
895
896 func (s BareMetalAdminMaintenanceStatus) MarshalJSON() ([]byte, error) {
897 type NoMethod BareMetalAdminMaintenanceStatus
898 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
899 }
900
901 // BareMetalAdminManualLbConfig: BareMetalAdminManualLbConfig represents
902 // configuration parameters for a manual load balancer.
903 type BareMetalAdminManualLbConfig struct {
904 // Enabled: Whether manual load balancing is enabled.
905 Enabled bool `json:"enabled,omitempty"`
906 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
907 // include in API requests. By default, fields with empty or default values are
908 // omitted from API requests. See
909 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
910 // details.
911 ForceSendFields []string `json:"-"`
912 // NullFields is a list of field names (e.g. "Enabled") to include in API
913 // requests with the JSON null value. By default, fields with empty values are
914 // omitted from API requests. See
915 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
916 NullFields []string `json:"-"`
917 }
918
919 func (s BareMetalAdminManualLbConfig) MarshalJSON() ([]byte, error) {
920 type NoMethod BareMetalAdminManualLbConfig
921 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
922 }
923
924 // BareMetalAdminMultipleNetworkInterfacesConfig: Specifies the multiple
925 // networking interfaces cluster configuration.
926 type BareMetalAdminMultipleNetworkInterfacesConfig struct {
927 // Enabled: Whether to enable multiple network interfaces for your pods. When
928 // set network_config.advanced_networking is automatically set to true.
929 Enabled bool `json:"enabled,omitempty"`
930 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
931 // include in API requests. By default, fields with empty or default values are
932 // omitted from API requests. See
933 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
934 // details.
935 ForceSendFields []string `json:"-"`
936 // NullFields is a list of field names (e.g. "Enabled") to include in API
937 // requests with the JSON null value. By default, fields with empty values are
938 // omitted from API requests. See
939 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
940 NullFields []string `json:"-"`
941 }
942
943 func (s BareMetalAdminMultipleNetworkInterfacesConfig) MarshalJSON() ([]byte, error) {
944 type NoMethod BareMetalAdminMultipleNetworkInterfacesConfig
945 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
946 }
947
948 // BareMetalAdminNetworkConfig: BareMetalAdminNetworkConfig specifies the
949 // cluster network configuration.
950 type BareMetalAdminNetworkConfig struct {
951 // AdvancedNetworking: Enables the use of advanced Anthos networking features,
952 // such as Bundled Load Balancing with BGP or the egress NAT gateway. Setting
953 // configuration for advanced networking features will automatically set this
954 // flag.
955 AdvancedNetworking bool `json:"advancedNetworking,omitempty"`
956 // IslandModeCidr: Configuration for Island mode CIDR.
957 IslandModeCidr *BareMetalAdminIslandModeCidrConfig `json:"islandModeCidr,omitempty"`
958 // MultipleNetworkInterfacesConfig: Configuration for multiple network
959 // interfaces.
960 MultipleNetworkInterfacesConfig *BareMetalAdminMultipleNetworkInterfacesConfig `json:"multipleNetworkInterfacesConfig,omitempty"`
961 // ForceSendFields is a list of field names (e.g. "AdvancedNetworking") to
962 // unconditionally include in API requests. By default, fields with empty or
963 // default values are omitted from API requests. See
964 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
965 // details.
966 ForceSendFields []string `json:"-"`
967 // NullFields is a list of field names (e.g. "AdvancedNetworking") to include
968 // in API requests with the JSON null value. By default, fields with empty
969 // values are omitted from API requests. See
970 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
971 NullFields []string `json:"-"`
972 }
973
974 func (s BareMetalAdminNetworkConfig) MarshalJSON() ([]byte, error) {
975 type NoMethod BareMetalAdminNetworkConfig
976 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
977 }
978
979 // BareMetalAdminNodeAccessConfig: Specifies the node access related settings
980 // for the bare metal admin cluster.
981 type BareMetalAdminNodeAccessConfig struct {
982 // LoginUser: Required. LoginUser is the user name used to access node
983 // machines. It defaults to "root" if not set.
984 LoginUser string `json:"loginUser,omitempty"`
985 // ForceSendFields is a list of field names (e.g. "LoginUser") to
986 // unconditionally include in API requests. By default, fields with empty or
987 // default values are omitted from API requests. See
988 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
989 // details.
990 ForceSendFields []string `json:"-"`
991 // NullFields is a list of field names (e.g. "LoginUser") to include in API
992 // requests with the JSON null value. By default, fields with empty values are
993 // omitted from API requests. See
994 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
995 NullFields []string `json:"-"`
996 }
997
998 func (s BareMetalAdminNodeAccessConfig) MarshalJSON() ([]byte, error) {
999 type NoMethod BareMetalAdminNodeAccessConfig
1000 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1001 }
1002
1003 // BareMetalAdminOsEnvironmentConfig: Specifies operating system operation
1004 // settings for cluster provisioning.
1005 type BareMetalAdminOsEnvironmentConfig struct {
1006 // PackageRepoExcluded: Whether the package repo should be added when
1007 // initializing bare metal machines.
1008 PackageRepoExcluded bool `json:"packageRepoExcluded,omitempty"`
1009 // ForceSendFields is a list of field names (e.g. "PackageRepoExcluded") to
1010 // unconditionally include in API requests. By default, fields with empty or
1011 // default values are omitted from API requests. See
1012 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1013 // details.
1014 ForceSendFields []string `json:"-"`
1015 // NullFields is a list of field names (e.g. "PackageRepoExcluded") to include
1016 // in API requests with the JSON null value. By default, fields with empty
1017 // values are omitted from API requests. See
1018 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1019 NullFields []string `json:"-"`
1020 }
1021
1022 func (s BareMetalAdminOsEnvironmentConfig) MarshalJSON() ([]byte, error) {
1023 type NoMethod BareMetalAdminOsEnvironmentConfig
1024 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1025 }
1026
1027 // BareMetalAdminPortConfig: BareMetalAdminPortConfig is the specification of
1028 // load balancer ports.
1029 type BareMetalAdminPortConfig struct {
1030 // ControlPlaneLoadBalancerPort: The port that control plane hosted load
1031 // balancers will listen on.
1032 ControlPlaneLoadBalancerPort int64 `json:"controlPlaneLoadBalancerPort,omitempty"`
1033 // ForceSendFields is a list of field names (e.g.
1034 // "ControlPlaneLoadBalancerPort") to unconditionally include in API requests.
1035 // By default, fields with empty or default values are omitted from API
1036 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
1037 // for more details.
1038 ForceSendFields []string `json:"-"`
1039 // NullFields is a list of field names (e.g. "ControlPlaneLoadBalancerPort") to
1040 // include in API requests with the JSON null value. By default, fields with
1041 // empty values are omitted from API requests. See
1042 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1043 NullFields []string `json:"-"`
1044 }
1045
1046 func (s BareMetalAdminPortConfig) MarshalJSON() ([]byte, error) {
1047 type NoMethod BareMetalAdminPortConfig
1048 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1049 }
1050
1051 // BareMetalAdminProxyConfig: BareMetalAdminProxyConfig specifies the cluster
1052 // proxy configuration.
1053 type BareMetalAdminProxyConfig struct {
1054 // NoProxy: A list of IPs, hostnames, and domains that should skip the proxy.
1055 // Examples: ["127.0.0.1", "example.com", ".corp", "localhost"].
1056 NoProxy []string `json:"noProxy,omitempty"`
1057 // Uri: Required. Specifies the address of your proxy server. Examples:
1058 // `http://domain` WARNING: Do not provide credentials in the format
1059 // `http://(username:password@)domain` these will be rejected by the server.
1060 Uri string `json:"uri,omitempty"`
1061 // ForceSendFields is a list of field names (e.g. "NoProxy") to unconditionally
1062 // include in API requests. By default, fields with empty or default values are
1063 // omitted from API requests. See
1064 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1065 // details.
1066 ForceSendFields []string `json:"-"`
1067 // NullFields is a list of field names (e.g. "NoProxy") to include in API
1068 // requests with the JSON null value. By default, fields with empty values are
1069 // omitted from API requests. See
1070 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1071 NullFields []string `json:"-"`
1072 }
1073
1074 func (s BareMetalAdminProxyConfig) MarshalJSON() ([]byte, error) {
1075 type NoMethod BareMetalAdminProxyConfig
1076 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1077 }
1078
1079 // BareMetalAdminSecurityConfig: Specifies the security related settings for
1080 // the bare metal admin cluster.
1081 type BareMetalAdminSecurityConfig struct {
1082 // Authorization: Configures user access to the admin cluster.
1083 Authorization *Authorization `json:"authorization,omitempty"`
1084 // ForceSendFields is a list of field names (e.g. "Authorization") to
1085 // unconditionally include in API requests. By default, fields with empty or
1086 // default values are omitted from API requests. See
1087 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1088 // details.
1089 ForceSendFields []string `json:"-"`
1090 // NullFields is a list of field names (e.g. "Authorization") to include in API
1091 // requests with the JSON null value. By default, fields with empty values are
1092 // omitted from API requests. See
1093 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1094 NullFields []string `json:"-"`
1095 }
1096
1097 func (s BareMetalAdminSecurityConfig) MarshalJSON() ([]byte, error) {
1098 type NoMethod BareMetalAdminSecurityConfig
1099 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1100 }
1101
1102 // BareMetalAdminStorageConfig: BareMetalAdminStorageConfig specifies the
1103 // cluster storage configuration.
1104 type BareMetalAdminStorageConfig struct {
1105 // LvpNodeMountsConfig: Required. Specifies the config for local
1106 // PersistentVolumes backed by mounted node disks. These disks need to be
1107 // formatted and mounted by the user, which can be done before or after cluster
1108 // creation.
1109 LvpNodeMountsConfig *BareMetalLvpConfig `json:"lvpNodeMountsConfig,omitempty"`
1110 // LvpShareConfig: Required. Specifies the config for local PersistentVolumes
1111 // backed by subdirectories in a shared filesystem. These subdirectores are
1112 // automatically created during cluster creation.
1113 LvpShareConfig *BareMetalLvpShareConfig `json:"lvpShareConfig,omitempty"`
1114 // ForceSendFields is a list of field names (e.g. "LvpNodeMountsConfig") to
1115 // unconditionally include in API requests. By default, fields with empty or
1116 // default values are omitted from API requests. See
1117 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1118 // details.
1119 ForceSendFields []string `json:"-"`
1120 // NullFields is a list of field names (e.g. "LvpNodeMountsConfig") to include
1121 // in API requests with the JSON null value. By default, fields with empty
1122 // values are omitted from API requests. See
1123 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1124 NullFields []string `json:"-"`
1125 }
1126
1127 func (s BareMetalAdminStorageConfig) MarshalJSON() ([]byte, error) {
1128 type NoMethod BareMetalAdminStorageConfig
1129 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1130 }
1131
1132 // BareMetalAdminVipConfig: BareMetalAdminVipConfig for bare metal load
1133 // balancer configurations.
1134 type BareMetalAdminVipConfig struct {
1135 // ControlPlaneVip: The VIP which you previously set aside for the Kubernetes
1136 // API of this bare metal admin cluster.
1137 ControlPlaneVip string `json:"controlPlaneVip,omitempty"`
1138 // ForceSendFields is a list of field names (e.g. "ControlPlaneVip") to
1139 // unconditionally include in API requests. By default, fields with empty or
1140 // default values are omitted from API requests. See
1141 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1142 // details.
1143 ForceSendFields []string `json:"-"`
1144 // NullFields is a list of field names (e.g. "ControlPlaneVip") to include in
1145 // API requests with the JSON null value. By default, fields with empty values
1146 // are omitted from API requests. See
1147 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1148 NullFields []string `json:"-"`
1149 }
1150
1151 func (s BareMetalAdminVipConfig) MarshalJSON() ([]byte, error) {
1152 type NoMethod BareMetalAdminVipConfig
1153 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1154 }
1155
1156 // BareMetalAdminWorkloadNodeConfig: BareMetalAdminWorkloadNodeConfig specifies
1157 // the workload node configurations.
1158 type BareMetalAdminWorkloadNodeConfig struct {
1159 // MaxPodsPerNode: The maximum number of pods a node can run. The size of the
1160 // CIDR range assigned to the node will be derived from this parameter. By
1161 // default 110 Pods are created per Node. Upper bound is 250 for both HA and
1162 // non-HA admin cluster. Lower bound is 64 for non-HA admin cluster and 32 for
1163 // HA admin cluster.
1164 MaxPodsPerNode int64 `json:"maxPodsPerNode,omitempty,string"`
1165 // ForceSendFields is a list of field names (e.g. "MaxPodsPerNode") to
1166 // unconditionally include in API requests. By default, fields with empty or
1167 // default values are omitted from API requests. See
1168 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1169 // details.
1170 ForceSendFields []string `json:"-"`
1171 // NullFields is a list of field names (e.g. "MaxPodsPerNode") to include in
1172 // API requests with the JSON null value. By default, fields with empty values
1173 // are omitted from API requests. See
1174 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1175 NullFields []string `json:"-"`
1176 }
1177
1178 func (s BareMetalAdminWorkloadNodeConfig) MarshalJSON() ([]byte, error) {
1179 type NoMethod BareMetalAdminWorkloadNodeConfig
1180 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1181 }
1182
1183 // BareMetalApiServerArgument: Represents an arg name->value pair. Only a
1184 // subset of customized flags are supported. For the exact format, refer to the
1185 // API server documentation
1186 // (https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/).
1187 type BareMetalApiServerArgument struct {
1188 // Argument: Required. The argument name as it appears on the API Server
1189 // command line, make sure to remove the leading dashes.
1190 Argument string `json:"argument,omitempty"`
1191 // Value: Required. The value of the arg as it will be passed to the API Server
1192 // command line.
1193 Value string `json:"value,omitempty"`
1194 // ForceSendFields is a list of field names (e.g. "Argument") to
1195 // unconditionally include in API requests. By default, fields with empty or
1196 // default values are omitted from API requests. See
1197 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1198 // details.
1199 ForceSendFields []string `json:"-"`
1200 // NullFields is a list of field names (e.g. "Argument") to include in API
1201 // requests with the JSON null value. By default, fields with empty values are
1202 // omitted from API requests. See
1203 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1204 NullFields []string `json:"-"`
1205 }
1206
1207 func (s BareMetalApiServerArgument) MarshalJSON() ([]byte, error) {
1208 type NoMethod BareMetalApiServerArgument
1209 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1210 }
1211
1212 // BareMetalBgpLbConfig: BareMetalBgpLbConfig represents configuration
1213 // parameters for a Border Gateway Protocol (BGP) load balancer.
1214 type BareMetalBgpLbConfig struct {
1215 // AddressPools: Required. AddressPools is a list of non-overlapping IP pools
1216 // used by load balancer typed services. All addresses must be routable to load
1217 // balancer nodes. IngressVIP must be included in the pools.
1218 AddressPools []*BareMetalLoadBalancerAddressPool `json:"addressPools,omitempty"`
1219 // Asn: Required. BGP autonomous system number (ASN) of the cluster. This field
1220 // can be updated after cluster creation.
1221 Asn int64 `json:"asn,omitempty,string"`
1222 // BgpPeerConfigs: Required. The list of BGP peers that the cluster will
1223 // connect to. At least one peer must be configured for each control plane
1224 // node. Control plane nodes will connect to these peers to advertise the
1225 // control plane VIP. The Services load balancer also uses these peers by
1226 // default. This field can be updated after cluster creation.
1227 BgpPeerConfigs []*BareMetalBgpPeerConfig `json:"bgpPeerConfigs,omitempty"`
1228 // LoadBalancerNodePoolConfig: Specifies the node pool running data plane load
1229 // balancing. L2 connectivity is required among nodes in this pool. If missing,
1230 // the control plane node pool is used for data plane load balancing.
1231 LoadBalancerNodePoolConfig *BareMetalLoadBalancerNodePoolConfig `json:"loadBalancerNodePoolConfig,omitempty"`
1232 // ForceSendFields is a list of field names (e.g. "AddressPools") to
1233 // unconditionally include in API requests. By default, fields with empty or
1234 // default values are omitted from API requests. See
1235 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1236 // details.
1237 ForceSendFields []string `json:"-"`
1238 // NullFields is a list of field names (e.g. "AddressPools") to include in API
1239 // requests with the JSON null value. By default, fields with empty values are
1240 // omitted from API requests. See
1241 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1242 NullFields []string `json:"-"`
1243 }
1244
1245 func (s BareMetalBgpLbConfig) MarshalJSON() ([]byte, error) {
1246 type NoMethod BareMetalBgpLbConfig
1247 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1248 }
1249
1250 // BareMetalBgpPeerConfig: BareMetalBgpPeerConfig represents configuration
1251 // parameters for a Border Gateway Protocol (BGP) peer.
1252 type BareMetalBgpPeerConfig struct {
1253 // Asn: Required. BGP autonomous system number (ASN) for the network that
1254 // contains the external peer device.
1255 Asn int64 `json:"asn,omitempty,string"`
1256 // ControlPlaneNodes: The IP address of the control plane node that connects to
1257 // the external peer. If you don't specify any control plane nodes, all control
1258 // plane nodes can connect to the external peer. If you specify one or more IP
1259 // addresses, only the nodes specified participate in peering sessions.
1260 ControlPlaneNodes []string `json:"controlPlaneNodes,omitempty"`
1261 // IpAddress: Required. The IP address of the external peer device.
1262 IpAddress string `json:"ipAddress,omitempty"`
1263 // ForceSendFields is a list of field names (e.g. "Asn") to unconditionally
1264 // include in API requests. By default, fields with empty or default values are
1265 // omitted from API requests. See
1266 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1267 // details.
1268 ForceSendFields []string `json:"-"`
1269 // NullFields is a list of field names (e.g. "Asn") to include in API requests
1270 // with the JSON null value. By default, fields with empty values are omitted
1271 // from API requests. See
1272 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1273 NullFields []string `json:"-"`
1274 }
1275
1276 func (s BareMetalBgpPeerConfig) MarshalJSON() ([]byte, error) {
1277 type NoMethod BareMetalBgpPeerConfig
1278 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1279 }
1280
1281 // BareMetalCluster: Resource that represents a bare metal user cluster.
1282 type BareMetalCluster struct {
1283 // AdminClusterMembership: Required. The admin cluster this bare metal user
1284 // cluster belongs to. This is the full resource name of the admin cluster's
1285 // fleet membership.
1286 AdminClusterMembership string `json:"adminClusterMembership,omitempty"`
1287 // AdminClusterName: Output only. The resource name of the bare metal admin
1288 // cluster managing this user cluster.
1289 AdminClusterName string `json:"adminClusterName,omitempty"`
1290 // Annotations: Annotations on the bare metal user cluster. This field has the
1291 // same restrictions as Kubernetes annotations. The total size of all keys and
1292 // values combined is limited to 256k. Key can have 2 segments: prefix
1293 // (optional) and name (required), separated by a slash (/). Prefix must be a
1294 // DNS subdomain. Name must be 63 characters or less, begin and end with
1295 // alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics
1296 // between.
1297 Annotations map[string]string `json:"annotations,omitempty"`
1298 // BareMetalVersion: Required. The Anthos clusters on bare metal version for
1299 // your user cluster.
1300 BareMetalVersion string `json:"bareMetalVersion,omitempty"`
1301 // BinaryAuthorization: Binary Authorization related configurations.
1302 BinaryAuthorization *BinaryAuthorization `json:"binaryAuthorization,omitempty"`
1303 // ClusterOperations: Cluster operations configuration.
1304 ClusterOperations *BareMetalClusterOperationsConfig `json:"clusterOperations,omitempty"`
1305 // ControlPlane: Required. Control plane configuration.
1306 ControlPlane *BareMetalControlPlaneConfig `json:"controlPlane,omitempty"`
1307 // CreateTime: Output only. The time when the bare metal user cluster was
1308 // created.
1309 CreateTime string `json:"createTime,omitempty"`
1310 // DeleteTime: Output only. The time when the bare metal user cluster was
1311 // deleted. If the resource is not deleted, this must be empty
1312 DeleteTime string `json:"deleteTime,omitempty"`
1313 // Description: A human readable description of this bare metal user cluster.
1314 Description string `json:"description,omitempty"`
1315 // Endpoint: Output only. The IP address of the bare metal user cluster's API
1316 // server.
1317 Endpoint string `json:"endpoint,omitempty"`
1318 // Etag: Output only. This checksum is computed by the server based on the
1319 // value of other fields, and may be sent on update and delete requests to
1320 // ensure the client has an up-to-date value before proceeding. Allows clients
1321 // to perform consistent read-modify-writes through optimistic concurrency
1322 // control.
1323 Etag string `json:"etag,omitempty"`
1324 // Fleet: Output only. Fleet configuration for the cluster.
1325 Fleet *Fleet `json:"fleet,omitempty"`
1326 // LoadBalancer: Required. Load balancer configuration.
1327 LoadBalancer *BareMetalLoadBalancerConfig `json:"loadBalancer,omitempty"`
1328 // LocalName: Output only. The object name of the bare metal user cluster
1329 // custom resource on the associated admin cluster. This field is used to
1330 // support conflicting names when enrolling existing clusters to the API. When
1331 // used as a part of cluster enrollment, this field will differ from the name
1332 // in the resource name. For new clusters, this field will match the user
1333 // provided cluster name and be visible in the last component of the resource
1334 // name. It is not modifiable. When the local name and cluster name differ, the
1335 // local name is used in the admin cluster controller logs. You use the cluster
1336 // name when accessing the cluster using bmctl and kubectl.
1337 LocalName string `json:"localName,omitempty"`
1338 // LocalNamespace: Output only. The namespace of the cluster.
1339 LocalNamespace string `json:"localNamespace,omitempty"`
1340 // MaintenanceConfig: Maintenance configuration.
1341 MaintenanceConfig *BareMetalMaintenanceConfig `json:"maintenanceConfig,omitempty"`
1342 // MaintenanceStatus: Output only. Status of on-going maintenance tasks.
1343 MaintenanceStatus *BareMetalMaintenanceStatus `json:"maintenanceStatus,omitempty"`
1344 // Name: Immutable. The bare metal user cluster resource name.
1345 Name string `json:"name,omitempty"`
1346 // NetworkConfig: Required. Network configuration.
1347 NetworkConfig *BareMetalNetworkConfig `json:"networkConfig,omitempty"`
1348 // NodeAccessConfig: Node access related configurations.
1349 NodeAccessConfig *BareMetalNodeAccessConfig `json:"nodeAccessConfig,omitempty"`
1350 // NodeConfig: Workload node configuration.
1351 NodeConfig *BareMetalWorkloadNodeConfig `json:"nodeConfig,omitempty"`
1352 // OsEnvironmentConfig: OS environment related configurations.
1353 OsEnvironmentConfig *BareMetalOsEnvironmentConfig `json:"osEnvironmentConfig,omitempty"`
1354 // Proxy: Proxy configuration.
1355 Proxy *BareMetalProxyConfig `json:"proxy,omitempty"`
1356 // Reconciling: Output only. If set, there are currently changes in flight to
1357 // the bare metal user cluster.
1358 Reconciling bool `json:"reconciling,omitempty"`
1359 // SecurityConfig: Security related setting configuration.
1360 SecurityConfig *BareMetalSecurityConfig `json:"securityConfig,omitempty"`
1361 // State: Output only. The current state of the bare metal user cluster.
1362 //
1363 // Possible values:
1364 // "STATE_UNSPECIFIED" - Not set.
1365 // "PROVISIONING" - The PROVISIONING state indicates the cluster is being
1366 // created.
1367 // "RUNNING" - The RUNNING state indicates the cluster has been created and
1368 // is fully usable.
1369 // "RECONCILING" - The RECONCILING state indicates that the cluster is being
1370 // updated. It remains available, but potentially with degraded performance.
1371 // "STOPPING" - The STOPPING state indicates the cluster is being deleted.
1372 // "ERROR" - The ERROR state indicates the cluster is in a broken
1373 // unrecoverable state.
1374 // "DEGRADED" - The DEGRADED state indicates the cluster requires user action
1375 // to restore full functionality.
1376 State string `json:"state,omitempty"`
1377 // Status: Output only. Detailed cluster status.
1378 Status *ResourceStatus `json:"status,omitempty"`
1379 // Storage: Required. Storage configuration.
1380 Storage *BareMetalStorageConfig `json:"storage,omitempty"`
1381 // Uid: Output only. The unique identifier of the bare metal user cluster.
1382 Uid string `json:"uid,omitempty"`
1383 // UpdateTime: Output only. The time when the bare metal user cluster was last
1384 // updated.
1385 UpdateTime string `json:"updateTime,omitempty"`
1386 // UpgradePolicy: The cluster upgrade policy.
1387 UpgradePolicy *BareMetalClusterUpgradePolicy `json:"upgradePolicy,omitempty"`
1388 // ValidationCheck: Output only. The result of the preflight check.
1389 ValidationCheck *ValidationCheck `json:"validationCheck,omitempty"`
1390
1391 // ServerResponse contains the HTTP response code and headers from the server.
1392 googleapi.ServerResponse `json:"-"`
1393 // ForceSendFields is a list of field names (e.g. "AdminClusterMembership") to
1394 // unconditionally include in API requests. By default, fields with empty or
1395 // default values are omitted from API requests. See
1396 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1397 // details.
1398 ForceSendFields []string `json:"-"`
1399 // NullFields is a list of field names (e.g. "AdminClusterMembership") to
1400 // include in API requests with the JSON null value. By default, fields with
1401 // empty values are omitted from API requests. See
1402 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1403 NullFields []string `json:"-"`
1404 }
1405
1406 func (s BareMetalCluster) MarshalJSON() ([]byte, error) {
1407 type NoMethod BareMetalCluster
1408 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1409 }
1410
1411 // BareMetalClusterOperationsConfig: Specifies the bare metal user cluster's
1412 // observability infrastructure.
1413 type BareMetalClusterOperationsConfig struct {
1414 // EnableApplicationLogs: Whether collection of application logs/metrics should
1415 // be enabled (in addition to system logs/metrics).
1416 EnableApplicationLogs bool `json:"enableApplicationLogs,omitempty"`
1417 // ForceSendFields is a list of field names (e.g. "EnableApplicationLogs") to
1418 // unconditionally include in API requests. By default, fields with empty or
1419 // default values are omitted from API requests. See
1420 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1421 // details.
1422 ForceSendFields []string `json:"-"`
1423 // NullFields is a list of field names (e.g. "EnableApplicationLogs") to
1424 // include in API requests with the JSON null value. By default, fields with
1425 // empty values are omitted from API requests. See
1426 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1427 NullFields []string `json:"-"`
1428 }
1429
1430 func (s BareMetalClusterOperationsConfig) MarshalJSON() ([]byte, error) {
1431 type NoMethod BareMetalClusterOperationsConfig
1432 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1433 }
1434
1435 // BareMetalClusterUpgradePolicy: BareMetalClusterUpgradePolicy defines the
1436 // cluster upgrade policy.
1437 type BareMetalClusterUpgradePolicy struct {
1438 // Pause: Output only. Pause is used to show the upgrade pause status. It's
1439 // view only for now.
1440 Pause bool `json:"pause,omitempty"`
1441 // Policy: Specifies which upgrade policy to use.
1442 //
1443 // Possible values:
1444 // "NODE_POOL_POLICY_UNSPECIFIED" - No upgrade policy selected.
1445 // "SERIAL" - Upgrade worker node pools sequentially.
1446 // "CONCURRENT" - Upgrade all worker node pools in parallel.
1447 Policy string `json:"policy,omitempty"`
1448 // ForceSendFields is a list of field names (e.g. "Pause") to unconditionally
1449 // include in API requests. By default, fields with empty or default values are
1450 // omitted from API requests. See
1451 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1452 // details.
1453 ForceSendFields []string `json:"-"`
1454 // NullFields is a list of field names (e.g. "Pause") to include in API
1455 // requests with the JSON null value. By default, fields with empty values are
1456 // omitted from API requests. See
1457 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1458 NullFields []string `json:"-"`
1459 }
1460
1461 func (s BareMetalClusterUpgradePolicy) MarshalJSON() ([]byte, error) {
1462 type NoMethod BareMetalClusterUpgradePolicy
1463 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1464 }
1465
1466 // BareMetalControlPlaneConfig: Specifies the control plane configuration.
1467 type BareMetalControlPlaneConfig struct {
1468 // ApiServerArgs: Customizes the default API server args. Only a subset of
1469 // customized flags are supported. For the exact format, refer to the API
1470 // server documentation
1471 // (https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/).
1472 ApiServerArgs []*BareMetalApiServerArgument `json:"apiServerArgs,omitempty"`
1473 // ControlPlaneNodePoolConfig: Required. Configures the node pool running the
1474 // control plane.
1475 ControlPlaneNodePoolConfig *BareMetalControlPlaneNodePoolConfig `json:"controlPlaneNodePoolConfig,omitempty"`
1476 // ForceSendFields is a list of field names (e.g. "ApiServerArgs") to
1477 // unconditionally include in API requests. By default, fields with empty or
1478 // default values are omitted from API requests. See
1479 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1480 // details.
1481 ForceSendFields []string `json:"-"`
1482 // NullFields is a list of field names (e.g. "ApiServerArgs") to include in API
1483 // requests with the JSON null value. By default, fields with empty values are
1484 // omitted from API requests. See
1485 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1486 NullFields []string `json:"-"`
1487 }
1488
1489 func (s BareMetalControlPlaneConfig) MarshalJSON() ([]byte, error) {
1490 type NoMethod BareMetalControlPlaneConfig
1491 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1492 }
1493
1494 // BareMetalControlPlaneNodePoolConfig: Specifies the control plane node pool
1495 // configuration.
1496 type BareMetalControlPlaneNodePoolConfig struct {
1497 // NodePoolConfig: Required. The generic configuration for a node pool running
1498 // the control plane.
1499 NodePoolConfig *BareMetalNodePoolConfig `json:"nodePoolConfig,omitempty"`
1500 // ForceSendFields is a list of field names (e.g. "NodePoolConfig") to
1501 // unconditionally include in API requests. By default, fields with empty or
1502 // default values are omitted from API requests. See
1503 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1504 // details.
1505 ForceSendFields []string `json:"-"`
1506 // NullFields is a list of field names (e.g. "NodePoolConfig") to include in
1507 // API requests with the JSON null value. By default, fields with empty values
1508 // are omitted from API requests. See
1509 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1510 NullFields []string `json:"-"`
1511 }
1512
1513 func (s BareMetalControlPlaneNodePoolConfig) MarshalJSON() ([]byte, error) {
1514 type NoMethod BareMetalControlPlaneNodePoolConfig
1515 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1516 }
1517
1518 // BareMetalDrainedMachine: Represents a machine that is currently drained.
1519 type BareMetalDrainedMachine struct {
1520 // NodeIp: Drained machine IP address.
1521 NodeIp string `json:"nodeIp,omitempty"`
1522 // ForceSendFields is a list of field names (e.g. "NodeIp") to unconditionally
1523 // include in API requests. By default, fields with empty or default values are
1524 // omitted from API requests. See
1525 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1526 // details.
1527 ForceSendFields []string `json:"-"`
1528 // NullFields is a list of field names (e.g. "NodeIp") to include in API
1529 // requests with the JSON null value. By default, fields with empty values are
1530 // omitted from API requests. See
1531 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1532 NullFields []string `json:"-"`
1533 }
1534
1535 func (s BareMetalDrainedMachine) MarshalJSON() ([]byte, error) {
1536 type NoMethod BareMetalDrainedMachine
1537 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1538 }
1539
1540 // BareMetalDrainingMachine: Represents a machine that is currently draining.
1541 type BareMetalDrainingMachine struct {
1542 // NodeIp: Draining machine IP address.
1543 NodeIp string `json:"nodeIp,omitempty"`
1544 // PodCount: The count of pods yet to drain.
1545 PodCount int64 `json:"podCount,omitempty"`
1546 // ForceSendFields is a list of field names (e.g. "NodeIp") to unconditionally
1547 // include in API requests. By default, fields with empty or default values are
1548 // omitted from API requests. See
1549 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1550 // details.
1551 ForceSendFields []string `json:"-"`
1552 // NullFields is a list of field names (e.g. "NodeIp") to include in API
1553 // requests with the JSON null value. By default, fields with empty values are
1554 // omitted from API requests. See
1555 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1556 NullFields []string `json:"-"`
1557 }
1558
1559 func (s BareMetalDrainingMachine) MarshalJSON() ([]byte, error) {
1560 type NoMethod BareMetalDrainingMachine
1561 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1562 }
1563
1564 // BareMetalIslandModeCidrConfig: Specifies the cluster CIDR configuration
1565 // while running in island mode.
1566 type BareMetalIslandModeCidrConfig struct {
1567 // PodAddressCidrBlocks: Required. All pods in the cluster are assigned an
1568 // RFC1918 IPv4 address from these ranges. This field cannot be changed after
1569 // creation.
1570 PodAddressCidrBlocks []string `json:"podAddressCidrBlocks,omitempty"`
1571 // ServiceAddressCidrBlocks: Required. All services in the cluster are assigned
1572 // an RFC1918 IPv4 address from these ranges. This field is mutable after
1573 // creation starting with version 1.15.
1574 ServiceAddressCidrBlocks []string `json:"serviceAddressCidrBlocks,omitempty"`
1575 // ForceSendFields is a list of field names (e.g. "PodAddressCidrBlocks") to
1576 // unconditionally include in API requests. By default, fields with empty or
1577 // default values are omitted from API requests. See
1578 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1579 // details.
1580 ForceSendFields []string `json:"-"`
1581 // NullFields is a list of field names (e.g. "PodAddressCidrBlocks") to include
1582 // in API requests with the JSON null value. By default, fields with empty
1583 // values are omitted from API requests. See
1584 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1585 NullFields []string `json:"-"`
1586 }
1587
1588 func (s BareMetalIslandModeCidrConfig) MarshalJSON() ([]byte, error) {
1589 type NoMethod BareMetalIslandModeCidrConfig
1590 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1591 }
1592
1593 // BareMetalKubeletConfig: KubeletConfig defines the modifiable kubelet
1594 // configurations for bare metal machines. Note: this list includes fields
1595 // supported in GKE (see
1596 // https://cloud.google.com/kubernetes-engine/docs/how-to/node-system-config#kubelet-options).
1597 type BareMetalKubeletConfig struct {
1598 // RegistryBurst: The maximum size of bursty pulls, temporarily allows pulls to
1599 // burst to this number, while still not exceeding registry_pull_qps. The value
1600 // must not be a negative number. Updating this field may impact scalability by
1601 // changing the amount of traffic produced by image pulls. Defaults to 10.
1602 RegistryBurst int64 `json:"registryBurst,omitempty"`
1603 // RegistryPullQps: The limit of registry pulls per second. Setting this value
1604 // to 0 means no limit. Updating this field may impact scalability by changing
1605 // the amount of traffic produced by image pulls. Defaults to 5.
1606 RegistryPullQps int64 `json:"registryPullQps,omitempty"`
1607 // SerializeImagePullsDisabled: Prevents the Kubelet from pulling multiple
1608 // images at a time. We recommend *not* changing the default value on nodes
1609 // that run docker daemon with version < 1.9 or an Another Union File System
1610 // (Aufs) storage backend. Issue
1611 // https://github.com/kubernetes/kubernetes/issues/10959 has more details.
1612 SerializeImagePullsDisabled bool `json:"serializeImagePullsDisabled,omitempty"`
1613 // ForceSendFields is a list of field names (e.g. "RegistryBurst") to
1614 // unconditionally include in API requests. By default, fields with empty or
1615 // default values are omitted from API requests. See
1616 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1617 // details.
1618 ForceSendFields []string `json:"-"`
1619 // NullFields is a list of field names (e.g. "RegistryBurst") to include in API
1620 // requests with the JSON null value. By default, fields with empty values are
1621 // omitted from API requests. See
1622 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1623 NullFields []string `json:"-"`
1624 }
1625
1626 func (s BareMetalKubeletConfig) MarshalJSON() ([]byte, error) {
1627 type NoMethod BareMetalKubeletConfig
1628 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1629 }
1630
1631 // BareMetalLoadBalancerAddressPool: Represents an IP pool used by the load
1632 // balancer.
1633 type BareMetalLoadBalancerAddressPool struct {
1634 // Addresses: Required. The addresses that are part of this pool. Each address
1635 // must be either in the CIDR form (1.2.3.0/24) or range form
1636 // (1.2.3.1-1.2.3.5).
1637 Addresses []string `json:"addresses,omitempty"`
1638 // AvoidBuggyIps: If true, avoid using IPs ending in .0 or .255. This avoids
1639 // buggy consumer devices mistakenly dropping IPv4 traffic for those special IP
1640 // addresses.
1641 AvoidBuggyIps bool `json:"avoidBuggyIps,omitempty"`
1642 // ManualAssign: If true, prevent IP addresses from being automatically
1643 // assigned.
1644 ManualAssign bool `json:"manualAssign,omitempty"`
1645 // Pool: Required. The name of the address pool.
1646 Pool string `json:"pool,omitempty"`
1647 // ForceSendFields is a list of field names (e.g. "Addresses") to
1648 // unconditionally include in API requests. By default, fields with empty or
1649 // default values are omitted from API requests. See
1650 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1651 // details.
1652 ForceSendFields []string `json:"-"`
1653 // NullFields is a list of field names (e.g. "Addresses") to include in API
1654 // requests with the JSON null value. By default, fields with empty values are
1655 // omitted from API requests. See
1656 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1657 NullFields []string `json:"-"`
1658 }
1659
1660 func (s BareMetalLoadBalancerAddressPool) MarshalJSON() ([]byte, error) {
1661 type NoMethod BareMetalLoadBalancerAddressPool
1662 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1663 }
1664
1665 // BareMetalLoadBalancerConfig: Specifies the load balancer configuration.
1666 type BareMetalLoadBalancerConfig struct {
1667 // BgpLbConfig: Configuration for BGP typed load balancers. When set
1668 // network_config.advanced_networking is automatically set to true.
1669 BgpLbConfig *BareMetalBgpLbConfig `json:"bgpLbConfig,omitempty"`
1670 // ManualLbConfig: Manually configured load balancers.
1671 ManualLbConfig *BareMetalManualLbConfig `json:"manualLbConfig,omitempty"`
1672 // MetalLbConfig: Configuration for MetalLB load balancers.
1673 MetalLbConfig *BareMetalMetalLbConfig `json:"metalLbConfig,omitempty"`
1674 // PortConfig: Configures the ports that the load balancer will listen on.
1675 PortConfig *BareMetalPortConfig `json:"portConfig,omitempty"`
1676 // VipConfig: The VIPs used by the load balancer.
1677 VipConfig *BareMetalVipConfig `json:"vipConfig,omitempty"`
1678 // ForceSendFields is a list of field names (e.g. "BgpLbConfig") to
1679 // unconditionally include in API requests. By default, fields with empty or
1680 // default values are omitted from API requests. See
1681 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1682 // details.
1683 ForceSendFields []string `json:"-"`
1684 // NullFields is a list of field names (e.g. "BgpLbConfig") to include in API
1685 // requests with the JSON null value. By default, fields with empty values are
1686 // omitted from API requests. See
1687 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1688 NullFields []string `json:"-"`
1689 }
1690
1691 func (s BareMetalLoadBalancerConfig) MarshalJSON() ([]byte, error) {
1692 type NoMethod BareMetalLoadBalancerConfig
1693 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1694 }
1695
1696 // BareMetalLoadBalancerNodePoolConfig: Specifies the load balancer's node pool
1697 // configuration.
1698 type BareMetalLoadBalancerNodePoolConfig struct {
1699 // NodePoolConfig: The generic configuration for a node pool running a load
1700 // balancer.
1701 NodePoolConfig *BareMetalNodePoolConfig `json:"nodePoolConfig,omitempty"`
1702 // ForceSendFields is a list of field names (e.g. "NodePoolConfig") to
1703 // unconditionally include in API requests. By default, fields with empty or
1704 // default values are omitted from API requests. See
1705 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1706 // details.
1707 ForceSendFields []string `json:"-"`
1708 // NullFields is a list of field names (e.g. "NodePoolConfig") to include in
1709 // API requests with the JSON null value. By default, fields with empty values
1710 // are omitted from API requests. See
1711 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1712 NullFields []string `json:"-"`
1713 }
1714
1715 func (s BareMetalLoadBalancerNodePoolConfig) MarshalJSON() ([]byte, error) {
1716 type NoMethod BareMetalLoadBalancerNodePoolConfig
1717 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1718 }
1719
1720 // BareMetalLvpConfig: Specifies the configs for local persistent volumes
1721 // (PVs).
1722 type BareMetalLvpConfig struct {
1723 // Path: Required. The host machine path.
1724 Path string `json:"path,omitempty"`
1725 // StorageClass: Required. The StorageClass name that PVs will be created with.
1726 StorageClass string `json:"storageClass,omitempty"`
1727 // ForceSendFields is a list of field names (e.g. "Path") to unconditionally
1728 // include in API requests. By default, fields with empty or default values are
1729 // omitted from API requests. See
1730 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1731 // details.
1732 ForceSendFields []string `json:"-"`
1733 // NullFields is a list of field names (e.g. "Path") to include in API requests
1734 // with the JSON null value. By default, fields with empty values are omitted
1735 // from API requests. See
1736 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1737 NullFields []string `json:"-"`
1738 }
1739
1740 func (s BareMetalLvpConfig) MarshalJSON() ([]byte, error) {
1741 type NoMethod BareMetalLvpConfig
1742 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1743 }
1744
1745 // BareMetalLvpShareConfig: Specifies the configs for local persistent volumes
1746 // under a shared file system.
1747 type BareMetalLvpShareConfig struct {
1748 // LvpConfig: Required. Defines the machine path and storage class for the LVP
1749 // Share.
1750 LvpConfig *BareMetalLvpConfig `json:"lvpConfig,omitempty"`
1751 // SharedPathPvCount: The number of subdirectories to create under path.
1752 SharedPathPvCount int64 `json:"sharedPathPvCount,omitempty"`
1753 // ForceSendFields is a list of field names (e.g. "LvpConfig") to
1754 // unconditionally include in API requests. By default, fields with empty or
1755 // default values are omitted from API requests. See
1756 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1757 // details.
1758 ForceSendFields []string `json:"-"`
1759 // NullFields is a list of field names (e.g. "LvpConfig") to include in API
1760 // requests with the JSON null value. By default, fields with empty values are
1761 // omitted from API requests. See
1762 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1763 NullFields []string `json:"-"`
1764 }
1765
1766 func (s BareMetalLvpShareConfig) MarshalJSON() ([]byte, error) {
1767 type NoMethod BareMetalLvpShareConfig
1768 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1769 }
1770
1771 // BareMetalMachineDrainStatus: Represents the status of node machines that are
1772 // undergoing drain operations.
1773 type BareMetalMachineDrainStatus struct {
1774 // DrainedMachines: The list of drained machines.
1775 DrainedMachines []*BareMetalDrainedMachine `json:"drainedMachines,omitempty"`
1776 // DrainingMachines: The list of draning machines.
1777 DrainingMachines []*BareMetalDrainingMachine `json:"drainingMachines,omitempty"`
1778 // ForceSendFields is a list of field names (e.g. "DrainedMachines") to
1779 // unconditionally include in API requests. By default, fields with empty or
1780 // default values are omitted from API requests. See
1781 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1782 // details.
1783 ForceSendFields []string `json:"-"`
1784 // NullFields is a list of field names (e.g. "DrainedMachines") to include in
1785 // API requests with the JSON null value. By default, fields with empty values
1786 // are omitted from API requests. See
1787 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1788 NullFields []string `json:"-"`
1789 }
1790
1791 func (s BareMetalMachineDrainStatus) MarshalJSON() ([]byte, error) {
1792 type NoMethod BareMetalMachineDrainStatus
1793 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1794 }
1795
1796 // BareMetalMaintenanceConfig: Specifies configurations to put bare metal nodes
1797 // in and out of maintenance.
1798 type BareMetalMaintenanceConfig struct {
1799 // MaintenanceAddressCidrBlocks: Required. All IPv4 address from these ranges
1800 // will be placed into maintenance mode. Nodes in maintenance mode will be
1801 // cordoned and drained. When both of these are true, the
1802 // "baremetal.cluster.gke.io/maintenance" annotation will be set on the node
1803 // resource.
1804 MaintenanceAddressCidrBlocks []string `json:"maintenanceAddressCidrBlocks,omitempty"`
1805 // ForceSendFields is a list of field names (e.g.
1806 // "MaintenanceAddressCidrBlocks") to unconditionally include in API requests.
1807 // By default, fields with empty or default values are omitted from API
1808 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
1809 // for more details.
1810 ForceSendFields []string `json:"-"`
1811 // NullFields is a list of field names (e.g. "MaintenanceAddressCidrBlocks") to
1812 // include in API requests with the JSON null value. By default, fields with
1813 // empty values are omitted from API requests. See
1814 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1815 NullFields []string `json:"-"`
1816 }
1817
1818 func (s BareMetalMaintenanceConfig) MarshalJSON() ([]byte, error) {
1819 type NoMethod BareMetalMaintenanceConfig
1820 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1821 }
1822
1823 // BareMetalMaintenanceStatus: Represents the maintenance status of the bare
1824 // metal user cluster.
1825 type BareMetalMaintenanceStatus struct {
1826 // MachineDrainStatus: The maintenance status of node machines.
1827 MachineDrainStatus *BareMetalMachineDrainStatus `json:"machineDrainStatus,omitempty"`
1828 // ForceSendFields is a list of field names (e.g. "MachineDrainStatus") to
1829 // 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. "MachineDrainStatus") to include
1835 // in API requests with the JSON null value. By default, fields with empty
1836 // 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 BareMetalMaintenanceStatus) MarshalJSON() ([]byte, error) {
1842 type NoMethod BareMetalMaintenanceStatus
1843 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1844 }
1845
1846 // BareMetalManualLbConfig: Represents configuration parameters for a manual
1847 // load balancer.
1848 type BareMetalManualLbConfig struct {
1849 // Enabled: Whether manual load balancing is enabled.
1850 Enabled bool `json:"enabled,omitempty"`
1851 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
1852 // include in API requests. By default, fields with empty or default values are
1853 // omitted from API requests. See
1854 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1855 // details.
1856 ForceSendFields []string `json:"-"`
1857 // NullFields is a list of field names (e.g. "Enabled") to include in API
1858 // requests with the JSON null value. By default, fields with empty values are
1859 // omitted from API requests. See
1860 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1861 NullFields []string `json:"-"`
1862 }
1863
1864 func (s BareMetalManualLbConfig) MarshalJSON() ([]byte, error) {
1865 type NoMethod BareMetalManualLbConfig
1866 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1867 }
1868
1869 // BareMetalMetalLbConfig: Represents configuration parameters for a MetalLB
1870 // load balancer.
1871 type BareMetalMetalLbConfig struct {
1872 // AddressPools: Required. AddressPools is a list of non-overlapping IP pools
1873 // used by load balancer typed services. All addresses must be routable to load
1874 // balancer nodes. IngressVIP must be included in the pools.
1875 AddressPools []*BareMetalLoadBalancerAddressPool `json:"addressPools,omitempty"`
1876 // LoadBalancerNodePoolConfig: Specifies the node pool running the load
1877 // balancer. L2 connectivity is required among nodes in this pool. If missing,
1878 // the control plane node pool is used as the load balancer pool.
1879 LoadBalancerNodePoolConfig *BareMetalLoadBalancerNodePoolConfig `json:"loadBalancerNodePoolConfig,omitempty"`
1880 // ForceSendFields is a list of field names (e.g. "AddressPools") to
1881 // unconditionally include in API requests. By default, fields with empty or
1882 // default values are omitted from API requests. See
1883 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1884 // details.
1885 ForceSendFields []string `json:"-"`
1886 // NullFields is a list of field names (e.g. "AddressPools") to include in API
1887 // requests with the JSON null value. By default, fields with empty values are
1888 // omitted from API requests. See
1889 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1890 NullFields []string `json:"-"`
1891 }
1892
1893 func (s BareMetalMetalLbConfig) MarshalJSON() ([]byte, error) {
1894 type NoMethod BareMetalMetalLbConfig
1895 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1896 }
1897
1898 // BareMetalMultipleNetworkInterfacesConfig: Specifies the multiple networking
1899 // interfaces cluster configuration.
1900 type BareMetalMultipleNetworkInterfacesConfig struct {
1901 // Enabled: Whether to enable multiple network interfaces for your pods. When
1902 // set network_config.advanced_networking is automatically set to true.
1903 Enabled bool `json:"enabled,omitempty"`
1904 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
1905 // include in API requests. By default, fields with empty or default values are
1906 // omitted from API requests. See
1907 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1908 // details.
1909 ForceSendFields []string `json:"-"`
1910 // NullFields is a list of field names (e.g. "Enabled") to include in API
1911 // requests with the JSON null value. By default, fields with empty values are
1912 // omitted from API requests. See
1913 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1914 NullFields []string `json:"-"`
1915 }
1916
1917 func (s BareMetalMultipleNetworkInterfacesConfig) MarshalJSON() ([]byte, error) {
1918 type NoMethod BareMetalMultipleNetworkInterfacesConfig
1919 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1920 }
1921
1922 // BareMetalNetworkConfig: Specifies the cluster network configuration.
1923 type BareMetalNetworkConfig struct {
1924 // AdvancedNetworking: Enables the use of advanced Anthos networking features,
1925 // such as Bundled Load Balancing with BGP or the egress NAT gateway. Setting
1926 // configuration for advanced networking features will automatically set this
1927 // flag.
1928 AdvancedNetworking bool `json:"advancedNetworking,omitempty"`
1929 // IslandModeCidr: Configuration for island mode CIDR. In an island-mode
1930 // network, nodes have unique IP addresses, but pods don't have unique
1931 // addresses across clusters. This doesn't cause problems because pods in one
1932 // cluster never directly communicate with pods in another cluster. Instead,
1933 // there are gateways that mediate between a pod in one cluster and a pod in
1934 // another cluster.
1935 IslandModeCidr *BareMetalIslandModeCidrConfig `json:"islandModeCidr,omitempty"`
1936 // MultipleNetworkInterfacesConfig: Configuration for multiple network
1937 // interfaces.
1938 MultipleNetworkInterfacesConfig *BareMetalMultipleNetworkInterfacesConfig `json:"multipleNetworkInterfacesConfig,omitempty"`
1939 // SrIovConfig: Configuration for SR-IOV.
1940 SrIovConfig *BareMetalSrIovConfig `json:"srIovConfig,omitempty"`
1941 // ForceSendFields is a list of field names (e.g. "AdvancedNetworking") to
1942 // unconditionally include in API requests. By default, fields with empty or
1943 // default values are omitted from API requests. See
1944 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1945 // details.
1946 ForceSendFields []string `json:"-"`
1947 // NullFields is a list of field names (e.g. "AdvancedNetworking") to include
1948 // in API requests with the JSON null value. By default, fields with empty
1949 // values are omitted from API requests. See
1950 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1951 NullFields []string `json:"-"`
1952 }
1953
1954 func (s BareMetalNetworkConfig) MarshalJSON() ([]byte, error) {
1955 type NoMethod BareMetalNetworkConfig
1956 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1957 }
1958
1959 // BareMetalNodeAccessConfig: Specifies the node access related settings for
1960 // the bare metal user cluster.
1961 type BareMetalNodeAccessConfig struct {
1962 // LoginUser: LoginUser is the user name used to access node machines. It
1963 // defaults to "root" if not set.
1964 LoginUser string `json:"loginUser,omitempty"`
1965 // ForceSendFields is a list of field names (e.g. "LoginUser") to
1966 // unconditionally include in API requests. By default, fields with empty or
1967 // default values are omitted from API requests. See
1968 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1969 // details.
1970 ForceSendFields []string `json:"-"`
1971 // NullFields is a list of field names (e.g. "LoginUser") to include in API
1972 // requests with the JSON null value. By default, fields with empty values are
1973 // omitted from API requests. See
1974 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1975 NullFields []string `json:"-"`
1976 }
1977
1978 func (s BareMetalNodeAccessConfig) MarshalJSON() ([]byte, error) {
1979 type NoMethod BareMetalNodeAccessConfig
1980 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1981 }
1982
1983 // BareMetalNodeConfig: BareMetalNodeConfig lists machine addresses to access
1984 // Nodes.
1985 type BareMetalNodeConfig struct {
1986 // Labels: The labels assigned to this node. An object containing a list of
1987 // key/value pairs. The labels here, unioned with the labels set on
1988 // BareMetalNodePoolConfig are the set of labels that will be applied to the
1989 // node. If there are any conflicts, the BareMetalNodeConfig labels take
1990 // precedence. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
1991 Labels map[string]string `json:"labels,omitempty"`
1992 // NodeIp: The default IPv4 address for SSH access and Kubernetes node.
1993 // Example: 192.168.0.1
1994 NodeIp string `json:"nodeIp,omitempty"`
1995 // ForceSendFields is a list of field names (e.g. "Labels") to unconditionally
1996 // include in API requests. By default, fields with empty or default values are
1997 // omitted from API requests. See
1998 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1999 // details.
2000 ForceSendFields []string `json:"-"`
2001 // NullFields is a list of field names (e.g. "Labels") to include in API
2002 // requests with the JSON null value. By default, fields with empty values are
2003 // omitted from API requests. See
2004 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2005 NullFields []string `json:"-"`
2006 }
2007
2008 func (s BareMetalNodeConfig) MarshalJSON() ([]byte, error) {
2009 type NoMethod BareMetalNodeConfig
2010 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2011 }
2012
2013 // BareMetalNodePool: Resource that represents a bare metal node pool.
2014 type BareMetalNodePool struct {
2015 // Annotations: Annotations on the bare metal node pool. This field has the
2016 // same restrictions as Kubernetes annotations. The total size of all keys and
2017 // values combined is limited to 256k. Key can have 2 segments: prefix
2018 // (optional) and name (required), separated by a slash (/). Prefix must be a
2019 // DNS subdomain. Name must be 63 characters or less, begin and end with
2020 // alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics
2021 // between.
2022 Annotations map[string]string `json:"annotations,omitempty"`
2023 // CreateTime: Output only. The time at which this bare metal node pool was
2024 // created.
2025 CreateTime string `json:"createTime,omitempty"`
2026 // DeleteTime: Output only. The time at which this bare metal node pool was
2027 // deleted. If the resource is not deleted, this must be empty
2028 DeleteTime string `json:"deleteTime,omitempty"`
2029 // DisplayName: The display name for the bare metal node pool.
2030 DisplayName string `json:"displayName,omitempty"`
2031 // Etag: This checksum is computed by the server based on the value of other
2032 // fields, and may be sent on update and delete requests to ensure the client
2033 // has an up-to-date value before proceeding. Allows clients to perform
2034 // consistent read-modify-writes through optimistic concurrency control.
2035 Etag string `json:"etag,omitempty"`
2036 // Name: Immutable. The bare metal node pool resource name.
2037 Name string `json:"name,omitempty"`
2038 // NodePoolConfig: Required. Node pool configuration.
2039 NodePoolConfig *BareMetalNodePoolConfig `json:"nodePoolConfig,omitempty"`
2040 // Reconciling: Output only. If set, there are currently changes in flight to
2041 // the bare metal node pool.
2042 Reconciling bool `json:"reconciling,omitempty"`
2043 // State: Output only. The current state of the bare metal node pool.
2044 //
2045 // Possible values:
2046 // "STATE_UNSPECIFIED" - Not set.
2047 // "PROVISIONING" - The PROVISIONING state indicates the bare metal node pool
2048 // is being created.
2049 // "RUNNING" - The RUNNING state indicates the bare metal node pool has been
2050 // created and is fully usable.
2051 // "RECONCILING" - The RECONCILING state indicates that the bare metal node
2052 // pool is being updated. It remains available, but potentially with degraded
2053 // performance.
2054 // "STOPPING" - The STOPPING state indicates the bare metal node pool is
2055 // being deleted.
2056 // "ERROR" - The ERROR state indicates the bare metal node pool is in a
2057 // broken unrecoverable state.
2058 // "DEGRADED" - The DEGRADED state indicates the bare metal node pool
2059 // requires user action to restore full functionality.
2060 State string `json:"state,omitempty"`
2061 // Status: Output only. ResourceStatus representing the detailed node pool
2062 // status.
2063 Status *ResourceStatus `json:"status,omitempty"`
2064 // Uid: Output only. The unique identifier of the bare metal node pool.
2065 Uid string `json:"uid,omitempty"`
2066 // UpdateTime: Output only. The time at which this bare metal node pool was
2067 // last updated.
2068 UpdateTime string `json:"updateTime,omitempty"`
2069 // UpgradePolicy: The worker node pool upgrade policy.
2070 UpgradePolicy *BareMetalNodePoolUpgradePolicy `json:"upgradePolicy,omitempty"`
2071
2072 // ServerResponse contains the HTTP response code and headers from the server.
2073 googleapi.ServerResponse `json:"-"`
2074 // ForceSendFields is a list of field names (e.g. "Annotations") to
2075 // unconditionally include in API requests. By default, fields with empty or
2076 // default values are omitted from API requests. See
2077 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2078 // details.
2079 ForceSendFields []string `json:"-"`
2080 // NullFields is a list of field names (e.g. "Annotations") to include in API
2081 // requests with the JSON null value. By default, fields with empty values are
2082 // omitted from API requests. See
2083 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2084 NullFields []string `json:"-"`
2085 }
2086
2087 func (s BareMetalNodePool) MarshalJSON() ([]byte, error) {
2088 type NoMethod BareMetalNodePool
2089 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2090 }
2091
2092 // BareMetalNodePoolConfig: BareMetalNodePoolConfig describes the configuration
2093 // of all nodes within a given bare metal node pool.
2094 type BareMetalNodePoolConfig struct {
2095 // KubeletConfig: The modifiable kubelet configurations for the bare metal
2096 // machines.
2097 KubeletConfig *BareMetalKubeletConfig `json:"kubeletConfig,omitempty"`
2098 // Labels: The labels assigned to nodes of this node pool. An object containing
2099 // a list of key/value pairs. Example: { "name": "wrench", "mass": "1.3kg",
2100 // "count": "3" }.
2101 Labels map[string]string `json:"labels,omitempty"`
2102 // NodeConfigs: Required. The list of machine addresses in the bare metal node
2103 // pool.
2104 NodeConfigs []*BareMetalNodeConfig `json:"nodeConfigs,omitempty"`
2105 // OperatingSystem: Specifies the nodes operating system (default: LINUX).
2106 //
2107 // Possible values:
2108 // "OPERATING_SYSTEM_UNSPECIFIED" - No operating system runtime selected.
2109 // "LINUX" - Linux operating system.
2110 OperatingSystem string `json:"operatingSystem,omitempty"`
2111 // Taints: The initial taints assigned to nodes of this node pool.
2112 Taints []*NodeTaint `json:"taints,omitempty"`
2113 // ForceSendFields is a list of field names (e.g. "KubeletConfig") to
2114 // unconditionally include in API requests. By default, fields with empty or
2115 // default values are omitted from API requests. See
2116 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2117 // details.
2118 ForceSendFields []string `json:"-"`
2119 // NullFields is a list of field names (e.g. "KubeletConfig") to include in API
2120 // requests with the JSON null value. By default, fields with empty values are
2121 // omitted from API requests. See
2122 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2123 NullFields []string `json:"-"`
2124 }
2125
2126 func (s BareMetalNodePoolConfig) MarshalJSON() ([]byte, error) {
2127 type NoMethod BareMetalNodePoolConfig
2128 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2129 }
2130
2131 // BareMetalNodePoolUpgradePolicy: BareMetalNodePoolUpgradePolicy defines the
2132 // node pool upgrade policy.
2133 type BareMetalNodePoolUpgradePolicy struct {
2134 // ParallelUpgradeConfig: The parallel upgrade settings for worker node pools.
2135 ParallelUpgradeConfig *BareMetalParallelUpgradeConfig `json:"parallelUpgradeConfig,omitempty"`
2136 // ForceSendFields is a list of field names (e.g. "ParallelUpgradeConfig") to
2137 // unconditionally include in API requests. By default, fields with empty or
2138 // default values are omitted from API requests. See
2139 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2140 // details.
2141 ForceSendFields []string `json:"-"`
2142 // NullFields is a list of field names (e.g. "ParallelUpgradeConfig") to
2143 // include in API requests with the JSON null value. By default, fields with
2144 // empty values are omitted from API requests. See
2145 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2146 NullFields []string `json:"-"`
2147 }
2148
2149 func (s BareMetalNodePoolUpgradePolicy) MarshalJSON() ([]byte, error) {
2150 type NoMethod BareMetalNodePoolUpgradePolicy
2151 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2152 }
2153
2154 // BareMetalOsEnvironmentConfig: Specifies operating system settings for
2155 // cluster provisioning.
2156 type BareMetalOsEnvironmentConfig struct {
2157 // PackageRepoExcluded: Whether the package repo should not be included when
2158 // initializing bare metal machines.
2159 PackageRepoExcluded bool `json:"packageRepoExcluded,omitempty"`
2160 // ForceSendFields is a list of field names (e.g. "PackageRepoExcluded") to
2161 // unconditionally include in API requests. By default, fields with empty or
2162 // default values are omitted from API requests. See
2163 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2164 // details.
2165 ForceSendFields []string `json:"-"`
2166 // NullFields is a list of field names (e.g. "PackageRepoExcluded") to include
2167 // in API requests with the JSON null value. By default, fields with empty
2168 // values are omitted from API requests. See
2169 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2170 NullFields []string `json:"-"`
2171 }
2172
2173 func (s BareMetalOsEnvironmentConfig) MarshalJSON() ([]byte, error) {
2174 type NoMethod BareMetalOsEnvironmentConfig
2175 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2176 }
2177
2178 // BareMetalParallelUpgradeConfig: BareMetalParallelUpgradeConfig defines the
2179 // parallel upgrade settings for worker node pools.
2180 type BareMetalParallelUpgradeConfig struct {
2181 // ConcurrentNodes: The maximum number of nodes that can be upgraded at once.
2182 ConcurrentNodes int64 `json:"concurrentNodes,omitempty"`
2183 // MinimumAvailableNodes: The minimum number of nodes that should be healthy
2184 // and available during an upgrade. If set to the default value of 0, it is
2185 // possible that none of the nodes will be available during an upgrade.
2186 MinimumAvailableNodes int64 `json:"minimumAvailableNodes,omitempty"`
2187 // ForceSendFields is a list of field names (e.g. "ConcurrentNodes") to
2188 // unconditionally include in API requests. By default, fields with empty or
2189 // default values are omitted from API requests. See
2190 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2191 // details.
2192 ForceSendFields []string `json:"-"`
2193 // NullFields is a list of field names (e.g. "ConcurrentNodes") to include in
2194 // API requests with the JSON null value. By default, fields with empty values
2195 // are omitted from API requests. See
2196 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2197 NullFields []string `json:"-"`
2198 }
2199
2200 func (s BareMetalParallelUpgradeConfig) MarshalJSON() ([]byte, error) {
2201 type NoMethod BareMetalParallelUpgradeConfig
2202 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2203 }
2204
2205 // BareMetalPortConfig: Specifies load balancer ports for the bare metal user
2206 // cluster.
2207 type BareMetalPortConfig struct {
2208 // ControlPlaneLoadBalancerPort: The port that control plane hosted load
2209 // balancers will listen on.
2210 ControlPlaneLoadBalancerPort int64 `json:"controlPlaneLoadBalancerPort,omitempty"`
2211 // ForceSendFields is a list of field names (e.g.
2212 // "ControlPlaneLoadBalancerPort") to unconditionally include in API requests.
2213 // By default, fields with empty or default values are omitted from API
2214 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
2215 // for more details.
2216 ForceSendFields []string `json:"-"`
2217 // NullFields is a list of field names (e.g. "ControlPlaneLoadBalancerPort") to
2218 // include in API requests with the JSON null value. By default, fields with
2219 // empty values are omitted from API requests. See
2220 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2221 NullFields []string `json:"-"`
2222 }
2223
2224 func (s BareMetalPortConfig) MarshalJSON() ([]byte, error) {
2225 type NoMethod BareMetalPortConfig
2226 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2227 }
2228
2229 // BareMetalProxyConfig: Specifies the cluster proxy configuration.
2230 type BareMetalProxyConfig struct {
2231 // NoProxy: A list of IPs, hostnames, and domains that should skip the proxy.
2232 // Examples: ["127.0.0.1", "example.com", ".corp", "localhost"].
2233 NoProxy []string `json:"noProxy,omitempty"`
2234 // Uri: Required. Specifies the address of your proxy server. Examples:
2235 // `http://domain` Do not provide credentials in the format
2236 // `http://(username:password@)domain` these will be rejected by the server.
2237 Uri string `json:"uri,omitempty"`
2238 // ForceSendFields is a list of field names (e.g. "NoProxy") to unconditionally
2239 // include in API requests. By default, fields with empty or default values are
2240 // omitted from API requests. See
2241 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2242 // details.
2243 ForceSendFields []string `json:"-"`
2244 // NullFields is a list of field names (e.g. "NoProxy") to include in API
2245 // requests with the JSON null value. By default, fields with empty values are
2246 // omitted from API requests. See
2247 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2248 NullFields []string `json:"-"`
2249 }
2250
2251 func (s BareMetalProxyConfig) MarshalJSON() ([]byte, error) {
2252 type NoMethod BareMetalProxyConfig
2253 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2254 }
2255
2256 // BareMetalSecurityConfig: Specifies the security related settings for the
2257 // bare metal user cluster.
2258 type BareMetalSecurityConfig struct {
2259 // Authorization: Configures user access to the user cluster.
2260 Authorization *Authorization `json:"authorization,omitempty"`
2261 // ForceSendFields is a list of field names (e.g. "Authorization") to
2262 // unconditionally include in API requests. By default, fields with empty or
2263 // default values are omitted from API requests. See
2264 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2265 // details.
2266 ForceSendFields []string `json:"-"`
2267 // NullFields is a list of field names (e.g. "Authorization") to include in API
2268 // requests with the JSON null value. By default, fields with empty values are
2269 // omitted from API requests. See
2270 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2271 NullFields []string `json:"-"`
2272 }
2273
2274 func (s BareMetalSecurityConfig) MarshalJSON() ([]byte, error) {
2275 type NoMethod BareMetalSecurityConfig
2276 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2277 }
2278
2279 // BareMetalSrIovConfig: Specifies the SR-IOV networking operator config.
2280 type BareMetalSrIovConfig struct {
2281 // Enabled: Whether to install the SR-IOV operator.
2282 Enabled bool `json:"enabled,omitempty"`
2283 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
2284 // include in API requests. By default, fields with empty or default values are
2285 // omitted from API requests. See
2286 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2287 // details.
2288 ForceSendFields []string `json:"-"`
2289 // NullFields is a list of field names (e.g. "Enabled") to include in API
2290 // requests with the JSON null value. By default, fields with empty values are
2291 // omitted from API requests. See
2292 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2293 NullFields []string `json:"-"`
2294 }
2295
2296 func (s BareMetalSrIovConfig) MarshalJSON() ([]byte, error) {
2297 type NoMethod BareMetalSrIovConfig
2298 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2299 }
2300
2301 // BareMetalStorageConfig: BareMetalStorageConfig specifies the cluster storage
2302 // configuration.
2303 type BareMetalStorageConfig struct {
2304 // LvpNodeMountsConfig: Required. Specifies the config for local
2305 // PersistentVolumes backed by mounted node disks. These disks need to be
2306 // formatted and mounted by the user, which can be done before or after cluster
2307 // creation.
2308 LvpNodeMountsConfig *BareMetalLvpConfig `json:"lvpNodeMountsConfig,omitempty"`
2309 // LvpShareConfig: Required. Specifies the config for local PersistentVolumes
2310 // backed by subdirectories in a shared filesystem. These subdirectores are
2311 // automatically created during cluster creation.
2312 LvpShareConfig *BareMetalLvpShareConfig `json:"lvpShareConfig,omitempty"`
2313 // ForceSendFields is a list of field names (e.g. "LvpNodeMountsConfig") to
2314 // unconditionally include in API requests. By default, fields with empty or
2315 // default values are omitted from API requests. See
2316 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2317 // details.
2318 ForceSendFields []string `json:"-"`
2319 // NullFields is a list of field names (e.g. "LvpNodeMountsConfig") to include
2320 // in API requests with the JSON null value. By default, fields with empty
2321 // values are omitted from API requests. See
2322 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2323 NullFields []string `json:"-"`
2324 }
2325
2326 func (s BareMetalStorageConfig) MarshalJSON() ([]byte, error) {
2327 type NoMethod BareMetalStorageConfig
2328 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2329 }
2330
2331 // BareMetalVersionInfo: Contains information about a specific Anthos on bare
2332 // metal version.
2333 type BareMetalVersionInfo struct {
2334 // Dependencies: The list of upgrade dependencies for this version.
2335 Dependencies []*UpgradeDependency `json:"dependencies,omitempty"`
2336 // HasDependencies: If set, the cluster dependencies (e.g. the admin cluster,
2337 // other user clusters managed by the same admin cluster, version skew policy,
2338 // etc) must be upgraded before this version can be installed or upgraded to.
2339 HasDependencies bool `json:"hasDependencies,omitempty"`
2340 // Version: Version number e.g. 1.13.1.
2341 Version string `json:"version,omitempty"`
2342 // ForceSendFields is a list of field names (e.g. "Dependencies") to
2343 // unconditionally include in API requests. By default, fields with empty or
2344 // default values are omitted from API requests. See
2345 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2346 // details.
2347 ForceSendFields []string `json:"-"`
2348 // NullFields is a list of field names (e.g. "Dependencies") to include in API
2349 // requests with the JSON null value. By default, fields with empty values are
2350 // omitted from API requests. See
2351 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2352 NullFields []string `json:"-"`
2353 }
2354
2355 func (s BareMetalVersionInfo) MarshalJSON() ([]byte, error) {
2356 type NoMethod BareMetalVersionInfo
2357 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2358 }
2359
2360 // BareMetalVipConfig: Specifies the VIP config for the bare metal load
2361 // balancer.
2362 type BareMetalVipConfig struct {
2363 // ControlPlaneVip: The VIP which you previously set aside for the Kubernetes
2364 // API of this bare metal user cluster.
2365 ControlPlaneVip string `json:"controlPlaneVip,omitempty"`
2366 // IngressVip: The VIP which you previously set aside for ingress traffic into
2367 // this bare metal user cluster.
2368 IngressVip string `json:"ingressVip,omitempty"`
2369 // ForceSendFields is a list of field names (e.g. "ControlPlaneVip") to
2370 // unconditionally include in API requests. By default, fields with empty or
2371 // default values are omitted from API requests. See
2372 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2373 // details.
2374 ForceSendFields []string `json:"-"`
2375 // NullFields is a list of field names (e.g. "ControlPlaneVip") to include in
2376 // API requests with the JSON null value. By default, fields with empty values
2377 // are omitted from API requests. See
2378 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2379 NullFields []string `json:"-"`
2380 }
2381
2382 func (s BareMetalVipConfig) MarshalJSON() ([]byte, error) {
2383 type NoMethod BareMetalVipConfig
2384 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2385 }
2386
2387 // BareMetalWorkloadNodeConfig: Specifies the workload node configurations.
2388 type BareMetalWorkloadNodeConfig struct {
2389 // ContainerRuntime: Specifies which container runtime will be used.
2390 //
2391 // Possible values:
2392 // "CONTAINER_RUNTIME_UNSPECIFIED" - No container runtime selected.
2393 // "CONTAINERD" - Containerd runtime.
2394 ContainerRuntime string `json:"containerRuntime,omitempty"`
2395 // MaxPodsPerNode: The maximum number of pods a node can run. The size of the
2396 // CIDR range assigned to the node will be derived from this parameter.
2397 MaxPodsPerNode int64 `json:"maxPodsPerNode,omitempty,string"`
2398 // ForceSendFields is a list of field names (e.g. "ContainerRuntime") to
2399 // unconditionally include in API requests. By default, fields with empty or
2400 // default values are omitted from API requests. See
2401 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2402 // details.
2403 ForceSendFields []string `json:"-"`
2404 // NullFields is a list of field names (e.g. "ContainerRuntime") to include in
2405 // API requests with the JSON null value. By default, fields with empty values
2406 // are omitted from API requests. See
2407 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2408 NullFields []string `json:"-"`
2409 }
2410
2411 func (s BareMetalWorkloadNodeConfig) MarshalJSON() ([]byte, error) {
2412 type NoMethod BareMetalWorkloadNodeConfig
2413 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2414 }
2415
2416 // BinaryAuthorization: Configuration for Binary Authorization.
2417 type BinaryAuthorization struct {
2418 // EvaluationMode: Mode of operation for binauthz policy evaluation. If
2419 // unspecified, defaults to DISABLED.
2420 //
2421 // Possible values:
2422 // "EVALUATION_MODE_UNSPECIFIED" - Default value
2423 // "DISABLED" - Disable BinaryAuthorization
2424 // "PROJECT_SINGLETON_POLICY_ENFORCE" - Enforce Kubernetes admission requests
2425 // with BinaryAuthorization using the project's singleton policy.
2426 EvaluationMode string `json:"evaluationMode,omitempty"`
2427 // ForceSendFields is a list of field names (e.g. "EvaluationMode") to
2428 // unconditionally include in API requests. By default, fields with empty or
2429 // default values are omitted from API requests. See
2430 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2431 // details.
2432 ForceSendFields []string `json:"-"`
2433 // NullFields is a list of field names (e.g. "EvaluationMode") to include in
2434 // API requests with the JSON null value. By default, fields with empty values
2435 // are omitted from API requests. See
2436 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2437 NullFields []string `json:"-"`
2438 }
2439
2440 func (s BinaryAuthorization) MarshalJSON() ([]byte, error) {
2441 type NoMethod BinaryAuthorization
2442 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2443 }
2444
2445 // Binding: Associates `members`, or principals, with a `role`.
2446 type Binding struct {
2447 // Condition: The condition that is associated with this binding. If the
2448 // condition evaluates to `true`, then this binding applies to the current
2449 // request. If the condition evaluates to `false`, then this binding does not
2450 // apply to the current request. However, a different role binding might grant
2451 // the same role to one or more of the principals in this binding. To learn
2452 // which resources support conditions in their IAM policies, see the IAM
2453 // documentation
2454 // (https://cloud.google.com/iam/help/conditions/resource-policies).
2455 Condition *Expr `json:"condition,omitempty"`
2456 // Members: Specifies the principals requesting access for a Google Cloud
2457 // resource. `members` can have the following values: * `allUsers`: A special
2458 // identifier that represents anyone who is on the internet; with or without a
2459 // Google account. * `allAuthenticatedUsers`: A special identifier that
2460 // represents anyone who is authenticated with a Google account or a service
2461 // account. Does not include identities that come from external identity
2462 // providers (IdPs) through identity federation. * `user:{emailid}`: An email
2463 // address that represents a specific Google account. For example,
2464 // `[email protected]` . * `serviceAccount:{emailid}`: An email address that
2465 // represents a Google service account. For example,
2466 // `[email protected]`. *
2467 // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
2468 // identifier for a Kubernetes service account
2469 // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
2470 // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
2471 // `group:{emailid}`: An email address that represents a Google group. For
2472 // example, `[email protected]`. * `domain:{domain}`: The G Suite domain
2473 // (primary) that represents all the users of that domain. For example,
2474 // `google.com` or `example.com`. *
2475 // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
2476 // ject/{subject_attribute_value}`: A single identity in a workforce identity
2477 // pool. *
2478 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
2479 // group/{group_id}`: All workforce identities in a group. *
2480 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
2481 // attribute.{attribute_name}/{attribute_value}`: All workforce identities with
2482 // a specific attribute value. *
2483 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
2484 // *`: All identities in a workforce identity pool. *
2485 // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
2486 // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
2487 // identity in a workload identity pool. *
2488 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
2489 // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
2490 // group. *
2491 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
2492 // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
2493 // `: All identities in a workload identity pool with a certain attribute. *
2494 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
2495 // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
2496 // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
2497 // unique identifier) representing a user that has been recently deleted. For
2498 // example, `[email protected]?uid=123456789012345678901`. If the user is
2499 // recovered, this value reverts to `user:{emailid}` and the recovered user
2500 // retains the role in the binding. *
2501 // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
2502 // unique identifier) representing a service account that has been recently
2503 // deleted. For example,
2504 // `[email protected]?uid=123456789012345678901`. If the
2505 // service account is undeleted, this value reverts to
2506 // `serviceAccount:{emailid}` and the undeleted service account retains the
2507 // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
2508 // address (plus unique identifier) representing a Google group that has been
2509 // recently deleted. For example,
2510 // `[email protected]?uid=123456789012345678901`. If the group is recovered,
2511 // this value reverts to `group:{emailid}` and the recovered group retains the
2512 // role in the binding. *
2513 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
2514 // _id}/subject/{subject_attribute_value}`: Deleted single identity in a
2515 // workforce identity pool. For example,
2516 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
2517 // ol-id/subject/my-subject-attribute-value`.
2518 Members []string `json:"members,omitempty"`
2519 // Role: Role that is assigned to the list of `members`, or principals. For
2520 // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
2521 // of the IAM roles and permissions, see the IAM documentation
2522 // (https://cloud.google.com/iam/docs/roles-overview). For a list of the
2523 // available pre-defined roles, see here
2524 // (https://cloud.google.com/iam/docs/understanding-roles).
2525 Role string `json:"role,omitempty"`
2526 // ForceSendFields is a list of field names (e.g. "Condition") to
2527 // unconditionally include in API requests. By default, fields with empty or
2528 // default values are omitted from API requests. See
2529 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2530 // details.
2531 ForceSendFields []string `json:"-"`
2532 // NullFields is a list of field names (e.g. "Condition") to include in API
2533 // requests with the JSON null value. By default, fields with empty values are
2534 // omitted from API requests. See
2535 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2536 NullFields []string `json:"-"`
2537 }
2538
2539 func (s Binding) MarshalJSON() ([]byte, error) {
2540 type NoMethod Binding
2541 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2542 }
2543
2544 // CancelOperationRequest: The request message for Operations.CancelOperation.
2545 type CancelOperationRequest struct {
2546 }
2547
2548 // ClusterUser: ClusterUser configures user principals for an RBAC policy.
2549 type ClusterUser struct {
2550 // Username: Required. The name of the user, e.g. `[email protected]`.
2551 Username string `json:"username,omitempty"`
2552 // ForceSendFields is a list of field names (e.g. "Username") to
2553 // unconditionally include in API requests. By default, fields with empty or
2554 // default values are omitted from API requests. See
2555 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2556 // details.
2557 ForceSendFields []string `json:"-"`
2558 // NullFields is a list of field names (e.g. "Username") to include in API
2559 // requests with the JSON null value. By default, fields with empty values are
2560 // omitted from API requests. See
2561 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2562 NullFields []string `json:"-"`
2563 }
2564
2565 func (s ClusterUser) MarshalJSON() ([]byte, error) {
2566 type NoMethod ClusterUser
2567 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2568 }
2569
2570 // Empty: A generic empty message that you can re-use to avoid defining
2571 // duplicated empty messages in your APIs. A typical example is to use it as
2572 // the request or the response type of an API method. For instance: service Foo
2573 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
2574 type Empty struct {
2575 // ServerResponse contains the HTTP response code and headers from the server.
2576 googleapi.ServerResponse `json:"-"`
2577 }
2578
2579 // EnrollBareMetalAdminClusterRequest: Message for enrolling an existing bare
2580 // metal admin cluster to the GKE on-prem API.
2581 type EnrollBareMetalAdminClusterRequest struct {
2582 // BareMetalAdminClusterId: User provided OnePlatform identifier that is used
2583 // as part of the resource name. This must be unique among all GKE on-prem
2584 // clusters within a project and location and will return a 409 if the cluster
2585 // already exists. (https://tools.ietf.org/html/rfc1123) format.
2586 BareMetalAdminClusterId string `json:"bareMetalAdminClusterId,omitempty"`
2587 // Membership: Required. This is the full resource name of this admin cluster's
2588 // fleet membership.
2589 Membership string `json:"membership,omitempty"`
2590 // ForceSendFields is a list of field names (e.g. "BareMetalAdminClusterId") to
2591 // unconditionally include in API requests. By default, fields with empty or
2592 // default values are omitted from API requests. See
2593 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2594 // details.
2595 ForceSendFields []string `json:"-"`
2596 // NullFields is a list of field names (e.g. "BareMetalAdminClusterId") to
2597 // include in API requests with the JSON null value. By default, fields with
2598 // empty values are omitted from API requests. See
2599 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2600 NullFields []string `json:"-"`
2601 }
2602
2603 func (s EnrollBareMetalAdminClusterRequest) MarshalJSON() ([]byte, error) {
2604 type NoMethod EnrollBareMetalAdminClusterRequest
2605 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2606 }
2607
2608 // EnrollBareMetalClusterRequest: Message for enrolling an existing bare metal
2609 // cluster to the Anthos On-Prem API.
2610 type EnrollBareMetalClusterRequest struct {
2611 // AdminClusterMembership: Required. The admin cluster this bare metal user
2612 // cluster belongs to. This is the full resource name of the admin cluster's
2613 // fleet membership. In the future, references to other resource types might be
2614 // allowed if admin clusters are modeled as their own resources.
2615 AdminClusterMembership string `json:"adminClusterMembership,omitempty"`
2616 // BareMetalClusterId: User provided OnePlatform identifier that is used as
2617 // part of the resource name. This must be unique among all bare metal clusters
2618 // within a project and location and will return a 409 if the cluster already
2619 // exists. (https://tools.ietf.org/html/rfc1123) format.
2620 BareMetalClusterId string `json:"bareMetalClusterId,omitempty"`
2621 // LocalName: Optional. The object name of the bare metal cluster custom
2622 // resource on the associated admin cluster. This field is used to support
2623 // conflicting resource names when enrolling existing clusters to the API. When
2624 // not provided, this field will resolve to the bare_metal_cluster_id.
2625 // Otherwise, it must match the object name of the bare metal cluster custom
2626 // resource. It is not modifiable outside / beyond the enrollment operation.
2627 LocalName string `json:"localName,omitempty"`
2628 // LocalNamespace: Optional. The namespace of the cluster.
2629 LocalNamespace string `json:"localNamespace,omitempty"`
2630 // ForceSendFields is a list of field names (e.g. "AdminClusterMembership") to
2631 // unconditionally include in API requests. By default, fields with empty or
2632 // default values are omitted from API requests. See
2633 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2634 // details.
2635 ForceSendFields []string `json:"-"`
2636 // NullFields is a list of field names (e.g. "AdminClusterMembership") to
2637 // include in API requests with the JSON null value. By default, fields with
2638 // empty values are omitted from API requests. See
2639 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2640 NullFields []string `json:"-"`
2641 }
2642
2643 func (s EnrollBareMetalClusterRequest) MarshalJSON() ([]byte, error) {
2644 type NoMethod EnrollBareMetalClusterRequest
2645 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2646 }
2647
2648 // EnrollBareMetalNodePoolRequest: Message for enrolling an existing bare metal
2649 // node pool to the GKE on-prem API.
2650 type EnrollBareMetalNodePoolRequest struct {
2651 // BareMetalNodePoolId: User provided OnePlatform identifier that is used as
2652 // part of the resource name. (https://tools.ietf.org/html/rfc1123) format.
2653 BareMetalNodePoolId string `json:"bareMetalNodePoolId,omitempty"`
2654 // ValidateOnly: If set, only validate the request, but do not actually enroll
2655 // the node pool.
2656 ValidateOnly bool `json:"validateOnly,omitempty"`
2657 // ForceSendFields is a list of field names (e.g. "BareMetalNodePoolId") to
2658 // unconditionally include in API requests. By default, fields with empty or
2659 // default values are omitted from API requests. See
2660 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2661 // details.
2662 ForceSendFields []string `json:"-"`
2663 // NullFields is a list of field names (e.g. "BareMetalNodePoolId") to include
2664 // in API requests with the JSON null value. By default, fields with empty
2665 // values are omitted from API requests. See
2666 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2667 NullFields []string `json:"-"`
2668 }
2669
2670 func (s EnrollBareMetalNodePoolRequest) MarshalJSON() ([]byte, error) {
2671 type NoMethod EnrollBareMetalNodePoolRequest
2672 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2673 }
2674
2675 // EnrollVmwareAdminClusterRequest: Message for enrolling an existing VMware
2676 // admin cluster to the GKE on-prem API.
2677 type EnrollVmwareAdminClusterRequest struct {
2678 // Membership: Required. This is the full resource name of this admin cluster's
2679 // fleet membership.
2680 Membership string `json:"membership,omitempty"`
2681 // VmwareAdminClusterId: User provided OnePlatform identifier that is used as
2682 // part of the resource name. This must be unique among all GKE on-prem
2683 // clusters within a project and location and will return a 409 if the cluster
2684 // already exists. (https://tools.ietf.org/html/rfc1123) format.
2685 VmwareAdminClusterId string `json:"vmwareAdminClusterId,omitempty"`
2686 // ForceSendFields is a list of field names (e.g. "Membership") to
2687 // unconditionally include in API requests. By default, fields with empty or
2688 // default values are omitted from API requests. See
2689 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2690 // details.
2691 ForceSendFields []string `json:"-"`
2692 // NullFields is a list of field names (e.g. "Membership") to include in API
2693 // requests with the JSON null value. By default, fields with empty values are
2694 // omitted from API requests. See
2695 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2696 NullFields []string `json:"-"`
2697 }
2698
2699 func (s EnrollVmwareAdminClusterRequest) MarshalJSON() ([]byte, error) {
2700 type NoMethod EnrollVmwareAdminClusterRequest
2701 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2702 }
2703
2704 // EnrollVmwareClusterRequest: Message for enrolling an existing VMware cluster
2705 // to the Anthos On-Prem API.
2706 type EnrollVmwareClusterRequest struct {
2707 // AdminClusterMembership: Required. The admin cluster this VMware user cluster
2708 // belongs to. This is the full resource name of the admin cluster's fleet
2709 // membership. In the future, references to other resource types might be
2710 // allowed if admin clusters are modeled as their own resources.
2711 AdminClusterMembership string `json:"adminClusterMembership,omitempty"`
2712 // LocalName: Optional. The object name of the VMware OnPremUserCluster custom
2713 // resource on the associated admin cluster. This field is used to support
2714 // conflicting resource names when enrolling existing clusters to the API. When
2715 // not provided, this field will resolve to the vmware_cluster_id. Otherwise,
2716 // it must match the object name of the VMware OnPremUserCluster custom
2717 // resource. It is not modifiable outside / beyond the enrollment operation.
2718 LocalName string `json:"localName,omitempty"`
2719 // ValidateOnly: Validate the request without actually doing any updates.
2720 ValidateOnly bool `json:"validateOnly,omitempty"`
2721 // VmwareClusterId: User provided OnePlatform identifier that is used as part
2722 // of the resource name. This must be unique among all GKE on-prem clusters
2723 // within a project and location and will return a 409 if the cluster already
2724 // exists. (https://tools.ietf.org/html/rfc1123) format.
2725 VmwareClusterId string `json:"vmwareClusterId,omitempty"`
2726 // ForceSendFields is a list of field names (e.g. "AdminClusterMembership") to
2727 // unconditionally include in API requests. By default, fields with empty or
2728 // default values are omitted from API requests. See
2729 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2730 // details.
2731 ForceSendFields []string `json:"-"`
2732 // NullFields is a list of field names (e.g. "AdminClusterMembership") to
2733 // include in API requests with the JSON null value. By default, fields with
2734 // empty values are omitted from API requests. See
2735 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2736 NullFields []string `json:"-"`
2737 }
2738
2739 func (s EnrollVmwareClusterRequest) MarshalJSON() ([]byte, error) {
2740 type NoMethod EnrollVmwareClusterRequest
2741 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2742 }
2743
2744 // EnrollVmwareNodePoolRequest: Message for enrolling a VMware node pool.
2745 type EnrollVmwareNodePoolRequest struct {
2746 // VmwareNodePoolId: The target node pool id to be enrolled.
2747 VmwareNodePoolId string `json:"vmwareNodePoolId,omitempty"`
2748 // ForceSendFields is a list of field names (e.g. "VmwareNodePoolId") to
2749 // unconditionally include in API requests. By default, fields with empty or
2750 // default values are omitted from API requests. See
2751 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2752 // details.
2753 ForceSendFields []string `json:"-"`
2754 // NullFields is a list of field names (e.g. "VmwareNodePoolId") to include in
2755 // API requests with the JSON null value. By default, fields with empty values
2756 // are omitted from API requests. See
2757 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2758 NullFields []string `json:"-"`
2759 }
2760
2761 func (s EnrollVmwareNodePoolRequest) MarshalJSON() ([]byte, error) {
2762 type NoMethod EnrollVmwareNodePoolRequest
2763 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2764 }
2765
2766 // Expr: Represents a textual expression in the Common Expression Language
2767 // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
2768 // of CEL are documented at https://github.com/google/cel-spec. Example
2769 // (Comparison): title: "Summary size limit" description: "Determines if a
2770 // summary is less than 100 chars" expression: "document.summary.size() < 100"
2771 // Example (Equality): title: "Requestor is owner" description: "Determines if
2772 // requestor is the document owner" expression: "document.owner ==
2773 // request.auth.claims.email" Example (Logic): title: "Public documents"
2774 // description: "Determine whether the document should be publicly visible"
2775 // expression: "document.type != 'private' && document.type != 'internal'"
2776 // Example (Data Manipulation): title: "Notification string" description:
2777 // "Create a notification string with a timestamp." expression: "'New message
2778 // received at ' + string(document.create_time)" The exact variables and
2779 // functions that may be referenced within an expression are determined by the
2780 // service that evaluates it. See the service documentation for additional
2781 // information.
2782 type Expr struct {
2783 // Description: Optional. Description of the expression. This is a longer text
2784 // which describes the expression, e.g. when hovered over it in a UI.
2785 Description string `json:"description,omitempty"`
2786 // Expression: Textual representation of an expression in Common Expression
2787 // Language syntax.
2788 Expression string `json:"expression,omitempty"`
2789 // Location: Optional. String indicating the location of the expression for
2790 // error reporting, e.g. a file name and a position in the file.
2791 Location string `json:"location,omitempty"`
2792 // Title: Optional. Title for the expression, i.e. a short string describing
2793 // its purpose. This can be used e.g. in UIs which allow to enter the
2794 // expression.
2795 Title string `json:"title,omitempty"`
2796 // ForceSendFields is a list of field names (e.g. "Description") to
2797 // unconditionally include in API requests. By default, fields with empty or
2798 // default values are omitted from API requests. See
2799 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2800 // details.
2801 ForceSendFields []string `json:"-"`
2802 // NullFields is a list of field names (e.g. "Description") to include in API
2803 // requests with the JSON null value. By default, fields with empty values are
2804 // omitted from API requests. See
2805 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2806 NullFields []string `json:"-"`
2807 }
2808
2809 func (s Expr) MarshalJSON() ([]byte, error) {
2810 type NoMethod Expr
2811 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2812 }
2813
2814 // Fleet: Fleet related configuration. Fleets are a Google Cloud concept for
2815 // logically organizing clusters, letting you use and manage multi-cluster
2816 // capabilities and apply consistent policies across your systems. See Anthos
2817 // Fleets (`https://cloud.google.com/anthos/multicluster-management/fleets`)
2818 // for more details on Anthos multi-cluster capabilities using Fleets. ##
2819 type Fleet struct {
2820 // Membership: Output only. The name of the managed fleet Membership resource
2821 // associated to this cluster. Membership names are formatted as
2822 // `projects//locations//memberships/`.
2823 Membership string `json:"membership,omitempty"`
2824 // ForceSendFields is a list of field names (e.g. "Membership") to
2825 // unconditionally include in API requests. By default, fields with empty or
2826 // default values are omitted from API requests. See
2827 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2828 // details.
2829 ForceSendFields []string `json:"-"`
2830 // NullFields is a list of field names (e.g. "Membership") to include in API
2831 // requests with the JSON null value. By default, fields with empty values are
2832 // omitted from API requests. See
2833 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2834 NullFields []string `json:"-"`
2835 }
2836
2837 func (s Fleet) MarshalJSON() ([]byte, error) {
2838 type NoMethod Fleet
2839 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2840 }
2841
2842 // ListBareMetalAdminClustersResponse: Response message for listing bare metal
2843 // admin clusters.
2844 type ListBareMetalAdminClustersResponse struct {
2845 // BareMetalAdminClusters: The list of bare metal admin cluster.
2846 BareMetalAdminClusters []*BareMetalAdminCluster `json:"bareMetalAdminClusters,omitempty"`
2847 // NextPageToken: A token identifying a page of results the server should
2848 // return. If the token is not empty this means that more results are available
2849 // and should be retrieved by repeating the request with the provided page
2850 // token.
2851 NextPageToken string `json:"nextPageToken,omitempty"`
2852 // Unreachable: Locations that could not be reached.
2853 Unreachable []string `json:"unreachable,omitempty"`
2854
2855 // ServerResponse contains the HTTP response code and headers from the server.
2856 googleapi.ServerResponse `json:"-"`
2857 // ForceSendFields is a list of field names (e.g. "BareMetalAdminClusters") to
2858 // unconditionally include in API requests. By default, fields with empty or
2859 // default values are omitted from API requests. See
2860 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2861 // details.
2862 ForceSendFields []string `json:"-"`
2863 // NullFields is a list of field names (e.g. "BareMetalAdminClusters") to
2864 // include in API requests with the JSON null value. By default, fields with
2865 // empty values are omitted from API requests. See
2866 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2867 NullFields []string `json:"-"`
2868 }
2869
2870 func (s ListBareMetalAdminClustersResponse) MarshalJSON() ([]byte, error) {
2871 type NoMethod ListBareMetalAdminClustersResponse
2872 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2873 }
2874
2875 // ListBareMetalClustersResponse: Response message for listing bare metal
2876 // Clusters.
2877 type ListBareMetalClustersResponse struct {
2878 // BareMetalClusters: The list of bare metal Clusters.
2879 BareMetalClusters []*BareMetalCluster `json:"bareMetalClusters,omitempty"`
2880 // NextPageToken: A token identifying a page of results the server should
2881 // return. If the token is not empty this means that more results are available
2882 // and should be retrieved by repeating the request with the provided page
2883 // token.
2884 NextPageToken string `json:"nextPageToken,omitempty"`
2885 // Unreachable: Locations that could not be reached.
2886 Unreachable []string `json:"unreachable,omitempty"`
2887
2888 // ServerResponse contains the HTTP response code and headers from the server.
2889 googleapi.ServerResponse `json:"-"`
2890 // ForceSendFields is a list of field names (e.g. "BareMetalClusters") 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. "BareMetalClusters") to include in
2897 // API requests with the JSON null value. By default, fields with empty values
2898 // 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 ListBareMetalClustersResponse) MarshalJSON() ([]byte, error) {
2904 type NoMethod ListBareMetalClustersResponse
2905 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2906 }
2907
2908 // ListBareMetalNodePoolsResponse: Response message for listing bare metal node
2909 // pools.
2910 type ListBareMetalNodePoolsResponse struct {
2911 // BareMetalNodePools: The node pools from the specified parent resource.
2912 BareMetalNodePools []*BareMetalNodePool `json:"bareMetalNodePools,omitempty"`
2913 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
2914 // next page. If this field is omitted, there are no subsequent pages.
2915 NextPageToken string `json:"nextPageToken,omitempty"`
2916 // Unreachable: Locations that could not be reached.
2917 Unreachable []string `json:"unreachable,omitempty"`
2918
2919 // ServerResponse contains the HTTP response code and headers from the server.
2920 googleapi.ServerResponse `json:"-"`
2921 // ForceSendFields is a list of field names (e.g. "BareMetalNodePools") to
2922 // unconditionally include in API requests. By default, fields with empty or
2923 // default values are omitted from API requests. See
2924 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2925 // details.
2926 ForceSendFields []string `json:"-"`
2927 // NullFields is a list of field names (e.g. "BareMetalNodePools") to include
2928 // in API requests with the JSON null value. By default, fields with empty
2929 // values are omitted from API requests. See
2930 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2931 NullFields []string `json:"-"`
2932 }
2933
2934 func (s ListBareMetalNodePoolsResponse) MarshalJSON() ([]byte, error) {
2935 type NoMethod ListBareMetalNodePoolsResponse
2936 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2937 }
2938
2939 // ListLocationsResponse: The response message for Locations.ListLocations.
2940 type ListLocationsResponse struct {
2941 // Locations: A list of locations that matches the specified filter in the
2942 // request.
2943 Locations []*Location `json:"locations,omitempty"`
2944 // NextPageToken: The standard List next-page token.
2945 NextPageToken string `json:"nextPageToken,omitempty"`
2946
2947 // ServerResponse contains the HTTP response code and headers from the server.
2948 googleapi.ServerResponse `json:"-"`
2949 // ForceSendFields is a list of field names (e.g. "Locations") to
2950 // unconditionally include in API requests. By default, fields with empty or
2951 // default values are omitted from API requests. See
2952 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2953 // details.
2954 ForceSendFields []string `json:"-"`
2955 // NullFields is a list of field names (e.g. "Locations") to include in API
2956 // requests with the JSON null value. By default, fields with empty values are
2957 // omitted from API requests. See
2958 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2959 NullFields []string `json:"-"`
2960 }
2961
2962 func (s ListLocationsResponse) MarshalJSON() ([]byte, error) {
2963 type NoMethod ListLocationsResponse
2964 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2965 }
2966
2967 // ListOperationsResponse: The response message for Operations.ListOperations.
2968 type ListOperationsResponse struct {
2969 // NextPageToken: The standard List next-page token.
2970 NextPageToken string `json:"nextPageToken,omitempty"`
2971 // Operations: A list of operations that matches the specified filter in the
2972 // request.
2973 Operations []*Operation `json:"operations,omitempty"`
2974 // Unreachable: Unordered list. Unreachable resources. Populated when the
2975 // request sets `ListOperationsRequest.return_partial_success` and reads across
2976 // collections. For example, when attempting to list all resources across all
2977 // supported locations.
2978 Unreachable []string `json:"unreachable,omitempty"`
2979
2980 // ServerResponse contains the HTTP response code and headers from the server.
2981 googleapi.ServerResponse `json:"-"`
2982 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
2983 // unconditionally include in API requests. By default, fields with empty or
2984 // default values are omitted from API requests. See
2985 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2986 // details.
2987 ForceSendFields []string `json:"-"`
2988 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
2989 // requests with the JSON null value. By default, fields with empty values are
2990 // omitted from API requests. See
2991 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2992 NullFields []string `json:"-"`
2993 }
2994
2995 func (s ListOperationsResponse) MarshalJSON() ([]byte, error) {
2996 type NoMethod ListOperationsResponse
2997 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2998 }
2999
3000 // ListVmwareAdminClustersResponse: Response message for listing VMware admin
3001 // clusters.
3002 type ListVmwareAdminClustersResponse struct {
3003 // NextPageToken: A token identifying a page of results the server should
3004 // return. If the token is not empty this means that more results are available
3005 // and should be retrieved by repeating the request with the provided page
3006 // token.
3007 NextPageToken string `json:"nextPageToken,omitempty"`
3008 // Unreachable: Locations that could not be reached.
3009 Unreachable []string `json:"unreachable,omitempty"`
3010 // VmwareAdminClusters: The list of VMware admin cluster.
3011 VmwareAdminClusters []*VmwareAdminCluster `json:"vmwareAdminClusters,omitempty"`
3012
3013 // ServerResponse contains the HTTP response code and headers from the server.
3014 googleapi.ServerResponse `json:"-"`
3015 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3016 // unconditionally include in API requests. By default, fields with empty or
3017 // default values are omitted from API requests. See
3018 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3019 // details.
3020 ForceSendFields []string `json:"-"`
3021 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3022 // requests with the JSON null value. By default, fields with empty values are
3023 // omitted from API requests. See
3024 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3025 NullFields []string `json:"-"`
3026 }
3027
3028 func (s ListVmwareAdminClustersResponse) MarshalJSON() ([]byte, error) {
3029 type NoMethod ListVmwareAdminClustersResponse
3030 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3031 }
3032
3033 // ListVmwareClustersResponse: Response message for listing VMware Clusters.
3034 type ListVmwareClustersResponse struct {
3035 // NextPageToken: A token identifying a page of results the server should
3036 // return. If the token is not empty this means that more results are available
3037 // and should be retrieved by repeating the request with the provided page
3038 // token.
3039 NextPageToken string `json:"nextPageToken,omitempty"`
3040 // Unreachable: Locations that could not be reached.
3041 Unreachable []string `json:"unreachable,omitempty"`
3042 // VmwareClusters: The list of VMware Cluster.
3043 VmwareClusters []*VmwareCluster `json:"vmwareClusters,omitempty"`
3044
3045 // ServerResponse contains the HTTP response code and headers from the server.
3046 googleapi.ServerResponse `json:"-"`
3047 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3048 // unconditionally include in API requests. By default, fields with empty or
3049 // default values are omitted from API requests. See
3050 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3051 // details.
3052 ForceSendFields []string `json:"-"`
3053 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3054 // requests with the JSON null value. By default, fields with empty values are
3055 // omitted from API requests. See
3056 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3057 NullFields []string `json:"-"`
3058 }
3059
3060 func (s ListVmwareClustersResponse) MarshalJSON() ([]byte, error) {
3061 type NoMethod ListVmwareClustersResponse
3062 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3063 }
3064
3065 // ListVmwareNodePoolsResponse: Response message for listing VMware node pools.
3066 type ListVmwareNodePoolsResponse struct {
3067 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3068 // next page. If this field is omitted, there are no subsequent pages.
3069 NextPageToken string `json:"nextPageToken,omitempty"`
3070 // Unreachable: Locations that could not be reached.
3071 Unreachable []string `json:"unreachable,omitempty"`
3072 // VmwareNodePools: The node pools from the specified parent resource.
3073 VmwareNodePools []*VmwareNodePool `json:"vmwareNodePools,omitempty"`
3074
3075 // ServerResponse contains the HTTP response code and headers from the server.
3076 googleapi.ServerResponse `json:"-"`
3077 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3078 // unconditionally include in API requests. By default, fields with empty or
3079 // default values are omitted from API requests. See
3080 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3081 // details.
3082 ForceSendFields []string `json:"-"`
3083 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3084 // requests with the JSON null value. By default, fields with empty values are
3085 // omitted from API requests. See
3086 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3087 NullFields []string `json:"-"`
3088 }
3089
3090 func (s ListVmwareNodePoolsResponse) MarshalJSON() ([]byte, error) {
3091 type NoMethod ListVmwareNodePoolsResponse
3092 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3093 }
3094
3095 // Location: A resource that represents a Google Cloud location.
3096 type Location struct {
3097 // DisplayName: The friendly name for this location, typically a nearby city
3098 // name. For example, "Tokyo".
3099 DisplayName string `json:"displayName,omitempty"`
3100 // Labels: Cross-service attributes for the location. For example
3101 // {"cloud.googleapis.com/region": "us-east1"}
3102 Labels map[string]string `json:"labels,omitempty"`
3103 // LocationId: The canonical id for this location. For example: "us-east1".
3104 LocationId string `json:"locationId,omitempty"`
3105 // Metadata: Service-specific metadata. For example the available capacity at
3106 // the given location.
3107 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
3108 // Name: Resource name for the location, which may vary between
3109 // implementations. For example:
3110 // "projects/example-project/locations/us-east1"
3111 Name string `json:"name,omitempty"`
3112
3113 // ServerResponse contains the HTTP response code and headers from the server.
3114 googleapi.ServerResponse `json:"-"`
3115 // ForceSendFields is a list of field names (e.g. "DisplayName") to
3116 // unconditionally include in API requests. By default, fields with empty or
3117 // default values are omitted from API requests. See
3118 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3119 // details.
3120 ForceSendFields []string `json:"-"`
3121 // NullFields is a list of field names (e.g. "DisplayName") to include in API
3122 // requests with the JSON null value. By default, fields with empty values are
3123 // omitted from API requests. See
3124 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3125 NullFields []string `json:"-"`
3126 }
3127
3128 func (s Location) MarshalJSON() ([]byte, error) {
3129 type NoMethod Location
3130 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3131 }
3132
3133 // Metric: Progress metric is (string, int|float|string) pair.
3134 type Metric struct {
3135 // DoubleValue: For metrics with floating point value.
3136 DoubleValue float64 `json:"doubleValue,omitempty"`
3137 // IntValue: For metrics with integer value.
3138 IntValue int64 `json:"intValue,omitempty,string"`
3139 // Metric: Required. The metric name.
3140 //
3141 // Possible values:
3142 // "METRIC_ID_UNSPECIFIED" - Not set.
3143 // "NODES_TOTAL" - The total number of nodes being actuated.
3144 // "NODES_DRAINING" - The number of nodes draining.
3145 // "NODES_UPGRADING" - The number of nodes actively upgrading.
3146 // "NODES_PENDING_UPGRADE" - The number of nodes to be upgraded.
3147 // "NODES_UPGRADED" - The number of nodes upgraded.
3148 // "NODES_FAILED" - The number of nodes to fail actuation.
3149 // "NODES_HEALTHY" - The number of nodes healthy.
3150 // "NODES_RECONCILING" - The number of nodes reconciling.
3151 // "NODES_IN_MAINTENANCE" - The number of nodes in maintenance mode.
3152 // "PREFLIGHTS_COMPLETED" - The number of completed preflight checks.
3153 // "PREFLIGHTS_RUNNING" - The number of preflight checks running.
3154 // "PREFLIGHTS_FAILED" - The number of preflight checks failed.
3155 // "PREFLIGHTS_TOTAL" - The total number of preflight checks.
3156 Metric string `json:"metric,omitempty"`
3157 // StringValue: For metrics with custom values (ratios, visual progress, etc.).
3158 StringValue string `json:"stringValue,omitempty"`
3159 // ForceSendFields is a list of field names (e.g. "DoubleValue") to
3160 // unconditionally include in API requests. By default, fields with empty or
3161 // default values are omitted from API requests. See
3162 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3163 // details.
3164 ForceSendFields []string `json:"-"`
3165 // NullFields is a list of field names (e.g. "DoubleValue") to include in API
3166 // requests with the JSON null value. By default, fields with empty values are
3167 // omitted from API requests. See
3168 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3169 NullFields []string `json:"-"`
3170 }
3171
3172 func (s Metric) MarshalJSON() ([]byte, error) {
3173 type NoMethod Metric
3174 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3175 }
3176
3177 func (s *Metric) UnmarshalJSON(data []byte) error {
3178 type NoMethod Metric
3179 var s1 struct {
3180 DoubleValue gensupport.JSONFloat64 `json:"doubleValue"`
3181 *NoMethod
3182 }
3183 s1.NoMethod = (*NoMethod)(s)
3184 if err := json.Unmarshal(data, &s1); err != nil {
3185 return err
3186 }
3187 s.DoubleValue = float64(s1.DoubleValue)
3188 return nil
3189 }
3190
3191 // NodeTaint: NodeTaint applied to every Kubernetes node in a node pool.
3192 // Kubernetes taints can be used together with tolerations to control how
3193 // workloads are scheduled to your nodes. Node taints are permanent.
3194 type NodeTaint struct {
3195 // Effect: The taint effect.
3196 //
3197 // Possible values:
3198 // "EFFECT_UNSPECIFIED" - Not set.
3199 // "NO_SCHEDULE" - Do not allow new pods to schedule onto the node unless
3200 // they tolerate the taint, but allow all pods submitted to Kubelet without
3201 // going through the scheduler to start, and allow all already-running pods to
3202 // continue running. Enforced by the scheduler.
3203 // "PREFER_NO_SCHEDULE" - Like TaintEffectNoSchedule, but the scheduler tries
3204 // not to schedule new pods onto the node, rather than prohibiting new pods
3205 // from scheduling onto the node entirely. Enforced by the scheduler.
3206 // "NO_EXECUTE" - Evict any already-running pods that do not tolerate the
3207 // taint. Currently enforced by NodeController.
3208 Effect string `json:"effect,omitempty"`
3209 // Key: Key associated with the effect.
3210 Key string `json:"key,omitempty"`
3211 // Value: Value associated with the effect.
3212 Value string `json:"value,omitempty"`
3213 // ForceSendFields is a list of field names (e.g. "Effect") to unconditionally
3214 // include in API requests. By default, fields with empty or default values are
3215 // omitted from API requests. See
3216 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3217 // details.
3218 ForceSendFields []string `json:"-"`
3219 // NullFields is a list of field names (e.g. "Effect") to include in API
3220 // requests with the JSON null value. By default, fields with empty values are
3221 // omitted from API requests. See
3222 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3223 NullFields []string `json:"-"`
3224 }
3225
3226 func (s NodeTaint) MarshalJSON() ([]byte, error) {
3227 type NoMethod NodeTaint
3228 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3229 }
3230
3231 // Operation: This resource represents a long-running operation that is the
3232 // result of a network API call.
3233 type Operation struct {
3234 // Done: If the value is `false`, it means the operation is still in progress.
3235 // If `true`, the operation is completed, and either `error` or `response` is
3236 // available.
3237 Done bool `json:"done,omitempty"`
3238 // Error: The error result of the operation in case of failure or cancellation.
3239 Error *Status `json:"error,omitempty"`
3240 // Metadata: Service-specific metadata associated with the operation. It
3241 // typically contains progress information and common metadata such as create
3242 // time. Some services might not provide such metadata. Any method that returns
3243 // a long-running operation should document the metadata type, if any.
3244 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
3245 // Name: The server-assigned name, which is only unique within the same service
3246 // that originally returns it. If you use the default HTTP mapping, the `name`
3247 // should be a resource name ending with `operations/{unique_id}`.
3248 Name string `json:"name,omitempty"`
3249 // Response: The normal, successful response of the operation. If the original
3250 // method returns no data on success, such as `Delete`, the response is
3251 // `google.protobuf.Empty`. If the original method is standard
3252 // `Get`/`Create`/`Update`, the response should be the resource. For other
3253 // methods, the response should have the type `XxxResponse`, where `Xxx` is the
3254 // original method name. For example, if the original method name is
3255 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
3256 Response googleapi.RawMessage `json:"response,omitempty"`
3257
3258 // ServerResponse contains the HTTP response code and headers from the server.
3259 googleapi.ServerResponse `json:"-"`
3260 // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") 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 Operation) MarshalJSON() ([]byte, error) {
3274 type NoMethod Operation
3275 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3276 }
3277
3278 // OperationMetadata: Represents the metadata of the long-running operation.
3279 type OperationMetadata struct {
3280 // ApiVersion: Output only. API version used to start the operation.
3281 ApiVersion string `json:"apiVersion,omitempty"`
3282 // ControlPlaneDisconnected: Output only. Denotes if the local managing
3283 // cluster's control plane is currently disconnected. This is expected to occur
3284 // temporarily during self-managed cluster upgrades.
3285 ControlPlaneDisconnected bool `json:"controlPlaneDisconnected,omitempty"`
3286 // CreateTime: Output only. The time the operation was created.
3287 CreateTime string `json:"createTime,omitempty"`
3288 // EndTime: Output only. The time the operation finished running.
3289 EndTime string `json:"endTime,omitempty"`
3290 // Progress: Output only. Detailed progress information for the operation.
3291 Progress *OperationProgress `json:"progress,omitempty"`
3292 // RequestedCancellation: Output only. Identifies whether the user has
3293 // requested cancellation of the operation. Operations that have successfully
3294 // been cancelled have [Operation.error] value with a [google.rpc.Status.code]
3295 // of 1, corresponding to `Code.CANCELLED`.
3296 RequestedCancellation bool `json:"requestedCancellation,omitempty"`
3297 // StatusMessage: Output only. Human-readable status of the operation, if any.
3298 StatusMessage string `json:"statusMessage,omitempty"`
3299 // Target: Output only. Server-defined resource path for the target of the
3300 // operation.
3301 Target string `json:"target,omitempty"`
3302 // Type: Output only. Type of operation being executed.
3303 //
3304 // Possible values:
3305 // "OPERATION_TYPE_UNSPECIFIED" - Not set.
3306 // "CREATE" - The resource is being created.
3307 // "DELETE" - The resource is being deleted.
3308 // "UPDATE" - The resource is being updated.
3309 // "UPGRADE" - The resource is being upgraded.
3310 // "PLATFORM_UPGRADE" - The platform is being upgraded.
3311 Type string `json:"type,omitempty"`
3312 // Verb: Output only. Name of the verb executed by the operation.
3313 Verb string `json:"verb,omitempty"`
3314 // ForceSendFields is a list of field names (e.g. "ApiVersion") to
3315 // unconditionally include in API requests. By default, fields with empty or
3316 // default values are omitted from API requests. See
3317 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3318 // details.
3319 ForceSendFields []string `json:"-"`
3320 // NullFields is a list of field names (e.g. "ApiVersion") to include in API
3321 // requests with the JSON null value. By default, fields with empty values are
3322 // omitted from API requests. See
3323 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3324 NullFields []string `json:"-"`
3325 }
3326
3327 func (s OperationMetadata) MarshalJSON() ([]byte, error) {
3328 type NoMethod OperationMetadata
3329 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3330 }
3331
3332 // OperationProgress: Information about operation progress.
3333 type OperationProgress struct {
3334 // Stages: The stages of the operation.
3335 Stages []*OperationStage `json:"stages,omitempty"`
3336 // ForceSendFields is a list of field names (e.g. "Stages") to unconditionally
3337 // include in API requests. By default, fields with empty or default values are
3338 // omitted from API requests. See
3339 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3340 // details.
3341 ForceSendFields []string `json:"-"`
3342 // NullFields is a list of field names (e.g. "Stages") to include in API
3343 // requests with the JSON null value. By default, fields with empty values are
3344 // omitted from API requests. See
3345 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3346 NullFields []string `json:"-"`
3347 }
3348
3349 func (s OperationProgress) MarshalJSON() ([]byte, error) {
3350 type NoMethod OperationProgress
3351 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3352 }
3353
3354 // OperationStage: Information about a particular stage of an operation.
3355 type OperationStage struct {
3356 // EndTime: Time the stage ended.
3357 EndTime string `json:"endTime,omitempty"`
3358 // Metrics: Progress metric bundle.
3359 Metrics []*Metric `json:"metrics,omitempty"`
3360 // Stage: The high-level stage of the operation.
3361 //
3362 // Possible values:
3363 // "STAGE_UNSPECIFIED" - Not set.
3364 // "PREFLIGHT_CHECK" - Preflight checks are running.
3365 // "CONFIGURE" - Resource is being configured.
3366 // "DEPLOY" - Resource is being deployed.
3367 // "HEALTH_CHECK" - Waiting for the resource to become healthy.
3368 // "UPDATE" - Resource is being updated.
3369 Stage string `json:"stage,omitempty"`
3370 // StartTime: Time the stage started.
3371 StartTime string `json:"startTime,omitempty"`
3372 // State: Output only. State of the stage.
3373 //
3374 // Possible values:
3375 // "STATE_UNSPECIFIED" - Not set.
3376 // "PENDING" - The stage is pending.
3377 // "RUNNING" - The stage is running
3378 // "SUCCEEDED" - The stage has completed successfully.
3379 // "FAILED" - The stage has failed.
3380 State string `json:"state,omitempty"`
3381 // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
3382 // include in API requests. By default, fields with empty or default values are
3383 // omitted from API requests. See
3384 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3385 // details.
3386 ForceSendFields []string `json:"-"`
3387 // NullFields is a list of field names (e.g. "EndTime") to include in API
3388 // requests with the JSON null value. By default, fields with empty values are
3389 // omitted from API requests. See
3390 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3391 NullFields []string `json:"-"`
3392 }
3393
3394 func (s OperationStage) MarshalJSON() ([]byte, error) {
3395 type NoMethod OperationStage
3396 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3397 }
3398
3399 // Policy: An Identity and Access Management (IAM) policy, which specifies
3400 // access controls for Google Cloud resources. A `Policy` is a collection of
3401 // `bindings`. A `binding` binds one or more `members`, or principals, to a
3402 // single `role`. Principals can be user accounts, service accounts, Google
3403 // groups, and domains (such as G Suite). A `role` is a named list of
3404 // permissions; each `role` can be an IAM predefined role or a user-created
3405 // custom role. For some types of Google Cloud resources, a `binding` can also
3406 // specify a `condition`, which is a logical expression that allows access to a
3407 // resource only if the expression evaluates to `true`. A condition can add
3408 // constraints based on attributes of the request, the resource, or both. To
3409 // learn which resources support conditions in their IAM policies, see the IAM
3410 // documentation
3411 // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
3412 // example:** ``` { "bindings": [ { "role":
3413 // "roles/resourcemanager.organizationAdmin", "members": [
3414 // "user:[email protected]", "group:[email protected]", "domain:google.com",
3415 // "serviceAccount:[email protected]" ] }, { "role":
3416 // "roles/resourcemanager.organizationViewer", "members": [
3417 // "user:[email protected]" ], "condition": { "title": "expirable access",
3418 // "description": "Does not grant access after Sep 2020", "expression":
3419 // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
3420 // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
3421 // members: - user:[email protected] - group:[email protected] -
3422 // domain:google.com - serviceAccount:[email protected]
3423 // role: roles/resourcemanager.organizationAdmin - members: -
3424 // user:[email protected] role: roles/resourcemanager.organizationViewer
3425 // condition: title: expirable access description: Does not grant access after
3426 // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
3427 // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
3428 // see the IAM documentation (https://cloud.google.com/iam/docs/).
3429 type Policy struct {
3430 // Bindings: Associates a list of `members`, or principals, with a `role`.
3431 // Optionally, may specify a `condition` that determines how and when the
3432 // `bindings` are applied. Each of the `bindings` must contain at least one
3433 // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
3434 // up to 250 of these principals can be Google groups. Each occurrence of a
3435 // principal counts towards these limits. For example, if the `bindings` grant
3436 // 50 different roles to `user:[email protected]`, and not to any other
3437 // principal, then you can add another 1,450 principals to the `bindings` in
3438 // the `Policy`.
3439 Bindings []*Binding `json:"bindings,omitempty"`
3440 // Etag: `etag` is used for optimistic concurrency control as a way to help
3441 // prevent simultaneous updates of a policy from overwriting each other. It is
3442 // strongly suggested that systems make use of the `etag` in the
3443 // read-modify-write cycle to perform policy updates in order to avoid race
3444 // conditions: An `etag` is returned in the response to `getIamPolicy`, and
3445 // systems are expected to put that etag in the request to `setIamPolicy` to
3446 // ensure that their change will be applied to the same version of the policy.
3447 // **Important:** If you use IAM Conditions, you must include the `etag` field
3448 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows
3449 // you to overwrite a version `3` policy with a version `1` policy, and all of
3450 // the conditions in the version `3` policy are lost.
3451 Etag string `json:"etag,omitempty"`
3452 // Version: Specifies the format of the policy. Valid values are `0`, `1`, and
3453 // `3`. Requests that specify an invalid value are rejected. Any operation that
3454 // affects conditional role bindings must specify version `3`. This requirement
3455 // applies to the following operations: * Getting a policy that includes a
3456 // conditional role binding * Adding a conditional role binding to a policy *
3457 // Changing a conditional role binding in a policy * Removing any role binding,
3458 // with or without a condition, from a policy that includes conditions
3459 // **Important:** If you use IAM Conditions, you must include the `etag` field
3460 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows
3461 // you to overwrite a version `3` policy with a version `1` policy, and all of
3462 // the conditions in the version `3` policy are lost. If a policy does not
3463 // include any conditions, operations on that policy may specify any valid
3464 // version or leave the field unset. To learn which resources support
3465 // conditions in their IAM policies, see the IAM documentation
3466 // (https://cloud.google.com/iam/help/conditions/resource-policies).
3467 Version int64 `json:"version,omitempty"`
3468
3469 // ServerResponse contains the HTTP response code and headers from the server.
3470 googleapi.ServerResponse `json:"-"`
3471 // ForceSendFields is a list of field names (e.g. "Bindings") to
3472 // unconditionally include in API requests. By default, fields with empty or
3473 // default values are omitted from API requests. See
3474 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3475 // details.
3476 ForceSendFields []string `json:"-"`
3477 // NullFields is a list of field names (e.g. "Bindings") to include in API
3478 // requests with the JSON null value. By default, fields with empty values are
3479 // omitted from API requests. See
3480 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3481 NullFields []string `json:"-"`
3482 }
3483
3484 func (s Policy) MarshalJSON() ([]byte, error) {
3485 type NoMethod Policy
3486 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3487 }
3488
3489 // QueryBareMetalAdminVersionConfigResponse: Response message for querying bare
3490 // metal admin cluster version config.
3491 type QueryBareMetalAdminVersionConfigResponse struct {
3492 // Versions: List of available versions to install or to upgrade to.
3493 Versions []*BareMetalVersionInfo `json:"versions,omitempty"`
3494
3495 // ServerResponse contains the HTTP response code and headers from the server.
3496 googleapi.ServerResponse `json:"-"`
3497 // ForceSendFields is a list of field names (e.g. "Versions") to
3498 // unconditionally include in API requests. By default, fields with empty or
3499 // default values are omitted from API requests. See
3500 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3501 // details.
3502 ForceSendFields []string `json:"-"`
3503 // NullFields is a list of field names (e.g. "Versions") to include in API
3504 // requests with the JSON null value. By default, fields with empty values are
3505 // omitted from API requests. See
3506 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3507 NullFields []string `json:"-"`
3508 }
3509
3510 func (s QueryBareMetalAdminVersionConfigResponse) MarshalJSON() ([]byte, error) {
3511 type NoMethod QueryBareMetalAdminVersionConfigResponse
3512 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3513 }
3514
3515 // QueryBareMetalVersionConfigResponse: Response message for querying bare
3516 // metal admin cluster version config.
3517 type QueryBareMetalVersionConfigResponse struct {
3518 // Versions: List of available versions to install or to upgrade to.
3519 Versions []*BareMetalVersionInfo `json:"versions,omitempty"`
3520
3521 // ServerResponse contains the HTTP response code and headers from the server.
3522 googleapi.ServerResponse `json:"-"`
3523 // ForceSendFields is a list of field names (e.g. "Versions") to
3524 // unconditionally include in API requests. By default, fields with empty or
3525 // default values are omitted from API requests. See
3526 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3527 // details.
3528 ForceSendFields []string `json:"-"`
3529 // NullFields is a list of field names (e.g. "Versions") to include in API
3530 // requests with the JSON null value. By default, fields with empty values are
3531 // omitted from API requests. See
3532 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3533 NullFields []string `json:"-"`
3534 }
3535
3536 func (s QueryBareMetalVersionConfigResponse) MarshalJSON() ([]byte, error) {
3537 type NoMethod QueryBareMetalVersionConfigResponse
3538 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3539 }
3540
3541 // QueryVmwareVersionConfigResponse: Response message for querying VMware user
3542 // cluster version config.
3543 type QueryVmwareVersionConfigResponse struct {
3544 // Versions: List of available versions to install or to upgrade to.
3545 Versions []*VmwareVersionInfo `json:"versions,omitempty"`
3546
3547 // ServerResponse contains the HTTP response code and headers from the server.
3548 googleapi.ServerResponse `json:"-"`
3549 // ForceSendFields is a list of field names (e.g. "Versions") to
3550 // unconditionally include in API requests. By default, fields with empty or
3551 // default values are omitted from API requests. See
3552 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3553 // details.
3554 ForceSendFields []string `json:"-"`
3555 // NullFields is a list of field names (e.g. "Versions") to include in API
3556 // requests with the JSON null value. By default, fields with empty values are
3557 // omitted from API requests. See
3558 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3559 NullFields []string `json:"-"`
3560 }
3561
3562 func (s QueryVmwareVersionConfigResponse) MarshalJSON() ([]byte, error) {
3563 type NoMethod QueryVmwareVersionConfigResponse
3564 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3565 }
3566
3567 // ResourceCondition: ResourceCondition provides a standard mechanism for
3568 // higher-level status reporting from controller.
3569 type ResourceCondition struct {
3570 // LastTransitionTime: Last time the condition transit from one status to
3571 // another.
3572 LastTransitionTime string `json:"lastTransitionTime,omitempty"`
3573 // Message: Human-readable message indicating details about last transition.
3574 Message string `json:"message,omitempty"`
3575 // Reason: Machine-readable message indicating details about last transition.
3576 Reason string `json:"reason,omitempty"`
3577 // State: state of the condition.
3578 //
3579 // Possible values:
3580 // "STATE_UNSPECIFIED" - Not set.
3581 // "STATE_TRUE" - Resource is in the condition.
3582 // "STATE_FALSE" - Resource is not in the condition.
3583 // "STATE_UNKNOWN" - Kubernetes controller can't decide if the resource is in
3584 // the condition or not.
3585 State string `json:"state,omitempty"`
3586 // Type: Type of the condition. (e.g., ClusterRunning, NodePoolRunning or
3587 // ServerSidePreflightReady)
3588 Type string `json:"type,omitempty"`
3589 // ForceSendFields is a list of field names (e.g. "LastTransitionTime") to
3590 // unconditionally include in API requests. By default, fields with empty or
3591 // default values are omitted from API requests. See
3592 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3593 // details.
3594 ForceSendFields []string `json:"-"`
3595 // NullFields is a list of field names (e.g. "LastTransitionTime") to include
3596 // in API requests with the JSON null value. By default, fields with empty
3597 // values are omitted from API requests. See
3598 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3599 NullFields []string `json:"-"`
3600 }
3601
3602 func (s ResourceCondition) MarshalJSON() ([]byte, error) {
3603 type NoMethod ResourceCondition
3604 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3605 }
3606
3607 // ResourceStatus: ResourceStatus describes why a cluster or node pool has a
3608 // certain status. (e.g., ERROR or DEGRADED).
3609 type ResourceStatus struct {
3610 // Conditions: ResourceCondition provide a standard mechanism for higher-level
3611 // status reporting from controller.
3612 Conditions []*ResourceCondition `json:"conditions,omitempty"`
3613 // ErrorMessage: Human-friendly representation of the error message from
3614 // controller. The error message can be temporary as the controller controller
3615 // creates a cluster or node pool. If the error message persists for a longer
3616 // period of time, it can be used to surface error message to indicate real
3617 // problems requiring user intervention.
3618 ErrorMessage string `json:"errorMessage,omitempty"`
3619 // Version: Reflect current version of the resource.
3620 Version string `json:"version,omitempty"`
3621 // Versions: Shows the mapping of a given version to the number of machines
3622 // under this version.
3623 Versions *Versions `json:"versions,omitempty"`
3624 // ForceSendFields is a list of field names (e.g. "Conditions") to
3625 // unconditionally include in API requests. By default, fields with empty or
3626 // default values are omitted from API requests. See
3627 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3628 // details.
3629 ForceSendFields []string `json:"-"`
3630 // NullFields is a list of field names (e.g. "Conditions") to include in API
3631 // requests with the JSON null value. By default, fields with empty values are
3632 // omitted from API requests. See
3633 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3634 NullFields []string `json:"-"`
3635 }
3636
3637 func (s ResourceStatus) MarshalJSON() ([]byte, error) {
3638 type NoMethod ResourceStatus
3639 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3640 }
3641
3642 // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
3643 type SetIamPolicyRequest struct {
3644 // Policy: REQUIRED: The complete policy to be applied to the `resource`. The
3645 // size of the policy is limited to a few 10s of KB. An empty policy is a valid
3646 // policy but certain Google Cloud services (such as Projects) might reject
3647 // them.
3648 Policy *Policy `json:"policy,omitempty"`
3649 // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
3650 // include in API requests. By default, fields with empty or default values are
3651 // omitted from API requests. See
3652 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3653 // details.
3654 ForceSendFields []string `json:"-"`
3655 // NullFields is a list of field names (e.g. "Policy") to include in API
3656 // requests with the JSON null value. By default, fields with empty values are
3657 // omitted from API requests. See
3658 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3659 NullFields []string `json:"-"`
3660 }
3661
3662 func (s SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
3663 type NoMethod SetIamPolicyRequest
3664 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3665 }
3666
3667 // Status: The `Status` type defines a logical error model that is suitable for
3668 // different programming environments, including REST APIs and RPC APIs. It is
3669 // used by gRPC (https://github.com/grpc). Each `Status` message contains three
3670 // pieces of data: error code, error message, and error details. You can find
3671 // out more about this error model and how to work with it in the API Design
3672 // Guide (https://cloud.google.com/apis/design/errors).
3673 type Status struct {
3674 // Code: The status code, which should be an enum value of google.rpc.Code.
3675 Code int64 `json:"code,omitempty"`
3676 // Details: A list of messages that carry the error details. There is a common
3677 // set of message types for APIs to use.
3678 Details []googleapi.RawMessage `json:"details,omitempty"`
3679 // Message: A developer-facing error message, which should be in English. Any
3680 // user-facing error message should be localized and sent in the
3681 // google.rpc.Status.details field, or localized by the client.
3682 Message string `json:"message,omitempty"`
3683 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
3684 // include in API requests. By default, fields with empty or default values are
3685 // omitted from API requests. See
3686 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3687 // details.
3688 ForceSendFields []string `json:"-"`
3689 // NullFields is a list of field names (e.g. "Code") to include in API requests
3690 // with the JSON null value. By default, fields with empty values are omitted
3691 // from API requests. See
3692 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3693 NullFields []string `json:"-"`
3694 }
3695
3696 func (s Status) MarshalJSON() ([]byte, error) {
3697 type NoMethod Status
3698 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3699 }
3700
3701 // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
3702 type TestIamPermissionsRequest struct {
3703 // Permissions: The set of permissions to check for the `resource`. Permissions
3704 // with wildcards (such as `*` or `storage.*`) are not allowed. For more
3705 // information see IAM Overview
3706 // (https://cloud.google.com/iam/docs/overview#permissions).
3707 Permissions []string `json:"permissions,omitempty"`
3708 // ForceSendFields is a list of field names (e.g. "Permissions") to
3709 // unconditionally include in API requests. By default, fields with empty or
3710 // default values are omitted from API requests. See
3711 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3712 // details.
3713 ForceSendFields []string `json:"-"`
3714 // NullFields is a list of field names (e.g. "Permissions") to include in API
3715 // requests with the JSON null value. By default, fields with empty values are
3716 // omitted from API requests. See
3717 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3718 NullFields []string `json:"-"`
3719 }
3720
3721 func (s TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
3722 type NoMethod TestIamPermissionsRequest
3723 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3724 }
3725
3726 // TestIamPermissionsResponse: Response message for `TestIamPermissions`
3727 // method.
3728 type TestIamPermissionsResponse struct {
3729 // Permissions: A subset of `TestPermissionsRequest.permissions` that the
3730 // caller is allowed.
3731 Permissions []string `json:"permissions,omitempty"`
3732
3733 // ServerResponse contains the HTTP response code and headers from the server.
3734 googleapi.ServerResponse `json:"-"`
3735 // ForceSendFields is a list of field names (e.g. "Permissions") to
3736 // unconditionally include in API requests. By default, fields with empty or
3737 // default values are omitted from API requests. See
3738 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3739 // details.
3740 ForceSendFields []string `json:"-"`
3741 // NullFields is a list of field names (e.g. "Permissions") to include in API
3742 // requests with the JSON null value. By default, fields with empty values are
3743 // omitted from API requests. See
3744 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3745 NullFields []string `json:"-"`
3746 }
3747
3748 func (s TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
3749 type NoMethod TestIamPermissionsResponse
3750 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3751 }
3752
3753 // UpgradeDependency: UpgradeDependency represents a dependency when upgrading
3754 // a resource.
3755 type UpgradeDependency struct {
3756 // CurrentVersion: Current version of the dependency e.g. 1.15.0.
3757 CurrentVersion string `json:"currentVersion,omitempty"`
3758 // Membership: Membership names are formatted as
3759 // `projects//locations//memberships/`.
3760 Membership string `json:"membership,omitempty"`
3761 // ResourceName: Resource name of the dependency.
3762 ResourceName string `json:"resourceName,omitempty"`
3763 // TargetVersion: Target version of the dependency e.g. 1.16.1. This is the
3764 // version the dependency needs to be upgraded to before a resource can be
3765 // upgraded.
3766 TargetVersion string `json:"targetVersion,omitempty"`
3767 // ForceSendFields is a list of field names (e.g. "CurrentVersion") to
3768 // unconditionally include in API requests. By default, fields with empty or
3769 // default values are omitted from API requests. See
3770 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3771 // details.
3772 ForceSendFields []string `json:"-"`
3773 // NullFields is a list of field names (e.g. "CurrentVersion") to include in
3774 // API requests with the JSON null value. By default, fields with empty values
3775 // are omitted from API requests. See
3776 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3777 NullFields []string `json:"-"`
3778 }
3779
3780 func (s UpgradeDependency) MarshalJSON() ([]byte, error) {
3781 type NoMethod UpgradeDependency
3782 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3783 }
3784
3785 // ValidationCheck: ValidationCheck represents the result of preflight check.
3786 type ValidationCheck struct {
3787 // Option: Options used for the validation check
3788 //
3789 // Possible values:
3790 // "OPTIONS_UNSPECIFIED" - Default value. Standard preflight validation check
3791 // will be used.
3792 // "SKIP_VALIDATION_CHECK_BLOCKING" - Prevent failed preflight checks from
3793 // failing.
3794 // "SKIP_VALIDATION_ALL" - Skip all preflight check validations.
3795 Option string `json:"option,omitempty"`
3796 // Scenario: Output only. The scenario when the preflight checks were run.
3797 //
3798 // Possible values:
3799 // "SCENARIO_UNSPECIFIED" - Default value. This value is unused.
3800 // "CREATE" - The validation check occurred during a create flow.
3801 // "UPDATE" - The validation check occurred during an update flow.
3802 Scenario string `json:"scenario,omitempty"`
3803 // Status: Output only. The detailed validation check status.
3804 Status *ValidationCheckStatus `json:"status,omitempty"`
3805 // ForceSendFields is a list of field names (e.g. "Option") to unconditionally
3806 // include in API requests. By default, fields with empty or default values are
3807 // omitted from API requests. See
3808 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3809 // details.
3810 ForceSendFields []string `json:"-"`
3811 // NullFields is a list of field names (e.g. "Option") to include in API
3812 // requests with the JSON null value. By default, fields with empty values are
3813 // omitted from API requests. See
3814 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3815 NullFields []string `json:"-"`
3816 }
3817
3818 func (s ValidationCheck) MarshalJSON() ([]byte, error) {
3819 type NoMethod ValidationCheck
3820 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3821 }
3822
3823 // ValidationCheckResult: ValidationCheckResult defines the details about the
3824 // validation check.
3825 type ValidationCheckResult struct {
3826 // Category: The category of the validation.
3827 Category string `json:"category,omitempty"`
3828 // Description: The description of the validation check.
3829 Description string `json:"description,omitempty"`
3830 // Details: Detailed failure information, which might be unformatted.
3831 Details string `json:"details,omitempty"`
3832 // Reason: A human-readable message of the check failure.
3833 Reason string `json:"reason,omitempty"`
3834 // State: The validation check state.
3835 //
3836 // Possible values:
3837 // "STATE_UNKNOWN" - The default value. The check result is unknown.
3838 // "STATE_FAILURE" - The check failed.
3839 // "STATE_SKIPPED" - The check was skipped.
3840 // "STATE_FATAL" - The check itself failed to complete.
3841 // "STATE_WARNING" - The check encountered a warning.
3842 State string `json:"state,omitempty"`
3843 // ForceSendFields is a list of field names (e.g. "Category") to
3844 // unconditionally include in API requests. By default, fields with empty or
3845 // default values are omitted from API requests. See
3846 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3847 // details.
3848 ForceSendFields []string `json:"-"`
3849 // NullFields is a list of field names (e.g. "Category") to include in API
3850 // requests with the JSON null value. By default, fields with empty values are
3851 // omitted from API requests. See
3852 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3853 NullFields []string `json:"-"`
3854 }
3855
3856 func (s ValidationCheckResult) MarshalJSON() ([]byte, error) {
3857 type NoMethod ValidationCheckResult
3858 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3859 }
3860
3861 // ValidationCheckStatus: ValidationCheckStatus defines the detailed validation
3862 // check status.
3863 type ValidationCheckStatus struct {
3864 // Result: Individual checks which failed as part of the Preflight check
3865 // execution.
3866 Result []*ValidationCheckResult `json:"result,omitempty"`
3867 // ForceSendFields is a list of field names (e.g. "Result") to unconditionally
3868 // include in API requests. By default, fields with empty or default values are
3869 // omitted from API requests. See
3870 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3871 // details.
3872 ForceSendFields []string `json:"-"`
3873 // NullFields is a list of field names (e.g. "Result") to include in API
3874 // requests with the JSON null value. By default, fields with empty values are
3875 // omitted from API requests. See
3876 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3877 NullFields []string `json:"-"`
3878 }
3879
3880 func (s ValidationCheckStatus) MarshalJSON() ([]byte, error) {
3881 type NoMethod ValidationCheckStatus
3882 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3883 }
3884
3885 // Version: Version describes the number of nodes at a given version under a
3886 // resource.
3887 type Version struct {
3888 // Count: Number of machines under the above version.
3889 Count int64 `json:"count,omitempty,string"`
3890 // Version: Resource version.
3891 Version string `json:"version,omitempty"`
3892 // ForceSendFields is a list of field names (e.g. "Count") to unconditionally
3893 // include in API requests. By default, fields with empty or default values are
3894 // omitted from API requests. See
3895 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3896 // details.
3897 ForceSendFields []string `json:"-"`
3898 // NullFields is a list of field names (e.g. "Count") to include in API
3899 // requests with the JSON null value. By default, fields with empty values are
3900 // omitted from API requests. See
3901 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3902 NullFields []string `json:"-"`
3903 }
3904
3905 func (s Version) MarshalJSON() ([]byte, error) {
3906 type NoMethod Version
3907 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3908 }
3909
3910 // Versions: Versions describes the mapping of a given version to the number of
3911 // machines under this version.
3912 type Versions struct {
3913 // Versions: Shows the mapping of a given version to the number of machines
3914 // under this version.
3915 Versions []*Version `json:"versions,omitempty"`
3916 // ForceSendFields is a list of field names (e.g. "Versions") to
3917 // unconditionally include in API requests. By default, fields with empty or
3918 // default values are omitted from API requests. See
3919 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3920 // details.
3921 ForceSendFields []string `json:"-"`
3922 // NullFields is a list of field names (e.g. "Versions") to include in API
3923 // requests with the JSON null value. By default, fields with empty values are
3924 // omitted from API requests. See
3925 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3926 NullFields []string `json:"-"`
3927 }
3928
3929 func (s Versions) MarshalJSON() ([]byte, error) {
3930 type NoMethod Versions
3931 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3932 }
3933
3934 // VmwareAAGConfig: Specifies anti affinity group config for the VMware user
3935 // cluster.
3936 type VmwareAAGConfig struct {
3937 // AagConfigDisabled: Spread nodes across at least three physical hosts
3938 // (requires at least three hosts). Enabled by default.
3939 AagConfigDisabled bool `json:"aagConfigDisabled,omitempty"`
3940 // ForceSendFields is a list of field names (e.g. "AagConfigDisabled") to
3941 // unconditionally include in API requests. By default, fields with empty or
3942 // default values are omitted from API requests. See
3943 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3944 // details.
3945 ForceSendFields []string `json:"-"`
3946 // NullFields is a list of field names (e.g. "AagConfigDisabled") to include in
3947 // API requests with the JSON null value. By default, fields with empty values
3948 // are omitted from API requests. See
3949 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3950 NullFields []string `json:"-"`
3951 }
3952
3953 func (s VmwareAAGConfig) MarshalJSON() ([]byte, error) {
3954 type NoMethod VmwareAAGConfig
3955 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3956 }
3957
3958 // VmwareAddressPool: Represents an IP pool used by the load balancer.
3959 type VmwareAddressPool struct {
3960 // Addresses: Required. The addresses that are part of this pool. Each address
3961 // must be either in the CIDR form (1.2.3.0/24) or range form
3962 // (1.2.3.1-1.2.3.5).
3963 Addresses []string `json:"addresses,omitempty"`
3964 // AvoidBuggyIps: If true, avoid using IPs ending in .0 or .255. This avoids
3965 // buggy consumer devices mistakenly dropping IPv4 traffic for those special IP
3966 // addresses.
3967 AvoidBuggyIps bool `json:"avoidBuggyIps,omitempty"`
3968 // ManualAssign: If true, prevent IP addresses from being automatically
3969 // assigned.
3970 ManualAssign bool `json:"manualAssign,omitempty"`
3971 // Pool: Required. The name of the address pool.
3972 Pool string `json:"pool,omitempty"`
3973 // ForceSendFields is a list of field names (e.g. "Addresses") to
3974 // unconditionally include in API requests. By default, fields with empty or
3975 // default values are omitted from API requests. See
3976 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3977 // details.
3978 ForceSendFields []string `json:"-"`
3979 // NullFields is a list of field names (e.g. "Addresses") to include in API
3980 // requests with the JSON null value. By default, fields with empty values are
3981 // omitted from API requests. See
3982 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3983 NullFields []string `json:"-"`
3984 }
3985
3986 func (s VmwareAddressPool) MarshalJSON() ([]byte, error) {
3987 type NoMethod VmwareAddressPool
3988 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3989 }
3990
3991 // VmwareAdminAddonNodeConfig: VmwareAdminAddonNodeConfig contains add-on node
3992 // configurations for VMware admin cluster.
3993 type VmwareAdminAddonNodeConfig struct {
3994 // AutoResizeConfig: VmwareAutoResizeConfig config specifies auto resize
3995 // config.
3996 AutoResizeConfig *VmwareAutoResizeConfig `json:"autoResizeConfig,omitempty"`
3997 // ForceSendFields is a list of field names (e.g. "AutoResizeConfig") to
3998 // unconditionally include in API requests. By default, fields with empty or
3999 // default values are omitted from API requests. See
4000 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4001 // details.
4002 ForceSendFields []string `json:"-"`
4003 // NullFields is a list of field names (e.g. "AutoResizeConfig") to include in
4004 // API requests with the JSON null value. By default, fields with empty values
4005 // are omitted from API requests. See
4006 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4007 NullFields []string `json:"-"`
4008 }
4009
4010 func (s VmwareAdminAddonNodeConfig) MarshalJSON() ([]byte, error) {
4011 type NoMethod VmwareAdminAddonNodeConfig
4012 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4013 }
4014
4015 // VmwareAdminAuthorizationConfig: VmwareAdminAuthorizationConfig represents
4016 // configuration for admin cluster authorization.
4017 type VmwareAdminAuthorizationConfig struct {
4018 // ViewerUsers: For VMware admin clusters, users will be granted the
4019 // cluster-viewer role on the cluster.
4020 ViewerUsers []*ClusterUser `json:"viewerUsers,omitempty"`
4021 // ForceSendFields is a list of field names (e.g. "ViewerUsers") to
4022 // unconditionally include in API requests. By default, fields with empty or
4023 // default values are omitted from API requests. See
4024 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4025 // details.
4026 ForceSendFields []string `json:"-"`
4027 // NullFields is a list of field names (e.g. "ViewerUsers") to include in API
4028 // requests with the JSON null value. By default, fields with empty values are
4029 // omitted from API requests. See
4030 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4031 NullFields []string `json:"-"`
4032 }
4033
4034 func (s VmwareAdminAuthorizationConfig) MarshalJSON() ([]byte, error) {
4035 type NoMethod VmwareAdminAuthorizationConfig
4036 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4037 }
4038
4039 // VmwareAdminCluster: Resource that represents a VMware admin cluster.
4040 type VmwareAdminCluster struct {
4041 // AddonNode: The VMware admin cluster addon node configuration.
4042 AddonNode *VmwareAdminAddonNodeConfig `json:"addonNode,omitempty"`
4043 // Annotations: Annotations on the VMware admin cluster. This field has the
4044 // same restrictions as Kubernetes annotations. The total size of all keys and
4045 // values combined is limited to 256k. Key can have 2 segments: prefix
4046 // (optional) and name (required), separated by a slash (/). Prefix must be a
4047 // DNS subdomain. Name must be 63 characters or less, begin and end with
4048 // alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics
4049 // between.
4050 Annotations map[string]string `json:"annotations,omitempty"`
4051 // AntiAffinityGroups: The VMware admin cluster anti affinity group
4052 // configuration.
4053 AntiAffinityGroups *VmwareAAGConfig `json:"antiAffinityGroups,omitempty"`
4054 // Authorization: The VMware admin cluster authorization configuration.
4055 Authorization *VmwareAdminAuthorizationConfig `json:"authorization,omitempty"`
4056 // AutoRepairConfig: The VMware admin cluster auto repair configuration.
4057 AutoRepairConfig *VmwareAutoRepairConfig `json:"autoRepairConfig,omitempty"`
4058 // BootstrapClusterMembership: The bootstrap cluster this VMware admin cluster
4059 // belongs to.
4060 BootstrapClusterMembership string `json:"bootstrapClusterMembership,omitempty"`
4061 // ControlPlaneNode: The VMware admin cluster control plane node configuration.
4062 ControlPlaneNode *VmwareAdminControlPlaneNodeConfig `json:"controlPlaneNode,omitempty"`
4063 // CreateTime: Output only. The time at which VMware admin cluster was created.
4064 CreateTime string `json:"createTime,omitempty"`
4065 // Description: A human readable description of this VMware admin cluster.
4066 Description string `json:"description,omitempty"`
4067 // EnableAdvancedCluster: Enable advanced cluster.
4068 EnableAdvancedCluster bool `json:"enableAdvancedCluster,omitempty"`
4069 // Endpoint: Output only. The DNS name of VMware admin cluster's API server.
4070 Endpoint string `json:"endpoint,omitempty"`
4071 // Etag: This checksum is computed by the server based on the value of other
4072 // fields, and may be sent on update and delete requests to ensure the client
4073 // has an up-to-date value before proceeding. Allows clients to perform
4074 // consistent read-modify-writes through optimistic concurrency control.
4075 Etag string `json:"etag,omitempty"`
4076 // Fleet: Output only. Fleet configuration for the cluster.
4077 Fleet *Fleet `json:"fleet,omitempty"`
4078 // ImageType: The OS image type for the VMware admin cluster.
4079 ImageType string `json:"imageType,omitempty"`
4080 // LoadBalancer: The VMware admin cluster load balancer configuration.
4081 LoadBalancer *VmwareAdminLoadBalancerConfig `json:"loadBalancer,omitempty"`
4082 // LocalName: Output only. The object name of the VMware OnPremAdminCluster
4083 // custom resource. This field is used to support conflicting names when
4084 // enrolling existing clusters to the API. When used as a part of cluster
4085 // enrollment, this field will differ from the ID in the resource name. For new
4086 // clusters, this field will match the user provided cluster name and be
4087 // visible in the last component of the resource name. It is not modifiable.
4088 // All users should use this name to access their cluster using gkectl or
4089 // kubectl and should expect to see the local name when viewing admin cluster
4090 // controller logs.
4091 LocalName string `json:"localName,omitempty"`
4092 // Name: Immutable. The VMware admin cluster resource name.
4093 Name string `json:"name,omitempty"`
4094 // NetworkConfig: The VMware admin cluster network configuration.
4095 NetworkConfig *VmwareAdminNetworkConfig `json:"networkConfig,omitempty"`
4096 // OnPremVersion: The Anthos clusters on the VMware version for the admin
4097 // cluster.
4098 OnPremVersion string `json:"onPremVersion,omitempty"`
4099 // PlatformConfig: The VMware platform configuration.
4100 PlatformConfig *VmwarePlatformConfig `json:"platformConfig,omitempty"`
4101 // PreparedSecrets: Output only. The VMware admin cluster prepared secrets
4102 // configuration. It should always be enabled by the Central API, instead of
4103 // letting users set it.
4104 PreparedSecrets *VmwareAdminPreparedSecretsConfig `json:"preparedSecrets,omitempty"`
4105 // PrivateRegistryConfig: Configuration for registry.
4106 PrivateRegistryConfig *VmwareAdminPrivateRegistryConfig `json:"privateRegistryConfig,omitempty"`
4107 // Proxy: Configuration for proxy.
4108 Proxy *VmwareAdminProxy `json:"proxy,omitempty"`
4109 // Reconciling: Output only. If set, there are currently changes in flight to
4110 // the VMware admin cluster.
4111 Reconciling bool `json:"reconciling,omitempty"`
4112 // State: Output only. The current state of VMware admin cluster.
4113 //
4114 // Possible values:
4115 // "STATE_UNSPECIFIED" - Not set.
4116 // "PROVISIONING" - The PROVISIONING state indicates the cluster is being
4117 // created.
4118 // "RUNNING" - The RUNNING state indicates the cluster has been created and
4119 // is fully usable.
4120 // "RECONCILING" - The RECONCILING state indicates that the cluster is being
4121 // updated. It remains available, but potentially with degraded performance.
4122 // "STOPPING" - The STOPPING state indicates the cluster is being deleted.
4123 // "ERROR" - The ERROR state indicates the cluster is in a broken
4124 // unrecoverable state.
4125 // "DEGRADED" - The DEGRADED state indicates the cluster requires user action
4126 // to restore full functionality.
4127 State string `json:"state,omitempty"`
4128 // Status: Output only. ResourceStatus representing detailed cluster state.
4129 Status *ResourceStatus `json:"status,omitempty"`
4130 // Uid: Output only. The unique identifier of the VMware admin cluster.
4131 Uid string `json:"uid,omitempty"`
4132 // UpdateTime: Output only. The time at which VMware admin cluster was last
4133 // updated.
4134 UpdateTime string `json:"updateTime,omitempty"`
4135 // ValidationCheck: Output only. ValidationCheck represents the result of the
4136 // preflight check job.
4137 ValidationCheck *ValidationCheck `json:"validationCheck,omitempty"`
4138 // Vcenter: The VMware admin cluster VCenter configuration.
4139 Vcenter *VmwareAdminVCenterConfig `json:"vcenter,omitempty"`
4140
4141 // ServerResponse contains the HTTP response code and headers from the server.
4142 googleapi.ServerResponse `json:"-"`
4143 // ForceSendFields is a list of field names (e.g. "AddonNode") to
4144 // unconditionally include in API requests. By default, fields with empty or
4145 // default values are omitted from API requests. See
4146 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4147 // details.
4148 ForceSendFields []string `json:"-"`
4149 // NullFields is a list of field names (e.g. "AddonNode") to include in API
4150 // requests with the JSON null value. By default, fields with empty values are
4151 // omitted from API requests. See
4152 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4153 NullFields []string `json:"-"`
4154 }
4155
4156 func (s VmwareAdminCluster) MarshalJSON() ([]byte, error) {
4157 type NoMethod VmwareAdminCluster
4158 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4159 }
4160
4161 // VmwareAdminControlPlaneNodeConfig: VmwareAdminControlPlaneNodeConfig
4162 // contains control plane node configuration for VMware admin cluster.
4163 type VmwareAdminControlPlaneNodeConfig struct {
4164 // Cpus: The number of vCPUs for the control-plane node of the admin cluster.
4165 Cpus int64 `json:"cpus,omitempty,string"`
4166 // Memory: The number of mebibytes of memory for the control-plane node of the
4167 // admin cluster.
4168 Memory int64 `json:"memory,omitempty,string"`
4169 // Replicas: The number of control plane nodes for this VMware admin cluster.
4170 // (default: 1 replica).
4171 Replicas int64 `json:"replicas,omitempty,string"`
4172 // ForceSendFields is a list of field names (e.g. "Cpus") to unconditionally
4173 // include in API requests. By default, fields with empty or default values are
4174 // omitted from API requests. See
4175 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4176 // details.
4177 ForceSendFields []string `json:"-"`
4178 // NullFields is a list of field names (e.g. "Cpus") to include in API requests
4179 // with the JSON null value. By default, fields with empty values are omitted
4180 // from API requests. See
4181 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4182 NullFields []string `json:"-"`
4183 }
4184
4185 func (s VmwareAdminControlPlaneNodeConfig) MarshalJSON() ([]byte, error) {
4186 type NoMethod VmwareAdminControlPlaneNodeConfig
4187 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4188 }
4189
4190 // VmwareAdminF5BigIpConfig: VmwareAdminF5BigIpConfig represents configuration
4191 // parameters for an F5 BIG-IP load balancer.
4192 type VmwareAdminF5BigIpConfig struct {
4193 // Address: The load balancer's IP address.
4194 Address string `json:"address,omitempty"`
4195 // Partition: The preexisting partition to be used by the load balancer. This
4196 // partition is usually created for the admin cluster for example:
4197 // 'my-f5-admin-partition'.
4198 Partition string `json:"partition,omitempty"`
4199 // SnatPool: The pool name. Only necessary, if using SNAT.
4200 SnatPool string `json:"snatPool,omitempty"`
4201 // ForceSendFields is a list of field names (e.g. "Address") to unconditionally
4202 // include in API requests. By default, fields with empty or default values are
4203 // omitted from API requests. See
4204 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4205 // details.
4206 ForceSendFields []string `json:"-"`
4207 // NullFields is a list of field names (e.g. "Address") to include in API
4208 // requests with the JSON null value. By default, fields with empty values are
4209 // omitted from API requests. See
4210 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4211 NullFields []string `json:"-"`
4212 }
4213
4214 func (s VmwareAdminF5BigIpConfig) MarshalJSON() ([]byte, error) {
4215 type NoMethod VmwareAdminF5BigIpConfig
4216 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4217 }
4218
4219 // VmwareAdminHAControlPlaneConfig: Specifies HA admin control plane config.
4220 type VmwareAdminHAControlPlaneConfig struct {
4221 // ControlPlaneIpBlock: Static IP addresses for the admin control plane nodes.
4222 ControlPlaneIpBlock *VmwareIpBlock `json:"controlPlaneIpBlock,omitempty"`
4223 // ForceSendFields is a list of field names (e.g. "ControlPlaneIpBlock") to
4224 // unconditionally include in API requests. By default, fields with empty or
4225 // default values are omitted from API requests. See
4226 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4227 // details.
4228 ForceSendFields []string `json:"-"`
4229 // NullFields is a list of field names (e.g. "ControlPlaneIpBlock") to include
4230 // in API requests with the JSON null value. By default, fields with empty
4231 // values are omitted from API requests. See
4232 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4233 NullFields []string `json:"-"`
4234 }
4235
4236 func (s VmwareAdminHAControlPlaneConfig) MarshalJSON() ([]byte, error) {
4237 type NoMethod VmwareAdminHAControlPlaneConfig
4238 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4239 }
4240
4241 // VmwareAdminLoadBalancerConfig: VmwareAdminLoadBalancerConfig contains load
4242 // balancer configuration for VMware admin cluster.
4243 type VmwareAdminLoadBalancerConfig struct {
4244 // F5Config: Configuration for F5 Big IP typed load balancers.
4245 F5Config *VmwareAdminF5BigIpConfig `json:"f5Config,omitempty"`
4246 // ManualLbConfig: Manually configured load balancers.
4247 ManualLbConfig *VmwareAdminManualLbConfig `json:"manualLbConfig,omitempty"`
4248 // MetalLbConfig: MetalLB load balancers.
4249 MetalLbConfig *VmwareAdminMetalLbConfig `json:"metalLbConfig,omitempty"`
4250 // SeesawConfig: Output only. Configuration for Seesaw typed load balancers.
4251 SeesawConfig *VmwareAdminSeesawConfig `json:"seesawConfig,omitempty"`
4252 // VipConfig: The VIPs used by the load balancer.
4253 VipConfig *VmwareAdminVipConfig `json:"vipConfig,omitempty"`
4254 // ForceSendFields is a list of field names (e.g. "F5Config") to
4255 // unconditionally include in API requests. By default, fields with empty or
4256 // default values are omitted from API requests. See
4257 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4258 // details.
4259 ForceSendFields []string `json:"-"`
4260 // NullFields is a list of field names (e.g. "F5Config") to include in API
4261 // requests with the JSON null value. By default, fields with empty values are
4262 // omitted from API requests. See
4263 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4264 NullFields []string `json:"-"`
4265 }
4266
4267 func (s VmwareAdminLoadBalancerConfig) MarshalJSON() ([]byte, error) {
4268 type NoMethod VmwareAdminLoadBalancerConfig
4269 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4270 }
4271
4272 type VmwareAdminManualLbConfig struct {
4273 // AddonsNodePort: NodePort for add-ons server in the admin cluster.
4274 AddonsNodePort int64 `json:"addonsNodePort,omitempty"`
4275 // ControlPlaneNodePort: NodePort for control plane service. The Kubernetes API
4276 // server in the admin cluster is implemented as a Service of type NodePort
4277 // (ex. 30968).
4278 ControlPlaneNodePort int64 `json:"controlPlaneNodePort,omitempty"`
4279 // IngressHttpNodePort: NodePort for ingress service's http. The ingress
4280 // service in the admin cluster is implemented as a Service of type NodePort
4281 // (ex. 32527).
4282 IngressHttpNodePort int64 `json:"ingressHttpNodePort,omitempty"`
4283 // IngressHttpsNodePort: NodePort for ingress service's https. The ingress
4284 // service in the admin cluster is implemented as a Service of type NodePort
4285 // (ex. 30139).
4286 IngressHttpsNodePort int64 `json:"ingressHttpsNodePort,omitempty"`
4287 // KonnectivityServerNodePort: NodePort for konnectivity server service running
4288 // as a sidecar in each kube-apiserver pod (ex. 30564).
4289 KonnectivityServerNodePort int64 `json:"konnectivityServerNodePort,omitempty"`
4290 // ForceSendFields is a list of field names (e.g. "AddonsNodePort") to
4291 // unconditionally include in API requests. By default, fields with empty or
4292 // default values are omitted from API requests. See
4293 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4294 // details.
4295 ForceSendFields []string `json:"-"`
4296 // NullFields is a list of field names (e.g. "AddonsNodePort") to include in
4297 // API requests with the JSON null value. By default, fields with empty values
4298 // are omitted from API requests. See
4299 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4300 NullFields []string `json:"-"`
4301 }
4302
4303 func (s VmwareAdminManualLbConfig) MarshalJSON() ([]byte, error) {
4304 type NoMethod VmwareAdminManualLbConfig
4305 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4306 }
4307
4308 // VmwareAdminMetalLbConfig: VmwareAdminMetalLbConfig represents configuration
4309 // parameters for a MetalLB load balancer. For admin clusters, currently no
4310 // configurations is needed.
4311 type VmwareAdminMetalLbConfig struct {
4312 // Enabled: Whether MetalLB is enabled.
4313 Enabled bool `json:"enabled,omitempty"`
4314 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
4315 // include in API requests. By default, fields with empty or default values are
4316 // omitted from API requests. See
4317 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4318 // details.
4319 ForceSendFields []string `json:"-"`
4320 // NullFields is a list of field names (e.g. "Enabled") to include in API
4321 // requests with the JSON null value. By default, fields with empty values are
4322 // omitted from API requests. See
4323 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4324 NullFields []string `json:"-"`
4325 }
4326
4327 func (s VmwareAdminMetalLbConfig) MarshalJSON() ([]byte, error) {
4328 type NoMethod VmwareAdminMetalLbConfig
4329 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4330 }
4331
4332 // VmwareAdminNetworkConfig: VmwareAdminNetworkConfig contains network
4333 // configuration for VMware admin cluster.
4334 type VmwareAdminNetworkConfig struct {
4335 // DhcpIpConfig: Configuration settings for a DHCP IP configuration.
4336 DhcpIpConfig *VmwareDhcpIpConfig `json:"dhcpIpConfig,omitempty"`
4337 // HaControlPlaneConfig: Configuration for HA admin cluster control plane.
4338 HaControlPlaneConfig *VmwareAdminHAControlPlaneConfig `json:"haControlPlaneConfig,omitempty"`
4339 // HostConfig: Represents common network settings irrespective of the host's IP
4340 // address.
4341 HostConfig *VmwareHostConfig `json:"hostConfig,omitempty"`
4342 // PodAddressCidrBlocks: Required. All pods in the cluster are assigned an
4343 // RFC1918 IPv4 address from these ranges. Only a single range is supported.
4344 // This field cannot be changed after creation.
4345 PodAddressCidrBlocks []string `json:"podAddressCidrBlocks,omitempty"`
4346 // ServiceAddressCidrBlocks: Required. All services in the cluster are assigned
4347 // an RFC1918 IPv4 address from these ranges. Only a single range is supported.
4348 // This field cannot be changed after creation.
4349 ServiceAddressCidrBlocks []string `json:"serviceAddressCidrBlocks,omitempty"`
4350 // StaticIpConfig: Configuration settings for a static IP configuration.
4351 StaticIpConfig *VmwareStaticIpConfig `json:"staticIpConfig,omitempty"`
4352 // VcenterNetwork: vcenter_network specifies vCenter network name.
4353 VcenterNetwork string `json:"vcenterNetwork,omitempty"`
4354 // ForceSendFields is a list of field names (e.g. "DhcpIpConfig") to
4355 // unconditionally include in API requests. By default, fields with empty or
4356 // default values are omitted from API requests. See
4357 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4358 // details.
4359 ForceSendFields []string `json:"-"`
4360 // NullFields is a list of field names (e.g. "DhcpIpConfig") to include in API
4361 // requests with the JSON null value. By default, fields with empty values are
4362 // omitted from API requests. See
4363 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4364 NullFields []string `json:"-"`
4365 }
4366
4367 func (s VmwareAdminNetworkConfig) MarshalJSON() ([]byte, error) {
4368 type NoMethod VmwareAdminNetworkConfig
4369 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4370 }
4371
4372 // VmwareAdminPreparedSecretsConfig: VmwareAdminPreparedSecretsConfig
4373 // represents configuration for admin cluster prepared secrets.
4374 type VmwareAdminPreparedSecretsConfig struct {
4375 // Enabled: Whether prepared secrets is enabled.
4376 Enabled bool `json:"enabled,omitempty"`
4377 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
4378 // include in API requests. By default, fields with empty or default values are
4379 // omitted from API requests. See
4380 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4381 // details.
4382 ForceSendFields []string `json:"-"`
4383 // NullFields is a list of field names (e.g. "Enabled") to include in API
4384 // requests with the JSON null value. By default, fields with empty values are
4385 // omitted from API requests. See
4386 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4387 NullFields []string `json:"-"`
4388 }
4389
4390 func (s VmwareAdminPreparedSecretsConfig) MarshalJSON() ([]byte, error) {
4391 type NoMethod VmwareAdminPreparedSecretsConfig
4392 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4393 }
4394
4395 // VmwareAdminPrivateRegistryConfig: VmwareAdminPrivateRegistryConfig
4396 // represents configuration for admin cluster registry.
4397 type VmwareAdminPrivateRegistryConfig struct {
4398 // Address: The registry address.
4399 Address string `json:"address,omitempty"`
4400 // CaCert: When the container runtime pulls an image from private registry, the
4401 // registry must prove its identity by presenting a certificate. The registry's
4402 // certificate is signed by a certificate authority (CA). The container runtime
4403 // uses the CA's certificate to validate the registry's certificate.
4404 CaCert string `json:"caCert,omitempty"`
4405 // ForceSendFields is a list of field names (e.g. "Address") to unconditionally
4406 // include in API requests. By default, fields with empty or default values are
4407 // omitted from API requests. See
4408 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4409 // details.
4410 ForceSendFields []string `json:"-"`
4411 // NullFields is a list of field names (e.g. "Address") to include in API
4412 // requests with the JSON null value. By default, fields with empty values are
4413 // omitted from API requests. See
4414 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4415 NullFields []string `json:"-"`
4416 }
4417
4418 func (s VmwareAdminPrivateRegistryConfig) MarshalJSON() ([]byte, error) {
4419 type NoMethod VmwareAdminPrivateRegistryConfig
4420 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4421 }
4422
4423 // VmwareAdminProxy: VmwareAdminProxy represents configuration for admin
4424 // cluster proxy.
4425 type VmwareAdminProxy struct {
4426 // NoProxy: A comma-separated list of IP addresses, IP address ranges, host
4427 // names, and domain names that should not go through the proxy server. When
4428 // Google Distributed Cloud sends a request to one of these addresses, hosts,
4429 // or domains, the request is sent directly.
4430 NoProxy string `json:"noProxy,omitempty"`
4431 // Url: The HTTP address of proxy server.
4432 Url string `json:"url,omitempty"`
4433 // ForceSendFields is a list of field names (e.g. "NoProxy") to unconditionally
4434 // include in API requests. By default, fields with empty or default values are
4435 // omitted from API requests. See
4436 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4437 // details.
4438 ForceSendFields []string `json:"-"`
4439 // NullFields is a list of field names (e.g. "NoProxy") to include in API
4440 // requests with the JSON null value. By default, fields with empty values are
4441 // omitted from API requests. See
4442 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4443 NullFields []string `json:"-"`
4444 }
4445
4446 func (s VmwareAdminProxy) MarshalJSON() ([]byte, error) {
4447 type NoMethod VmwareAdminProxy
4448 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4449 }
4450
4451 // VmwareAdminSeesawConfig: VmwareSeesawConfig represents configuration
4452 // parameters for an already existing Seesaw load balancer. IMPORTANT: Please
4453 // note that the Anthos On-Prem API will not generate or update Seesaw
4454 // configurations it can only bind a pre-existing configuration to a new user
4455 // cluster. IMPORTANT: When attempting to create a user cluster with a
4456 // pre-existing Seesaw load balancer you will need to follow some preparation
4457 // steps before calling the 'CreateVmwareCluster' API method. First you will
4458 // need to create the user cluster's namespace via kubectl. The namespace will
4459 // need to use the following naming convention : -gke-onprem-mgmt or
4460 // -gke-onprem-mgmt depending on whether you used the
4461 // 'VmwareCluster.local_name' to disambiguate collisions; for more context see
4462 // the documentation of 'VmwareCluster.local_name'. Once the namespace is
4463 // created you will need to create a secret resource via kubectl. This secret
4464 // will contain copies of your Seesaw credentials. The Secret must be called
4465 // 'user-cluster-creds' and contain Seesaw's SSH and Cert credentials. The
4466 // credentials must be keyed with the following names:
4467 // 'seesaw-ssh-private-key', 'seesaw-ssh-public-key', 'seesaw-ssh-ca-key',
4468 // 'seesaw-ssh-ca-cert'.
4469 type VmwareAdminSeesawConfig struct {
4470 // EnableHa: Enable two load balancer VMs to achieve a highly-available Seesaw
4471 // load balancer.
4472 EnableHa bool `json:"enableHa,omitempty"`
4473 // Group: In general the following format should be used for the Seesaw group
4474 // name: seesaw-for-[cluster_name].
4475 Group string `json:"group,omitempty"`
4476 // IpBlocks: The IP Blocks to be used by the Seesaw load balancer
4477 IpBlocks []*VmwareIpBlock `json:"ipBlocks,omitempty"`
4478 // MasterIp: MasterIP is the IP announced by the master of Seesaw group.
4479 MasterIp string `json:"masterIp,omitempty"`
4480 // StackdriverName: Name to be used by Stackdriver.
4481 StackdriverName string `json:"stackdriverName,omitempty"`
4482 // Vms: Names of the VMs created for this Seesaw group.
4483 Vms []string `json:"vms,omitempty"`
4484 // ForceSendFields is a list of field names (e.g. "EnableHa") to
4485 // unconditionally include in API requests. By default, fields with empty or
4486 // default values are omitted from API requests. See
4487 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4488 // details.
4489 ForceSendFields []string `json:"-"`
4490 // NullFields is a list of field names (e.g. "EnableHa") to include in API
4491 // requests with the JSON null value. By default, fields with empty values are
4492 // omitted from API requests. See
4493 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4494 NullFields []string `json:"-"`
4495 }
4496
4497 func (s VmwareAdminSeesawConfig) MarshalJSON() ([]byte, error) {
4498 type NoMethod VmwareAdminSeesawConfig
4499 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4500 }
4501
4502 // VmwareAdminVCenterConfig: VmwareAdminVCenterConfig contains VCenter
4503 // configuration for VMware admin cluster.
4504 type VmwareAdminVCenterConfig struct {
4505 // Address: The vCenter IP address.
4506 Address string `json:"address,omitempty"`
4507 // CaCertData: Contains the vCenter CA certificate public key for SSL
4508 // verification.
4509 CaCertData string `json:"caCertData,omitempty"`
4510 // Cluster: The name of the vCenter cluster for the admin cluster.
4511 Cluster string `json:"cluster,omitempty"`
4512 // DataDisk: The name of the virtual machine disk (VMDK) for the admin cluster.
4513 DataDisk string `json:"dataDisk,omitempty"`
4514 // Datacenter: The name of the vCenter datacenter for the admin cluster.
4515 Datacenter string `json:"datacenter,omitempty"`
4516 // Datastore: The name of the vCenter datastore for the admin cluster.
4517 Datastore string `json:"datastore,omitempty"`
4518 // Folder: The name of the vCenter folder for the admin cluster.
4519 Folder string `json:"folder,omitempty"`
4520 // ResourcePool: The name of the vCenter resource pool for the admin cluster.
4521 ResourcePool string `json:"resourcePool,omitempty"`
4522 // StoragePolicyName: The name of the vCenter storage policy for the user
4523 // cluster.
4524 StoragePolicyName string `json:"storagePolicyName,omitempty"`
4525 // ForceSendFields is a list of field names (e.g. "Address") to unconditionally
4526 // include in API requests. By default, fields with empty or default values are
4527 // omitted from API requests. See
4528 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4529 // details.
4530 ForceSendFields []string `json:"-"`
4531 // NullFields is a list of field names (e.g. "Address") to include in API
4532 // requests with the JSON null value. By default, fields with empty values are
4533 // omitted from API requests. See
4534 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4535 NullFields []string `json:"-"`
4536 }
4537
4538 func (s VmwareAdminVCenterConfig) MarshalJSON() ([]byte, error) {
4539 type NoMethod VmwareAdminVCenterConfig
4540 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4541 }
4542
4543 // VmwareAdminVipConfig: VmwareAdminVipConfig for VMware load balancer
4544 // configurations.
4545 type VmwareAdminVipConfig struct {
4546 // AddonsVip: The VIP to configure the load balancer for add-ons.
4547 AddonsVip string `json:"addonsVip,omitempty"`
4548 // ControlPlaneVip: The VIP which you previously set aside for the Kubernetes
4549 // API of the admin cluster.
4550 ControlPlaneVip string `json:"controlPlaneVip,omitempty"`
4551 // ForceSendFields is a list of field names (e.g. "AddonsVip") 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. "AddonsVip") 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 VmwareAdminVipConfig) MarshalJSON() ([]byte, error) {
4565 type NoMethod VmwareAdminVipConfig
4566 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4567 }
4568
4569 // VmwareAutoRepairConfig: Specifies config to enable/disable auto repair. The
4570 // cluster-health-controller is deployed only if Enabled is true.
4571 type VmwareAutoRepairConfig struct {
4572 // Enabled: Whether auto repair is enabled.
4573 Enabled bool `json:"enabled,omitempty"`
4574 // ForceSendFields is a list of field names (e.g. "Enabled") 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. "Enabled") 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 VmwareAutoRepairConfig) MarshalJSON() ([]byte, error) {
4588 type NoMethod VmwareAutoRepairConfig
4589 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4590 }
4591
4592 // VmwareAutoResizeConfig: Represents auto resizing configurations for the
4593 // VMware user cluster.
4594 type VmwareAutoResizeConfig struct {
4595 // Enabled: Whether to enable controle plane node auto resizing.
4596 Enabled bool `json:"enabled,omitempty"`
4597 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
4598 // include in API requests. By default, fields with empty or default values are
4599 // omitted from API requests. See
4600 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4601 // details.
4602 ForceSendFields []string `json:"-"`
4603 // NullFields is a list of field names (e.g. "Enabled") to include in API
4604 // requests with the JSON null value. By default, fields with empty values are
4605 // omitted from API requests. See
4606 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4607 NullFields []string `json:"-"`
4608 }
4609
4610 func (s VmwareAutoResizeConfig) MarshalJSON() ([]byte, error) {
4611 type NoMethod VmwareAutoResizeConfig
4612 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4613 }
4614
4615 // VmwareBundleConfig: VmwareBundleConfig represents configuration for the
4616 // bundle.
4617 type VmwareBundleConfig struct {
4618 // Status: Output only. Resource status for the bundle.
4619 Status *ResourceStatus `json:"status,omitempty"`
4620 // Version: The version of the bundle.
4621 Version string `json:"version,omitempty"`
4622 // ForceSendFields is a list of field names (e.g. "Status") to unconditionally
4623 // include in API requests. By default, fields with empty or default values are
4624 // omitted from API requests. See
4625 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4626 // details.
4627 ForceSendFields []string `json:"-"`
4628 // NullFields is a list of field names (e.g. "Status") to include in API
4629 // requests with the JSON null value. By default, fields with empty values are
4630 // omitted from API requests. See
4631 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4632 NullFields []string `json:"-"`
4633 }
4634
4635 func (s VmwareBundleConfig) MarshalJSON() ([]byte, error) {
4636 type NoMethod VmwareBundleConfig
4637 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4638 }
4639
4640 // VmwareCluster: Resource that represents a VMware user cluster. ##
4641 type VmwareCluster struct {
4642 // AdminClusterMembership: Required. The admin cluster this VMware user cluster
4643 // belongs to. This is the full resource name of the admin cluster's fleet
4644 // membership. In the future, references to other resource types might be
4645 // allowed if admin clusters are modeled as their own resources.
4646 AdminClusterMembership string `json:"adminClusterMembership,omitempty"`
4647 // AdminClusterName: Output only. The resource name of the VMware admin cluster
4648 // hosting this user cluster.
4649 AdminClusterName string `json:"adminClusterName,omitempty"`
4650 // Annotations: Annotations on the VMware user cluster. This field has the same
4651 // restrictions as Kubernetes annotations. The total size of all keys and
4652 // values combined is limited to 256k. Key can have 2 segments: prefix
4653 // (optional) and name (required), separated by a slash (/). Prefix must be a
4654 // DNS subdomain. Name must be 63 characters or less, begin and end with
4655 // alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics
4656 // between.
4657 Annotations map[string]string `json:"annotations,omitempty"`
4658 // AntiAffinityGroups: AAGConfig specifies whether to spread VMware user
4659 // cluster nodes across at least three physical hosts in the datacenter.
4660 AntiAffinityGroups *VmwareAAGConfig `json:"antiAffinityGroups,omitempty"`
4661 // Authorization: RBAC policy that will be applied and managed by the Anthos
4662 // On-Prem API.
4663 Authorization *Authorization `json:"authorization,omitempty"`
4664 // AutoRepairConfig: Configuration for auto repairing.
4665 AutoRepairConfig *VmwareAutoRepairConfig `json:"autoRepairConfig,omitempty"`
4666 // BinaryAuthorization: Binary Authorization related configurations.
4667 BinaryAuthorization *BinaryAuthorization `json:"binaryAuthorization,omitempty"`
4668 // ControlPlaneNode: VMware user cluster control plane nodes must have either 1
4669 // or 3 replicas.
4670 ControlPlaneNode *VmwareControlPlaneNodeConfig `json:"controlPlaneNode,omitempty"`
4671 // CreateTime: Output only. The time at which VMware user cluster was created.
4672 CreateTime string `json:"createTime,omitempty"`
4673 // DataplaneV2: VmwareDataplaneV2Config specifies configuration for Dataplane
4674 // V2.
4675 DataplaneV2 *VmwareDataplaneV2Config `json:"dataplaneV2,omitempty"`
4676 // DeleteTime: Output only. The time at which VMware user cluster was deleted.
4677 DeleteTime string `json:"deleteTime,omitempty"`
4678 // Description: A human readable description of this VMware user cluster.
4679 Description string `json:"description,omitempty"`
4680 // DisableBundledIngress: Disable bundled ingress.
4681 DisableBundledIngress bool `json:"disableBundledIngress,omitempty"`
4682 // EnableAdvancedCluster: Enable advanced cluster.
4683 EnableAdvancedCluster bool `json:"enableAdvancedCluster,omitempty"`
4684 // EnableControlPlaneV2: Enable control plane V2. Default to false.
4685 EnableControlPlaneV2 bool `json:"enableControlPlaneV2,omitempty"`
4686 // Endpoint: Output only. The DNS name of VMware user cluster's API server.
4687 Endpoint string `json:"endpoint,omitempty"`
4688 // Etag: This checksum is computed by the server based on the value of other
4689 // fields, and may be sent on update and delete requests to ensure the client
4690 // has an up-to-date value before proceeding. Allows clients to perform
4691 // consistent read-modify-writes through optimistic concurrency control.
4692 Etag string `json:"etag,omitempty"`
4693 // Fleet: Output only. Fleet configuration for the cluster.
4694 Fleet *Fleet `json:"fleet,omitempty"`
4695 // LoadBalancer: Load balancer configuration.
4696 LoadBalancer *VmwareLoadBalancerConfig `json:"loadBalancer,omitempty"`
4697 // LocalName: Output only. The object name of the VMware OnPremUserCluster
4698 // custom resource on the associated admin cluster. This field is used to
4699 // support conflicting names when enrolling existing clusters to the API. When
4700 // used as a part of cluster enrollment, this field will differ from the ID in
4701 // the resource name. For new clusters, this field will match the user provided
4702 // cluster name and be visible in the last component of the resource name. It
4703 // is not modifiable. All users should use this name to access their cluster
4704 // using gkectl or kubectl and should expect to see the local name when viewing
4705 // admin cluster controller logs.
4706 LocalName string `json:"localName,omitempty"`
4707 // Name: Immutable. The VMware user cluster resource name.
4708 Name string `json:"name,omitempty"`
4709 // NetworkConfig: The VMware user cluster network configuration.
4710 NetworkConfig *VmwareNetworkConfig `json:"networkConfig,omitempty"`
4711 // OnPremVersion: Required. The Anthos clusters on the VMware version for your
4712 // user cluster.
4713 OnPremVersion string `json:"onPremVersion,omitempty"`
4714 // Reconciling: Output only. If set, there are currently changes in flight to
4715 // the VMware user cluster.
4716 Reconciling bool `json:"reconciling,omitempty"`
4717 // State: Output only. The current state of VMware user cluster.
4718 //
4719 // Possible values:
4720 // "STATE_UNSPECIFIED" - Not set.
4721 // "PROVISIONING" - The PROVISIONING state indicates the cluster is being
4722 // created.
4723 // "RUNNING" - The RUNNING state indicates the cluster has been created and
4724 // is fully usable.
4725 // "RECONCILING" - The RECONCILING state indicates that the cluster is being
4726 // updated. It remains available, but potentially with degraded performance.
4727 // "STOPPING" - The STOPPING state indicates the cluster is being deleted.
4728 // "ERROR" - The ERROR state indicates the cluster is in a broken
4729 // unrecoverable state.
4730 // "DEGRADED" - The DEGRADED state indicates the cluster requires user action
4731 // to restore full functionality.
4732 State string `json:"state,omitempty"`
4733 // Status: Output only. ResourceStatus representing detailed cluster state.
4734 Status *ResourceStatus `json:"status,omitempty"`
4735 // Storage: Storage configuration.
4736 Storage *VmwareStorageConfig `json:"storage,omitempty"`
4737 // Uid: Output only. The unique identifier of the VMware user cluster.
4738 Uid string `json:"uid,omitempty"`
4739 // UpdateTime: Output only. The time at which VMware user cluster was last
4740 // updated.
4741 UpdateTime string `json:"updateTime,omitempty"`
4742 // UpgradePolicy: Specifies upgrade policy for the cluster.
4743 UpgradePolicy *VmwareClusterUpgradePolicy `json:"upgradePolicy,omitempty"`
4744 // ValidationCheck: Output only. ValidationCheck represents the result of the
4745 // preflight check job.
4746 ValidationCheck *ValidationCheck `json:"validationCheck,omitempty"`
4747 // Vcenter: VmwareVCenterConfig specifies vCenter config for the user cluster.
4748 // If unspecified, it is inherited from the admin cluster.
4749 Vcenter *VmwareVCenterConfig `json:"vcenter,omitempty"`
4750 // VmTrackingEnabled: Enable VM tracking.
4751 VmTrackingEnabled bool `json:"vmTrackingEnabled,omitempty"`
4752
4753 // ServerResponse contains the HTTP response code and headers from the server.
4754 googleapi.ServerResponse `json:"-"`
4755 // ForceSendFields is a list of field names (e.g. "AdminClusterMembership") to
4756 // unconditionally include in API requests. By default, fields with empty or
4757 // default values are omitted from API requests. See
4758 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4759 // details.
4760 ForceSendFields []string `json:"-"`
4761 // NullFields is a list of field names (e.g. "AdminClusterMembership") to
4762 // include in API requests with the JSON null value. By default, fields with
4763 // empty values are omitted from API requests. See
4764 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4765 NullFields []string `json:"-"`
4766 }
4767
4768 func (s VmwareCluster) MarshalJSON() ([]byte, error) {
4769 type NoMethod VmwareCluster
4770 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4771 }
4772
4773 // VmwareClusterUpgradePolicy: VmwareClusterUpgradePolicy defines the cluster
4774 // upgrade policy.
4775 type VmwareClusterUpgradePolicy struct {
4776 // ControlPlaneOnly: Controls whether the upgrade applies to the control plane
4777 // only.
4778 ControlPlaneOnly bool `json:"controlPlaneOnly,omitempty"`
4779 // ForceSendFields is a list of field names (e.g. "ControlPlaneOnly") to
4780 // unconditionally include in API requests. By default, fields with empty or
4781 // default values are omitted from API requests. See
4782 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4783 // details.
4784 ForceSendFields []string `json:"-"`
4785 // NullFields is a list of field names (e.g. "ControlPlaneOnly") to include in
4786 // API requests with the JSON null value. By default, fields with empty values
4787 // are omitted from API requests. See
4788 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4789 NullFields []string `json:"-"`
4790 }
4791
4792 func (s VmwareClusterUpgradePolicy) MarshalJSON() ([]byte, error) {
4793 type NoMethod VmwareClusterUpgradePolicy
4794 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4795 }
4796
4797 // VmwareControlPlaneNodeConfig: Specifies control plane node config for the
4798 // VMware user cluster.
4799 type VmwareControlPlaneNodeConfig struct {
4800 // AutoResizeConfig: AutoResizeConfig provides auto resizing configurations.
4801 AutoResizeConfig *VmwareAutoResizeConfig `json:"autoResizeConfig,omitempty"`
4802 // Cpus: The number of CPUs for each admin cluster node that serve as control
4803 // planes for this VMware user cluster. (default: 4 CPUs)
4804 Cpus int64 `json:"cpus,omitempty,string"`
4805 // Memory: The megabytes of memory for each admin cluster node that serves as a
4806 // control plane for this VMware user cluster (default: 8192 MB memory).
4807 Memory int64 `json:"memory,omitempty,string"`
4808 // Replicas: The number of control plane nodes for this VMware user cluster.
4809 // (default: 1 replica).
4810 Replicas int64 `json:"replicas,omitempty,string"`
4811 // VsphereConfig: Vsphere-specific config.
4812 VsphereConfig *VmwareControlPlaneVsphereConfig `json:"vsphereConfig,omitempty"`
4813 // ForceSendFields is a list of field names (e.g. "AutoResizeConfig") to
4814 // unconditionally include in API requests. By default, fields with empty or
4815 // default values are omitted from API requests. See
4816 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4817 // details.
4818 ForceSendFields []string `json:"-"`
4819 // NullFields is a list of field names (e.g. "AutoResizeConfig") to include in
4820 // API requests with the JSON null value. By default, fields with empty values
4821 // are omitted from API requests. See
4822 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4823 NullFields []string `json:"-"`
4824 }
4825
4826 func (s VmwareControlPlaneNodeConfig) MarshalJSON() ([]byte, error) {
4827 type NoMethod VmwareControlPlaneNodeConfig
4828 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4829 }
4830
4831 // VmwareControlPlaneV2Config: Specifies control plane V2 config.
4832 type VmwareControlPlaneV2Config struct {
4833 // ControlPlaneIpBlock: Static IP addresses for the control plane nodes.
4834 ControlPlaneIpBlock *VmwareIpBlock `json:"controlPlaneIpBlock,omitempty"`
4835 // ForceSendFields is a list of field names (e.g. "ControlPlaneIpBlock") to
4836 // unconditionally include in API requests. By default, fields with empty or
4837 // default values are omitted from API requests. See
4838 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4839 // details.
4840 ForceSendFields []string `json:"-"`
4841 // NullFields is a list of field names (e.g. "ControlPlaneIpBlock") to include
4842 // in API requests with the JSON null value. By default, fields with empty
4843 // values are omitted from API requests. See
4844 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4845 NullFields []string `json:"-"`
4846 }
4847
4848 func (s VmwareControlPlaneV2Config) MarshalJSON() ([]byte, error) {
4849 type NoMethod VmwareControlPlaneV2Config
4850 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4851 }
4852
4853 // VmwareControlPlaneVsphereConfig: Specifies control plane node config.
4854 type VmwareControlPlaneVsphereConfig struct {
4855 // Datastore: The Vsphere datastore used by the control plane Node.
4856 Datastore string `json:"datastore,omitempty"`
4857 // StoragePolicyName: The Vsphere storage policy used by the control plane
4858 // Node.
4859 StoragePolicyName string `json:"storagePolicyName,omitempty"`
4860 // ForceSendFields is a list of field names (e.g. "Datastore") to
4861 // unconditionally include in API requests. By default, fields with empty or
4862 // default values are omitted from API requests. See
4863 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4864 // details.
4865 ForceSendFields []string `json:"-"`
4866 // NullFields is a list of field names (e.g. "Datastore") to include in API
4867 // requests with the JSON null value. By default, fields with empty values are
4868 // omitted from API requests. See
4869 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4870 NullFields []string `json:"-"`
4871 }
4872
4873 func (s VmwareControlPlaneVsphereConfig) MarshalJSON() ([]byte, error) {
4874 type NoMethod VmwareControlPlaneVsphereConfig
4875 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4876 }
4877
4878 // VmwareDataplaneV2Config: Contains configurations for Dataplane V2, which is
4879 // optimized dataplane for Kubernetes networking. For more information, see:
4880 // https://cloud.google.com/kubernetes-engine/docs/concepts/dataplane-v2
4881 type VmwareDataplaneV2Config struct {
4882 // AdvancedNetworking: Enable advanced networking which requires
4883 // dataplane_v2_enabled to be set true.
4884 AdvancedNetworking bool `json:"advancedNetworking,omitempty"`
4885 // DataplaneV2Enabled: Enables Dataplane V2.
4886 DataplaneV2Enabled bool `json:"dataplaneV2Enabled,omitempty"`
4887 // ForwardMode: Configure ForwardMode for Dataplane v2.
4888 ForwardMode string `json:"forwardMode,omitempty"`
4889 // WindowsDataplaneV2Enabled: Enable Dataplane V2 for clusters with Windows
4890 // nodes.
4891 WindowsDataplaneV2Enabled bool `json:"windowsDataplaneV2Enabled,omitempty"`
4892 // ForceSendFields is a list of field names (e.g. "AdvancedNetworking") to
4893 // unconditionally include in API requests. By default, fields with empty or
4894 // default values are omitted from API requests. See
4895 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4896 // details.
4897 ForceSendFields []string `json:"-"`
4898 // NullFields is a list of field names (e.g. "AdvancedNetworking") to include
4899 // in API requests with the JSON null value. By default, fields with empty
4900 // values are omitted from API requests. See
4901 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4902 NullFields []string `json:"-"`
4903 }
4904
4905 func (s VmwareDataplaneV2Config) MarshalJSON() ([]byte, error) {
4906 type NoMethod VmwareDataplaneV2Config
4907 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4908 }
4909
4910 // VmwareDhcpIpConfig: Represents the network configuration required for the
4911 // VMware user clusters with DHCP IP configurations.
4912 type VmwareDhcpIpConfig struct {
4913 // Enabled: enabled is a flag to mark if DHCP IP allocation is used for VMware
4914 // user clusters.
4915 Enabled bool `json:"enabled,omitempty"`
4916 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
4917 // include in API requests. By default, fields with empty or default values are
4918 // omitted from API requests. See
4919 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4920 // details.
4921 ForceSendFields []string `json:"-"`
4922 // NullFields is a list of field names (e.g. "Enabled") to include in API
4923 // requests with the JSON null value. By default, fields with empty values are
4924 // omitted from API requests. See
4925 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4926 NullFields []string `json:"-"`
4927 }
4928
4929 func (s VmwareDhcpIpConfig) MarshalJSON() ([]byte, error) {
4930 type NoMethod VmwareDhcpIpConfig
4931 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4932 }
4933
4934 // VmwareF5BigIpConfig: Represents configuration parameters for an F5 BIG-IP
4935 // load balancer.
4936 type VmwareF5BigIpConfig struct {
4937 // Address: The load balancer's IP address.
4938 Address string `json:"address,omitempty"`
4939 // Partition: The preexisting partition to be used by the load balancer. This
4940 // partition is usually created for the admin cluster for example:
4941 // 'my-f5-admin-partition'.
4942 Partition string `json:"partition,omitempty"`
4943 // SnatPool: The pool name. Only necessary, if using SNAT.
4944 SnatPool string `json:"snatPool,omitempty"`
4945 // ForceSendFields is a list of field names (e.g. "Address") to unconditionally
4946 // include in API requests. By default, fields with empty or default values are
4947 // omitted from API requests. See
4948 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4949 // details.
4950 ForceSendFields []string `json:"-"`
4951 // NullFields is a list of field names (e.g. "Address") to include in API
4952 // requests with the JSON null value. By default, fields with empty values are
4953 // omitted from API requests. See
4954 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4955 NullFields []string `json:"-"`
4956 }
4957
4958 func (s VmwareF5BigIpConfig) MarshalJSON() ([]byte, error) {
4959 type NoMethod VmwareF5BigIpConfig
4960 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4961 }
4962
4963 // VmwareHostConfig: Represents the common parameters for all the hosts
4964 // irrespective of their IP address.
4965 type VmwareHostConfig struct {
4966 // DnsSearchDomains: DNS search domains.
4967 DnsSearchDomains []string `json:"dnsSearchDomains,omitempty"`
4968 // DnsServers: DNS servers.
4969 DnsServers []string `json:"dnsServers,omitempty"`
4970 // NtpServers: NTP servers.
4971 NtpServers []string `json:"ntpServers,omitempty"`
4972 // ForceSendFields is a list of field names (e.g. "DnsSearchDomains") to
4973 // unconditionally include in API requests. By default, fields with empty or
4974 // default values are omitted from API requests. See
4975 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4976 // details.
4977 ForceSendFields []string `json:"-"`
4978 // NullFields is a list of field names (e.g. "DnsSearchDomains") to include in
4979 // API requests with the JSON null value. By default, fields with empty values
4980 // are omitted from API requests. See
4981 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4982 NullFields []string `json:"-"`
4983 }
4984
4985 func (s VmwareHostConfig) MarshalJSON() ([]byte, error) {
4986 type NoMethod VmwareHostConfig
4987 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4988 }
4989
4990 // VmwareHostIp: Represents VMware user cluster node's network configuration.
4991 type VmwareHostIp struct {
4992 // Hostname: Hostname of the machine. VM's name will be used if this field is
4993 // empty.
4994 Hostname string `json:"hostname,omitempty"`
4995 // Ip: IP could be an IP address (like 1.2.3.4) or a CIDR (like 1.2.3.0/24).
4996 Ip string `json:"ip,omitempty"`
4997 // ForceSendFields is a list of field names (e.g. "Hostname") to
4998 // unconditionally include in API requests. By default, fields with empty or
4999 // default values are omitted from API requests. See
5000 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5001 // details.
5002 ForceSendFields []string `json:"-"`
5003 // NullFields is a list of field names (e.g. "Hostname") to include in API
5004 // requests with the JSON null value. By default, fields with empty values are
5005 // omitted from API requests. See
5006 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5007 NullFields []string `json:"-"`
5008 }
5009
5010 func (s VmwareHostIp) MarshalJSON() ([]byte, error) {
5011 type NoMethod VmwareHostIp
5012 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5013 }
5014
5015 // VmwareIpBlock: Represents a collection of IP addresses to assign to nodes.
5016 type VmwareIpBlock struct {
5017 // Gateway: The network gateway used by the VMware user cluster.
5018 Gateway string `json:"gateway,omitempty"`
5019 // Ips: The node's network configurations used by the VMware user cluster.
5020 Ips []*VmwareHostIp `json:"ips,omitempty"`
5021 // Netmask: The netmask used by the VMware user cluster.
5022 Netmask string `json:"netmask,omitempty"`
5023 // ForceSendFields is a list of field names (e.g. "Gateway") to unconditionally
5024 // include in API requests. By default, fields with empty or default values are
5025 // omitted from API requests. See
5026 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5027 // details.
5028 ForceSendFields []string `json:"-"`
5029 // NullFields is a list of field names (e.g. "Gateway") to include in API
5030 // requests with the JSON null value. By default, fields with empty values are
5031 // omitted from API requests. See
5032 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5033 NullFields []string `json:"-"`
5034 }
5035
5036 func (s VmwareIpBlock) MarshalJSON() ([]byte, error) {
5037 type NoMethod VmwareIpBlock
5038 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5039 }
5040
5041 // VmwareLoadBalancerConfig: Specifies the locad balancer config for the VMware
5042 // user cluster.
5043 type VmwareLoadBalancerConfig struct {
5044 // F5Config: Configuration for F5 Big IP typed load balancers.
5045 F5Config *VmwareF5BigIpConfig `json:"f5Config,omitempty"`
5046 // ManualLbConfig: Manually configured load balancers.
5047 ManualLbConfig *VmwareManualLbConfig `json:"manualLbConfig,omitempty"`
5048 // MetalLbConfig: Configuration for MetalLB typed load balancers.
5049 MetalLbConfig *VmwareMetalLbConfig `json:"metalLbConfig,omitempty"`
5050 // SeesawConfig: Output only. Configuration for Seesaw typed load balancers.
5051 SeesawConfig *VmwareSeesawConfig `json:"seesawConfig,omitempty"`
5052 // VipConfig: The VIPs used by the load balancer.
5053 VipConfig *VmwareVipConfig `json:"vipConfig,omitempty"`
5054 // ForceSendFields is a list of field names (e.g. "F5Config") to
5055 // unconditionally include in API requests. By default, fields with empty or
5056 // default values are omitted from API requests. See
5057 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5058 // details.
5059 ForceSendFields []string `json:"-"`
5060 // NullFields is a list of field names (e.g. "F5Config") to include in API
5061 // requests with the JSON null value. By default, fields with empty values are
5062 // omitted from API requests. See
5063 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5064 NullFields []string `json:"-"`
5065 }
5066
5067 func (s VmwareLoadBalancerConfig) MarshalJSON() ([]byte, error) {
5068 type NoMethod VmwareLoadBalancerConfig
5069 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5070 }
5071
5072 // VmwareManualLbConfig: Represents configuration parameters for an already
5073 // existing manual load balancer. Given the nature of manual load balancers it
5074 // is expected that said load balancer will be fully managed by users.
5075 // IMPORTANT: Please note that the Anthos On-Prem API will not generate or
5076 // update ManualLB configurations it can only bind a pre-existing configuration
5077 // to a new VMware user cluster.
5078 type VmwareManualLbConfig struct {
5079 // ControlPlaneNodePort: NodePort for control plane service. The Kubernetes API
5080 // server in the admin cluster is implemented as a Service of type NodePort
5081 // (ex. 30968).
5082 ControlPlaneNodePort int64 `json:"controlPlaneNodePort,omitempty"`
5083 // IngressHttpNodePort: NodePort for ingress service's http. The ingress
5084 // service in the admin cluster is implemented as a Service of type NodePort
5085 // (ex. 32527).
5086 IngressHttpNodePort int64 `json:"ingressHttpNodePort,omitempty"`
5087 // IngressHttpsNodePort: NodePort for ingress service's https. The ingress
5088 // service in the admin cluster is implemented as a Service of type NodePort
5089 // (ex. 30139).
5090 IngressHttpsNodePort int64 `json:"ingressHttpsNodePort,omitempty"`
5091 // KonnectivityServerNodePort: NodePort for konnectivity server service running
5092 // as a sidecar in each kube-apiserver pod (ex. 30564).
5093 KonnectivityServerNodePort int64 `json:"konnectivityServerNodePort,omitempty"`
5094 // ForceSendFields is a list of field names (e.g. "ControlPlaneNodePort") to
5095 // unconditionally include in API requests. By default, fields with empty or
5096 // default values are omitted from API requests. See
5097 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5098 // details.
5099 ForceSendFields []string `json:"-"`
5100 // NullFields is a list of field names (e.g. "ControlPlaneNodePort") to include
5101 // in API requests with the JSON null value. By default, fields with empty
5102 // values are omitted from API requests. See
5103 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5104 NullFields []string `json:"-"`
5105 }
5106
5107 func (s VmwareManualLbConfig) MarshalJSON() ([]byte, error) {
5108 type NoMethod VmwareManualLbConfig
5109 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5110 }
5111
5112 // VmwareMetalLbConfig: Represents configuration parameters for the MetalLB
5113 // load balancer.
5114 type VmwareMetalLbConfig struct {
5115 // AddressPools: Required. AddressPools is a list of non-overlapping IP pools
5116 // used by load balancer typed services. All addresses must be routable to load
5117 // balancer nodes. IngressVIP must be included in the pools.
5118 AddressPools []*VmwareAddressPool `json:"addressPools,omitempty"`
5119 // ForceSendFields is a list of field names (e.g. "AddressPools") to
5120 // unconditionally include in API requests. By default, fields with empty or
5121 // default values are omitted from API requests. See
5122 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5123 // details.
5124 ForceSendFields []string `json:"-"`
5125 // NullFields is a list of field names (e.g. "AddressPools") to include in API
5126 // requests with the JSON null value. By default, fields with empty values are
5127 // omitted from API requests. See
5128 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5129 NullFields []string `json:"-"`
5130 }
5131
5132 func (s VmwareMetalLbConfig) MarshalJSON() ([]byte, error) {
5133 type NoMethod VmwareMetalLbConfig
5134 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5135 }
5136
5137 // VmwareNetworkConfig: Specifies network config for the VMware user cluster.
5138 type VmwareNetworkConfig struct {
5139 // ControlPlaneV2Config: Configuration for control plane V2 mode.
5140 ControlPlaneV2Config *VmwareControlPlaneV2Config `json:"controlPlaneV2Config,omitempty"`
5141 // DhcpIpConfig: Configuration settings for a DHCP IP configuration.
5142 DhcpIpConfig *VmwareDhcpIpConfig `json:"dhcpIpConfig,omitempty"`
5143 // HostConfig: Represents common network settings irrespective of the host's IP
5144 // address.
5145 HostConfig *VmwareHostConfig `json:"hostConfig,omitempty"`
5146 // PodAddressCidrBlocks: Required. All pods in the cluster are assigned an
5147 // RFC1918 IPv4 address from these ranges. Only a single range is supported.
5148 // This field cannot be changed after creation.
5149 PodAddressCidrBlocks []string `json:"podAddressCidrBlocks,omitempty"`
5150 // ServiceAddressCidrBlocks: Required. All services in the cluster are assigned
5151 // an RFC1918 IPv4 address from these ranges. Only a single range is supported.
5152 // This field cannot be changed after creation.
5153 ServiceAddressCidrBlocks []string `json:"serviceAddressCidrBlocks,omitempty"`
5154 // StaticIpConfig: Configuration settings for a static IP configuration.
5155 StaticIpConfig *VmwareStaticIpConfig `json:"staticIpConfig,omitempty"`
5156 // VcenterNetwork: vcenter_network specifies vCenter network name. Inherited
5157 // from the admin cluster.
5158 VcenterNetwork string `json:"vcenterNetwork,omitempty"`
5159 // ForceSendFields is a list of field names (e.g. "ControlPlaneV2Config") to
5160 // unconditionally include in API requests. By default, fields with empty or
5161 // default values are omitted from API requests. See
5162 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5163 // details.
5164 ForceSendFields []string `json:"-"`
5165 // NullFields is a list of field names (e.g. "ControlPlaneV2Config") to include
5166 // in API requests with the JSON null value. By default, fields with empty
5167 // values are omitted from API requests. See
5168 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5169 NullFields []string `json:"-"`
5170 }
5171
5172 func (s VmwareNetworkConfig) MarshalJSON() ([]byte, error) {
5173 type NoMethod VmwareNetworkConfig
5174 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5175 }
5176
5177 // VmwareNodeConfig: Parameters that describe the configuration of all nodes
5178 // within a given node pool.
5179 type VmwareNodeConfig struct {
5180 // BootDiskSizeGb: VMware disk size to be used during creation.
5181 BootDiskSizeGb int64 `json:"bootDiskSizeGb,omitempty,string"`
5182 // Cpus: The number of CPUs for each node in the node pool.
5183 Cpus int64 `json:"cpus,omitempty,string"`
5184 // EnableLoadBalancer: Allow node pool traffic to be load balanced. Only works
5185 // for clusters with MetalLB load balancers.
5186 EnableLoadBalancer bool `json:"enableLoadBalancer,omitempty"`
5187 // Image: The OS image name in vCenter, only valid when using Windows.
5188 Image string `json:"image,omitempty"`
5189 // ImageType: Required. The OS image to be used for each node in a node pool.
5190 // Currently `cos`, `cos_cgv2`, `ubuntu`, `ubuntu_cgv2`, `ubuntu_containerd`
5191 // and `windows` are supported.
5192 ImageType string `json:"imageType,omitempty"`
5193 // Labels: The map of Kubernetes labels (key/value pairs) to be applied to each
5194 // node. These will added in addition to any default label(s) that Kubernetes
5195 // may apply to the node. In case of conflict in label keys, the applied set
5196 // may differ depending on the Kubernetes version -- it's best to assume the
5197 // behavior is undefined and conflicts should be avoided. For more information,
5198 // including usage and the valid values, see:
5199 // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
5200 Labels map[string]string `json:"labels,omitempty"`
5201 // MemoryMb: The megabytes of memory for each node in the node pool.
5202 MemoryMb int64 `json:"memoryMb,omitempty,string"`
5203 // Replicas: The number of nodes in the node pool.
5204 Replicas int64 `json:"replicas,omitempty,string"`
5205 // Taints: The initial taints assigned to nodes of this node pool.
5206 Taints []*NodeTaint `json:"taints,omitempty"`
5207 // VsphereConfig: Specifies the vSphere config for node pool.
5208 VsphereConfig *VmwareVsphereConfig `json:"vsphereConfig,omitempty"`
5209 // ForceSendFields is a list of field names (e.g. "BootDiskSizeGb") to
5210 // unconditionally include in API requests. By default, fields with empty or
5211 // default values are omitted from API requests. See
5212 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5213 // details.
5214 ForceSendFields []string `json:"-"`
5215 // NullFields is a list of field names (e.g. "BootDiskSizeGb") to include in
5216 // API requests with the JSON null value. By default, fields with empty values
5217 // are omitted from API requests. See
5218 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5219 NullFields []string `json:"-"`
5220 }
5221
5222 func (s VmwareNodeConfig) MarshalJSON() ([]byte, error) {
5223 type NoMethod VmwareNodeConfig
5224 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5225 }
5226
5227 // VmwareNodePool: Resource VmwareNodePool represents a VMware node pool. ##
5228 type VmwareNodePool struct {
5229 // Annotations: Annotations on the node pool. This field has the same
5230 // restrictions as Kubernetes annotations. The total size of all keys and
5231 // values combined is limited to 256k. Key can have 2 segments: prefix
5232 // (optional) and name (required), separated by a slash (/). Prefix must be a
5233 // DNS subdomain. Name must be 63 characters or less, begin and end with
5234 // alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics
5235 // between.
5236 Annotations map[string]string `json:"annotations,omitempty"`
5237 // Config: Required. The node configuration of the node pool.
5238 Config *VmwareNodeConfig `json:"config,omitempty"`
5239 // CreateTime: Output only. The time at which this node pool was created.
5240 CreateTime string `json:"createTime,omitempty"`
5241 // DeleteTime: Output only. The time at which this node pool was deleted. If
5242 // the resource is not deleted, this must be empty
5243 DeleteTime string `json:"deleteTime,omitempty"`
5244 // DisplayName: The display name for the node pool.
5245 DisplayName string `json:"displayName,omitempty"`
5246 // Etag: This checksum is computed by the server based on the value of other
5247 // fields, and may be sent on update and delete requests to ensure the client
5248 // has an up-to-date value before proceeding. Allows clients to perform
5249 // consistent read-modify-writes through optimistic concurrency control.
5250 Etag string `json:"etag,omitempty"`
5251 // Name: Immutable. The resource name of this node pool.
5252 Name string `json:"name,omitempty"`
5253 // NodePoolAutoscaling: Node pool autoscaling config for the node pool.
5254 NodePoolAutoscaling *VmwareNodePoolAutoscalingConfig `json:"nodePoolAutoscaling,omitempty"`
5255 // OnPremVersion: Anthos version for the node pool. Defaults to the user
5256 // cluster version.
5257 OnPremVersion string `json:"onPremVersion,omitempty"`
5258 // Reconciling: Output only. If set, there are currently changes in flight to
5259 // the node pool.
5260 Reconciling bool `json:"reconciling,omitempty"`
5261 // State: Output only. The current state of the node pool.
5262 //
5263 // Possible values:
5264 // "STATE_UNSPECIFIED" - Not set.
5265 // "PROVISIONING" - The PROVISIONING state indicates the node pool is being
5266 // created.
5267 // "RUNNING" - The RUNNING state indicates the node pool has been created and
5268 // is fully usable.
5269 // "RECONCILING" - The RECONCILING state indicates that the node pool is
5270 // being updated. It remains available, but potentially with degraded
5271 // performance.
5272 // "STOPPING" - The STOPPING state indicates the cluster is being deleted
5273 // "ERROR" - The ERROR state indicates the node pool is in a broken
5274 // unrecoverable state.
5275 // "DEGRADED" - The DEGRADED state indicates the node pool requires user
5276 // action to restore full functionality.
5277 State string `json:"state,omitempty"`
5278 // Status: Output only. ResourceStatus representing the detailed VMware node
5279 // pool state.
5280 Status *ResourceStatus `json:"status,omitempty"`
5281 // Uid: Output only. The unique identifier of the node pool.
5282 Uid string `json:"uid,omitempty"`
5283 // UpdateTime: Output only. The time at which this node pool was last updated.
5284 UpdateTime string `json:"updateTime,omitempty"`
5285
5286 // ServerResponse contains the HTTP response code and headers from the server.
5287 googleapi.ServerResponse `json:"-"`
5288 // ForceSendFields is a list of field names (e.g. "Annotations") to
5289 // unconditionally include in API requests. By default, fields with empty or
5290 // default values are omitted from API requests. See
5291 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5292 // details.
5293 ForceSendFields []string `json:"-"`
5294 // NullFields is a list of field names (e.g. "Annotations") to include in API
5295 // requests with the JSON null value. By default, fields with empty values are
5296 // omitted from API requests. See
5297 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5298 NullFields []string `json:"-"`
5299 }
5300
5301 func (s VmwareNodePool) MarshalJSON() ([]byte, error) {
5302 type NoMethod VmwareNodePool
5303 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5304 }
5305
5306 // VmwareNodePoolAutoscalingConfig: NodePoolAutoscaling config for the NodePool
5307 // to allow for the kubernetes to scale NodePool.
5308 type VmwareNodePoolAutoscalingConfig struct {
5309 // MaxReplicas: Maximum number of replicas in the NodePool.
5310 MaxReplicas int64 `json:"maxReplicas,omitempty"`
5311 // MinReplicas: Minimum number of replicas in the NodePool.
5312 MinReplicas int64 `json:"minReplicas,omitempty"`
5313 // ForceSendFields is a list of field names (e.g. "MaxReplicas") to
5314 // unconditionally include in API requests. By default, fields with empty or
5315 // default values are omitted from API requests. See
5316 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5317 // details.
5318 ForceSendFields []string `json:"-"`
5319 // NullFields is a list of field names (e.g. "MaxReplicas") to include in API
5320 // requests with the JSON null value. By default, fields with empty values are
5321 // omitted from API requests. See
5322 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5323 NullFields []string `json:"-"`
5324 }
5325
5326 func (s VmwareNodePoolAutoscalingConfig) MarshalJSON() ([]byte, error) {
5327 type NoMethod VmwareNodePoolAutoscalingConfig
5328 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5329 }
5330
5331 // VmwarePlatformConfig: VmwarePlatformConfig represents configuration for the
5332 // VMware platform.
5333 type VmwarePlatformConfig struct {
5334 // Bundles: Output only. The list of bundles installed in the admin cluster.
5335 Bundles []*VmwareBundleConfig `json:"bundles,omitempty"`
5336 // PlatformVersion: Output only. The platform version e.g. 1.13.2.
5337 PlatformVersion string `json:"platformVersion,omitempty"`
5338 // RequiredPlatformVersion: Input only. The required platform version e.g.
5339 // 1.13.1. If the current platform version is lower than the target version,
5340 // the platform version will be updated to the target version. If the target
5341 // version is not installed in the platform (bundle versions), download the
5342 // target version bundle.
5343 RequiredPlatformVersion string `json:"requiredPlatformVersion,omitempty"`
5344 // Status: Output only. Resource status for the platform.
5345 Status *ResourceStatus `json:"status,omitempty"`
5346 // ForceSendFields is a list of field names (e.g. "Bundles") to unconditionally
5347 // include in API requests. By default, fields with empty or default values are
5348 // omitted from API requests. See
5349 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5350 // details.
5351 ForceSendFields []string `json:"-"`
5352 // NullFields is a list of field names (e.g. "Bundles") to include in API
5353 // requests with the JSON null value. By default, fields with empty values are
5354 // omitted from API requests. See
5355 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5356 NullFields []string `json:"-"`
5357 }
5358
5359 func (s VmwarePlatformConfig) MarshalJSON() ([]byte, error) {
5360 type NoMethod VmwarePlatformConfig
5361 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5362 }
5363
5364 // VmwareSeesawConfig: VmwareSeesawConfig represents configuration parameters
5365 // for an already existing Seesaw load balancer. IMPORTANT: Please note that
5366 // the Anthos On-Prem API will not generate or update Seesaw configurations it
5367 // can only bind a pre-existing configuration to a new user cluster. IMPORTANT:
5368 // When attempting to create a user cluster with a pre-existing Seesaw load
5369 // balancer you will need to follow some preparation steps before calling the
5370 // 'CreateVmwareCluster' API method. First you will need to create the user
5371 // cluster's namespace via kubectl. The namespace will need to use the
5372 // following naming convention : -gke-onprem-mgmt or -gke-onprem-mgmt depending
5373 // on whether you used the 'VmwareCluster.local_name' to disambiguate
5374 // collisions; for more context see the documentation of
5375 // 'VmwareCluster.local_name'. Once the namespace is created you will need to
5376 // create a secret resource via kubectl. This secret will contain copies of
5377 // your Seesaw credentials. The Secret must be called 'user-cluster-creds' and
5378 // contain Seesaw's SSH and Cert credentials. The credentials must be keyed
5379 // with the following names: 'seesaw-ssh-private-key', 'seesaw-ssh-public-key',
5380 // 'seesaw-ssh-ca-key', 'seesaw-ssh-ca-cert'.
5381 type VmwareSeesawConfig struct {
5382 // EnableHa: Enable two load balancer VMs to achieve a highly-available Seesaw
5383 // load balancer.
5384 EnableHa bool `json:"enableHa,omitempty"`
5385 // Group: Required. In general the following format should be used for the
5386 // Seesaw group name: seesaw-for-[cluster_name].
5387 Group string `json:"group,omitempty"`
5388 // IpBlocks: Required. The IP Blocks to be used by the Seesaw load balancer
5389 IpBlocks []*VmwareIpBlock `json:"ipBlocks,omitempty"`
5390 // MasterIp: Required. MasterIP is the IP announced by the master of Seesaw
5391 // group.
5392 MasterIp string `json:"masterIp,omitempty"`
5393 // StackdriverName: Name to be used by Stackdriver.
5394 StackdriverName string `json:"stackdriverName,omitempty"`
5395 // Vms: Names of the VMs created for this Seesaw group.
5396 Vms []string `json:"vms,omitempty"`
5397 // ForceSendFields is a list of field names (e.g. "EnableHa") to
5398 // unconditionally include in API requests. By default, fields with empty or
5399 // default values are omitted from API requests. See
5400 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5401 // details.
5402 ForceSendFields []string `json:"-"`
5403 // NullFields is a list of field names (e.g. "EnableHa") to include in API
5404 // requests with the JSON null value. By default, fields with empty values are
5405 // omitted from API requests. See
5406 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5407 NullFields []string `json:"-"`
5408 }
5409
5410 func (s VmwareSeesawConfig) MarshalJSON() ([]byte, error) {
5411 type NoMethod VmwareSeesawConfig
5412 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5413 }
5414
5415 // VmwareStaticIpConfig: Represents the network configuration required for the
5416 // VMware user clusters with Static IP configurations.
5417 type VmwareStaticIpConfig struct {
5418 // IpBlocks: Represents the configuration values for static IP allocation to
5419 // nodes.
5420 IpBlocks []*VmwareIpBlock `json:"ipBlocks,omitempty"`
5421 // ForceSendFields is a list of field names (e.g. "IpBlocks") to
5422 // unconditionally include in API requests. By default, fields with empty or
5423 // default values are omitted from API requests. See
5424 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5425 // details.
5426 ForceSendFields []string `json:"-"`
5427 // NullFields is a list of field names (e.g. "IpBlocks") to include in API
5428 // requests with the JSON null value. By default, fields with empty values are
5429 // omitted from API requests. See
5430 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5431 NullFields []string `json:"-"`
5432 }
5433
5434 func (s VmwareStaticIpConfig) MarshalJSON() ([]byte, error) {
5435 type NoMethod VmwareStaticIpConfig
5436 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5437 }
5438
5439 // VmwareStorageConfig: Specifies vSphere CSI components deployment config in
5440 // the VMware user cluster.
5441 type VmwareStorageConfig struct {
5442 // VsphereCsiDisabled: Whether or not to deploy vSphere CSI components in the
5443 // VMware user cluster. Enabled by default.
5444 VsphereCsiDisabled bool `json:"vsphereCsiDisabled,omitempty"`
5445 // ForceSendFields is a list of field names (e.g. "VsphereCsiDisabled") to
5446 // unconditionally include in API requests. By default, fields with empty or
5447 // default values are omitted from API requests. See
5448 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5449 // details.
5450 ForceSendFields []string `json:"-"`
5451 // NullFields is a list of field names (e.g. "VsphereCsiDisabled") to include
5452 // in API requests with the JSON null value. By default, fields with empty
5453 // values are omitted from API requests. See
5454 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5455 NullFields []string `json:"-"`
5456 }
5457
5458 func (s VmwareStorageConfig) MarshalJSON() ([]byte, error) {
5459 type NoMethod VmwareStorageConfig
5460 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5461 }
5462
5463 // VmwareVCenterConfig: Represents configuration for the VMware VCenter for the
5464 // user cluster.
5465 type VmwareVCenterConfig struct {
5466 // Address: Output only. The vCenter IP address.
5467 Address string `json:"address,omitempty"`
5468 // CaCertData: Contains the vCenter CA certificate public key for SSL
5469 // verification.
5470 CaCertData string `json:"caCertData,omitempty"`
5471 // Cluster: The name of the vCenter cluster for the user cluster.
5472 Cluster string `json:"cluster,omitempty"`
5473 // Datacenter: The name of the vCenter datacenter for the user cluster.
5474 Datacenter string `json:"datacenter,omitempty"`
5475 // Datastore: The name of the vCenter datastore for the user cluster.
5476 Datastore string `json:"datastore,omitempty"`
5477 // Folder: The name of the vCenter folder for the user cluster.
5478 Folder string `json:"folder,omitempty"`
5479 // ResourcePool: The name of the vCenter resource pool for the user cluster.
5480 ResourcePool string `json:"resourcePool,omitempty"`
5481 // StoragePolicyName: The name of the vCenter storage policy for the user
5482 // cluster.
5483 StoragePolicyName string `json:"storagePolicyName,omitempty"`
5484 // ForceSendFields is a list of field names (e.g. "Address") to unconditionally
5485 // include in API requests. By default, fields with empty or default values are
5486 // omitted from API requests. See
5487 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5488 // details.
5489 ForceSendFields []string `json:"-"`
5490 // NullFields is a list of field names (e.g. "Address") to include in API
5491 // requests with the JSON null value. By default, fields with empty values are
5492 // omitted from API requests. See
5493 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5494 NullFields []string `json:"-"`
5495 }
5496
5497 func (s VmwareVCenterConfig) MarshalJSON() ([]byte, error) {
5498 type NoMethod VmwareVCenterConfig
5499 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5500 }
5501
5502 // VmwareVersionInfo: Contains information about a specific Anthos on VMware
5503 // version.
5504 type VmwareVersionInfo struct {
5505 // Dependencies: The list of upgrade dependencies for this version.
5506 Dependencies []*UpgradeDependency `json:"dependencies,omitempty"`
5507 // HasDependencies: If set, the cluster dependencies (e.g. the admin cluster,
5508 // other user clusters managed by the same admin cluster) must be upgraded
5509 // before this version can be installed or upgraded to.
5510 HasDependencies bool `json:"hasDependencies,omitempty"`
5511 // IsInstalled: If set, the version is installed in the admin cluster.
5512 // Otherwise, the version bundle must be downloaded and installed before a user
5513 // cluster can be created at or upgraded to this version.
5514 IsInstalled bool `json:"isInstalled,omitempty"`
5515 // Version: Version number e.g. 1.13.1-gke.1000.
5516 Version string `json:"version,omitempty"`
5517 // ForceSendFields is a list of field names (e.g. "Dependencies") to
5518 // unconditionally include in API requests. By default, fields with empty or
5519 // default values are omitted from API requests. See
5520 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5521 // details.
5522 ForceSendFields []string `json:"-"`
5523 // NullFields is a list of field names (e.g. "Dependencies") to include in API
5524 // requests with the JSON null value. By default, fields with empty values are
5525 // omitted from API requests. See
5526 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5527 NullFields []string `json:"-"`
5528 }
5529
5530 func (s VmwareVersionInfo) MarshalJSON() ([]byte, error) {
5531 type NoMethod VmwareVersionInfo
5532 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5533 }
5534
5535 // VmwareVipConfig: Specifies the VIP config for the VMware user cluster load
5536 // balancer.
5537 type VmwareVipConfig struct {
5538 // ControlPlaneVip: The VIP which you previously set aside for the Kubernetes
5539 // API of this cluster.
5540 ControlPlaneVip string `json:"controlPlaneVip,omitempty"`
5541 // IngressVip: The VIP which you previously set aside for ingress traffic into
5542 // this cluster.
5543 IngressVip string `json:"ingressVip,omitempty"`
5544 // ForceSendFields is a list of field names (e.g. "ControlPlaneVip") to
5545 // unconditionally include in API requests. By default, fields with empty or
5546 // default values are omitted from API requests. See
5547 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5548 // details.
5549 ForceSendFields []string `json:"-"`
5550 // NullFields is a list of field names (e.g. "ControlPlaneVip") to include in
5551 // API requests with the JSON null value. By default, fields with empty values
5552 // are omitted from API requests. See
5553 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5554 NullFields []string `json:"-"`
5555 }
5556
5557 func (s VmwareVipConfig) MarshalJSON() ([]byte, error) {
5558 type NoMethod VmwareVipConfig
5559 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5560 }
5561
5562 // VmwareVsphereConfig: VmwareVsphereConfig represents configuration for the
5563 // VMware VCenter for node pool.
5564 type VmwareVsphereConfig struct {
5565 // Datastore: The name of the vCenter datastore. Inherited from the user
5566 // cluster.
5567 Datastore string `json:"datastore,omitempty"`
5568 // HostGroups: Vsphere host groups to apply to all VMs in the node pool
5569 HostGroups []string `json:"hostGroups,omitempty"`
5570 // Tags: Tags to apply to VMs.
5571 Tags []*VmwareVsphereTag `json:"tags,omitempty"`
5572 // ForceSendFields is a list of field names (e.g. "Datastore") to
5573 // unconditionally include in API requests. By default, fields with empty or
5574 // default values are omitted from API requests. See
5575 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5576 // details.
5577 ForceSendFields []string `json:"-"`
5578 // NullFields is a list of field names (e.g. "Datastore") to include in API
5579 // requests with the JSON null value. By default, fields with empty values are
5580 // omitted from API requests. See
5581 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5582 NullFields []string `json:"-"`
5583 }
5584
5585 func (s VmwareVsphereConfig) MarshalJSON() ([]byte, error) {
5586 type NoMethod VmwareVsphereConfig
5587 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5588 }
5589
5590 // VmwareVsphereTag: VmwareVsphereTag describes a vSphere tag to be placed on
5591 // VMs in the node pool. For more information, see
5592 // https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vcenterhost.doc/GUID-E8E854DD-AA97-4E0C-8419-CE84F93C4058.html
5593 type VmwareVsphereTag struct {
5594 // Category: The Vsphere tag category.
5595 Category string `json:"category,omitempty"`
5596 // Tag: The Vsphere tag name.
5597 Tag string `json:"tag,omitempty"`
5598 // ForceSendFields is a list of field names (e.g. "Category") to
5599 // unconditionally include in API requests. By default, fields with empty or
5600 // default values are omitted from API requests. See
5601 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5602 // details.
5603 ForceSendFields []string `json:"-"`
5604 // NullFields is a list of field names (e.g. "Category") to include in API
5605 // requests with the JSON null value. By default, fields with empty values are
5606 // omitted from API requests. See
5607 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5608 NullFields []string `json:"-"`
5609 }
5610
5611 func (s VmwareVsphereTag) MarshalJSON() ([]byte, error) {
5612 type NoMethod VmwareVsphereTag
5613 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5614 }
5615
5616 type ProjectsLocationsGetCall struct {
5617 s *Service
5618 name string
5619 urlParams_ gensupport.URLParams
5620 ifNoneMatch_ string
5621 ctx_ context.Context
5622 header_ http.Header
5623 }
5624
5625 // Get: Gets information about a location.
5626 //
5627 // - name: Resource name for the location.
5628 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
5629 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5630 c.name = name
5631 return c
5632 }
5633
5634 // Fields allows partial responses to be retrieved. See
5635 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5636 // details.
5637 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
5638 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5639 return c
5640 }
5641
5642 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5643 // object's ETag matches the given value. This is useful for getting updates
5644 // only after the object has changed since the last request.
5645 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
5646 c.ifNoneMatch_ = entityTag
5647 return c
5648 }
5649
5650 // Context sets the context to be used in this call's Do method.
5651 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
5652 c.ctx_ = ctx
5653 return c
5654 }
5655
5656 // Header returns a http.Header that can be modified by the caller to add
5657 // headers to the request.
5658 func (c *ProjectsLocationsGetCall) Header() http.Header {
5659 if c.header_ == nil {
5660 c.header_ = make(http.Header)
5661 }
5662 return c.header_
5663 }
5664
5665 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
5666 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5667 if c.ifNoneMatch_ != "" {
5668 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5669 }
5670 c.urlParams_.Set("alt", alt)
5671 c.urlParams_.Set("prettyPrint", "false")
5672 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5673 urls += "?" + c.urlParams_.Encode()
5674 req, err := http.NewRequest("GET", urls, nil)
5675 if err != nil {
5676 return nil, err
5677 }
5678 req.Header = reqHeaders
5679 googleapi.Expand(req.URL, map[string]string{
5680 "name": c.name,
5681 })
5682 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.get", "request", internallog.HTTPRequest(req, nil))
5683 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5684 }
5685
5686 // Do executes the "gkeonprem.projects.locations.get" call.
5687 // Any non-2xx status code is an error. Response headers are in either
5688 // *Location.ServerResponse.Header or (if a response was returned at all) in
5689 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5690 // whether the returned error was because http.StatusNotModified was returned.
5691 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
5692 gensupport.SetOptions(c.urlParams_, opts...)
5693 res, err := c.doRequest("json")
5694 if res != nil && res.StatusCode == http.StatusNotModified {
5695 if res.Body != nil {
5696 res.Body.Close()
5697 }
5698 return nil, gensupport.WrapError(&googleapi.Error{
5699 Code: res.StatusCode,
5700 Header: res.Header,
5701 })
5702 }
5703 if err != nil {
5704 return nil, err
5705 }
5706 defer googleapi.CloseBody(res)
5707 if err := googleapi.CheckResponse(res); err != nil {
5708 return nil, gensupport.WrapError(err)
5709 }
5710 ret := &Location{
5711 ServerResponse: googleapi.ServerResponse{
5712 Header: res.Header,
5713 HTTPStatusCode: res.StatusCode,
5714 },
5715 }
5716 target := &ret
5717 b, err := gensupport.DecodeResponseBytes(target, res)
5718 if err != nil {
5719 return nil, err
5720 }
5721 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.get", "response", internallog.HTTPResponse(res, b))
5722 return ret, nil
5723 }
5724
5725 type ProjectsLocationsListCall struct {
5726 s *Service
5727 name string
5728 urlParams_ gensupport.URLParams
5729 ifNoneMatch_ string
5730 ctx_ context.Context
5731 header_ http.Header
5732 }
5733
5734 // List: Lists information about the supported locations for this service. This
5735 // method lists locations based on the resource scope provided in the
5736 // [ListLocationsRequest.name] field: * **Global locations**: If `name` is
5737 // empty, the method lists the public locations available to all projects. *
5738 // **Project-specific locations**: If `name` follows the format
5739 // `projects/{project}`, the method lists locations visible to that specific
5740 // project. This includes public, private, or other project-specific locations
5741 // enabled for the project. For gRPC and client library implementations, the
5742 // resource name is passed as the `name` field. For direct service calls, the
5743 // resource name is incorporated into the request path based on the specific
5744 // service implementation and version.
5745 //
5746 // - name: The resource that owns the locations collection, if applicable.
5747 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
5748 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5749 c.name = name
5750 return c
5751 }
5752
5753 // ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not
5754 // use this field. It is unsupported and is ignored unless explicitly
5755 // documented otherwise. This is primarily for internal usage.
5756 func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall {
5757 c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...))
5758 return c
5759 }
5760
5761 // Filter sets the optional parameter "filter": A filter to narrow down results
5762 // to a preferred subset. The filtering language accepts strings like
5763 // "displayName=tokyo", and is documented in more detail in AIP-160
5764 // (https://google.aip.dev/160).
5765 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
5766 c.urlParams_.Set("filter", filter)
5767 return c
5768 }
5769
5770 // PageSize sets the optional parameter "pageSize": The maximum number of
5771 // results to return. If not set, the service selects a default.
5772 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
5773 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5774 return c
5775 }
5776
5777 // PageToken sets the optional parameter "pageToken": A page token received
5778 // from the `next_page_token` field in the response. Send that page token to
5779 // receive the subsequent page.
5780 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
5781 c.urlParams_.Set("pageToken", pageToken)
5782 return c
5783 }
5784
5785 // Fields allows partial responses to be retrieved. See
5786 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5787 // details.
5788 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
5789 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5790 return c
5791 }
5792
5793 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5794 // object's ETag matches the given value. This is useful for getting updates
5795 // only after the object has changed since the last request.
5796 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
5797 c.ifNoneMatch_ = entityTag
5798 return c
5799 }
5800
5801 // Context sets the context to be used in this call's Do method.
5802 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
5803 c.ctx_ = ctx
5804 return c
5805 }
5806
5807 // Header returns a http.Header that can be modified by the caller to add
5808 // headers to the request.
5809 func (c *ProjectsLocationsListCall) Header() http.Header {
5810 if c.header_ == nil {
5811 c.header_ = make(http.Header)
5812 }
5813 return c.header_
5814 }
5815
5816 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
5817 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5818 if c.ifNoneMatch_ != "" {
5819 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5820 }
5821 c.urlParams_.Set("alt", alt)
5822 c.urlParams_.Set("prettyPrint", "false")
5823 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
5824 urls += "?" + c.urlParams_.Encode()
5825 req, err := http.NewRequest("GET", urls, nil)
5826 if err != nil {
5827 return nil, err
5828 }
5829 req.Header = reqHeaders
5830 googleapi.Expand(req.URL, map[string]string{
5831 "name": c.name,
5832 })
5833 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.list", "request", internallog.HTTPRequest(req, nil))
5834 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5835 }
5836
5837 // Do executes the "gkeonprem.projects.locations.list" call.
5838 // Any non-2xx status code is an error. Response headers are in either
5839 // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
5840 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5841 // check whether the returned error was because http.StatusNotModified was
5842 // returned.
5843 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
5844 gensupport.SetOptions(c.urlParams_, opts...)
5845 res, err := c.doRequest("json")
5846 if res != nil && res.StatusCode == http.StatusNotModified {
5847 if res.Body != nil {
5848 res.Body.Close()
5849 }
5850 return nil, gensupport.WrapError(&googleapi.Error{
5851 Code: res.StatusCode,
5852 Header: res.Header,
5853 })
5854 }
5855 if err != nil {
5856 return nil, err
5857 }
5858 defer googleapi.CloseBody(res)
5859 if err := googleapi.CheckResponse(res); err != nil {
5860 return nil, gensupport.WrapError(err)
5861 }
5862 ret := &ListLocationsResponse{
5863 ServerResponse: googleapi.ServerResponse{
5864 Header: res.Header,
5865 HTTPStatusCode: res.StatusCode,
5866 },
5867 }
5868 target := &ret
5869 b, err := gensupport.DecodeResponseBytes(target, res)
5870 if err != nil {
5871 return nil, err
5872 }
5873 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.list", "response", internallog.HTTPResponse(res, b))
5874 return ret, nil
5875 }
5876
5877 // Pages invokes f for each page of results.
5878 // A non-nil error returned from f will halt the iteration.
5879 // The provided context supersedes any context provided to the Context method.
5880 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
5881 c.ctx_ = ctx
5882 defer c.PageToken(c.urlParams_.Get("pageToken"))
5883 for {
5884 x, err := c.Do()
5885 if err != nil {
5886 return err
5887 }
5888 if err := f(x); err != nil {
5889 return err
5890 }
5891 if x.NextPageToken == "" {
5892 return nil
5893 }
5894 c.PageToken(x.NextPageToken)
5895 }
5896 }
5897
5898 type ProjectsLocationsBareMetalAdminClustersCreateCall struct {
5899 s *Service
5900 parent string
5901 baremetaladmincluster *BareMetalAdminCluster
5902 urlParams_ gensupport.URLParams
5903 ctx_ context.Context
5904 header_ http.Header
5905 }
5906
5907 // Create: Creates a new bare metal admin cluster in a given project and
5908 // location. The API needs to be combined with creating a bootstrap cluster to
5909 // work. See:
5910 // https://cloud.google.com/anthos/clusters/docs/bare-metal/latest/installing/creating-clusters/create-admin-cluster-api#prepare_bootstrap_environment
5911 //
5912 // - parent: The parent of the project and location where the cluster is
5913 // created in. Format: "projects/{project}/locations/{location}".
5914 func (r *ProjectsLocationsBareMetalAdminClustersService) Create(parent string, baremetaladmincluster *BareMetalAdminCluster) *ProjectsLocationsBareMetalAdminClustersCreateCall {
5915 c := &ProjectsLocationsBareMetalAdminClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5916 c.parent = parent
5917 c.baremetaladmincluster = baremetaladmincluster
5918 return c
5919 }
5920
5921 // AllowPreflightFailure sets the optional parameter "allowPreflightFailure":
5922 // If set to true, CLM will force CCFE to persist the cluster resource in RMS
5923 // when the creation fails during standalone preflight checks. In that case the
5924 // subsequent create call will fail with "cluster already exists" error and
5925 // hence a update cluster is required to fix the cluster.
5926 func (c *ProjectsLocationsBareMetalAdminClustersCreateCall) AllowPreflightFailure(allowPreflightFailure bool) *ProjectsLocationsBareMetalAdminClustersCreateCall {
5927 c.urlParams_.Set("allowPreflightFailure", fmt.Sprint(allowPreflightFailure))
5928 return c
5929 }
5930
5931 // BareMetalAdminClusterId sets the optional parameter
5932 // "bareMetalAdminClusterId": Required. User provided identifier that is used
5933 // as part of the resource name; must conform to RFC-1034 and additionally
5934 // restrict to lower-cased letters. This comes out roughly to: /^a-z+[a-z0-9]$/
5935 func (c *ProjectsLocationsBareMetalAdminClustersCreateCall) BareMetalAdminClusterId(bareMetalAdminClusterId string) *ProjectsLocationsBareMetalAdminClustersCreateCall {
5936 c.urlParams_.Set("bareMetalAdminClusterId", bareMetalAdminClusterId)
5937 return c
5938 }
5939
5940 // ValidateOnly sets the optional parameter "validateOnly": Validate the
5941 // request without actually doing any updates.
5942 func (c *ProjectsLocationsBareMetalAdminClustersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBareMetalAdminClustersCreateCall {
5943 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
5944 return c
5945 }
5946
5947 // Fields allows partial responses to be retrieved. See
5948 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5949 // details.
5950 func (c *ProjectsLocationsBareMetalAdminClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalAdminClustersCreateCall {
5951 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5952 return c
5953 }
5954
5955 // Context sets the context to be used in this call's Do method.
5956 func (c *ProjectsLocationsBareMetalAdminClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsBareMetalAdminClustersCreateCall {
5957 c.ctx_ = ctx
5958 return c
5959 }
5960
5961 // Header returns a http.Header that can be modified by the caller to add
5962 // headers to the request.
5963 func (c *ProjectsLocationsBareMetalAdminClustersCreateCall) Header() http.Header {
5964 if c.header_ == nil {
5965 c.header_ = make(http.Header)
5966 }
5967 return c.header_
5968 }
5969
5970 func (c *ProjectsLocationsBareMetalAdminClustersCreateCall) doRequest(alt string) (*http.Response, error) {
5971 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5972 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.baremetaladmincluster)
5973 if err != nil {
5974 return nil, err
5975 }
5976 c.urlParams_.Set("alt", alt)
5977 c.urlParams_.Set("prettyPrint", "false")
5978 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/bareMetalAdminClusters")
5979 urls += "?" + c.urlParams_.Encode()
5980 req, err := http.NewRequest("POST", urls, body)
5981 if err != nil {
5982 return nil, err
5983 }
5984 req.Header = reqHeaders
5985 googleapi.Expand(req.URL, map[string]string{
5986 "parent": c.parent,
5987 })
5988 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.create", "request", internallog.HTTPRequest(req, body.Bytes()))
5989 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5990 }
5991
5992 // Do executes the "gkeonprem.projects.locations.bareMetalAdminClusters.create" call.
5993 // Any non-2xx status code is an error. Response headers are in either
5994 // *Operation.ServerResponse.Header or (if a response was returned at all) in
5995 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5996 // whether the returned error was because http.StatusNotModified was returned.
5997 func (c *ProjectsLocationsBareMetalAdminClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5998 gensupport.SetOptions(c.urlParams_, opts...)
5999 res, err := c.doRequest("json")
6000 if res != nil && res.StatusCode == http.StatusNotModified {
6001 if res.Body != nil {
6002 res.Body.Close()
6003 }
6004 return nil, gensupport.WrapError(&googleapi.Error{
6005 Code: res.StatusCode,
6006 Header: res.Header,
6007 })
6008 }
6009 if err != nil {
6010 return nil, err
6011 }
6012 defer googleapi.CloseBody(res)
6013 if err := googleapi.CheckResponse(res); err != nil {
6014 return nil, gensupport.WrapError(err)
6015 }
6016 ret := &Operation{
6017 ServerResponse: googleapi.ServerResponse{
6018 Header: res.Header,
6019 HTTPStatusCode: res.StatusCode,
6020 },
6021 }
6022 target := &ret
6023 b, err := gensupport.DecodeResponseBytes(target, res)
6024 if err != nil {
6025 return nil, err
6026 }
6027 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.create", "response", internallog.HTTPResponse(res, b))
6028 return ret, nil
6029 }
6030
6031 type ProjectsLocationsBareMetalAdminClustersEnrollCall struct {
6032 s *Service
6033 parent string
6034 enrollbaremetaladminclusterrequest *EnrollBareMetalAdminClusterRequest
6035 urlParams_ gensupport.URLParams
6036 ctx_ context.Context
6037 header_ http.Header
6038 }
6039
6040 // Enroll: Enrolls an existing bare metal admin cluster to the Anthos On-Prem
6041 // API within a given project and location. Through enrollment, an existing
6042 // admin cluster will become Anthos On-Prem API managed. The corresponding GCP
6043 // resources will be created and all future modifications to the cluster will
6044 // be expected to be performed through the API.
6045 //
6046 // - parent: The parent of the project and location where the cluster is
6047 // enrolled in. Format: "projects/{project}/locations/{location}".
6048 func (r *ProjectsLocationsBareMetalAdminClustersService) Enroll(parent string, enrollbaremetaladminclusterrequest *EnrollBareMetalAdminClusterRequest) *ProjectsLocationsBareMetalAdminClustersEnrollCall {
6049 c := &ProjectsLocationsBareMetalAdminClustersEnrollCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6050 c.parent = parent
6051 c.enrollbaremetaladminclusterrequest = enrollbaremetaladminclusterrequest
6052 return c
6053 }
6054
6055 // Fields allows partial responses to be retrieved. See
6056 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6057 // details.
6058 func (c *ProjectsLocationsBareMetalAdminClustersEnrollCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalAdminClustersEnrollCall {
6059 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6060 return c
6061 }
6062
6063 // Context sets the context to be used in this call's Do method.
6064 func (c *ProjectsLocationsBareMetalAdminClustersEnrollCall) Context(ctx context.Context) *ProjectsLocationsBareMetalAdminClustersEnrollCall {
6065 c.ctx_ = ctx
6066 return c
6067 }
6068
6069 // Header returns a http.Header that can be modified by the caller to add
6070 // headers to the request.
6071 func (c *ProjectsLocationsBareMetalAdminClustersEnrollCall) Header() http.Header {
6072 if c.header_ == nil {
6073 c.header_ = make(http.Header)
6074 }
6075 return c.header_
6076 }
6077
6078 func (c *ProjectsLocationsBareMetalAdminClustersEnrollCall) doRequest(alt string) (*http.Response, error) {
6079 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6080 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.enrollbaremetaladminclusterrequest)
6081 if err != nil {
6082 return nil, err
6083 }
6084 c.urlParams_.Set("alt", alt)
6085 c.urlParams_.Set("prettyPrint", "false")
6086 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/bareMetalAdminClusters:enroll")
6087 urls += "?" + c.urlParams_.Encode()
6088 req, err := http.NewRequest("POST", urls, body)
6089 if err != nil {
6090 return nil, err
6091 }
6092 req.Header = reqHeaders
6093 googleapi.Expand(req.URL, map[string]string{
6094 "parent": c.parent,
6095 })
6096 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.enroll", "request", internallog.HTTPRequest(req, body.Bytes()))
6097 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6098 }
6099
6100 // Do executes the "gkeonprem.projects.locations.bareMetalAdminClusters.enroll" call.
6101 // Any non-2xx status code is an error. Response headers are in either
6102 // *Operation.ServerResponse.Header or (if a response was returned at all) in
6103 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6104 // whether the returned error was because http.StatusNotModified was returned.
6105 func (c *ProjectsLocationsBareMetalAdminClustersEnrollCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6106 gensupport.SetOptions(c.urlParams_, opts...)
6107 res, err := c.doRequest("json")
6108 if res != nil && res.StatusCode == http.StatusNotModified {
6109 if res.Body != nil {
6110 res.Body.Close()
6111 }
6112 return nil, gensupport.WrapError(&googleapi.Error{
6113 Code: res.StatusCode,
6114 Header: res.Header,
6115 })
6116 }
6117 if err != nil {
6118 return nil, err
6119 }
6120 defer googleapi.CloseBody(res)
6121 if err := googleapi.CheckResponse(res); err != nil {
6122 return nil, gensupport.WrapError(err)
6123 }
6124 ret := &Operation{
6125 ServerResponse: googleapi.ServerResponse{
6126 Header: res.Header,
6127 HTTPStatusCode: res.StatusCode,
6128 },
6129 }
6130 target := &ret
6131 b, err := gensupport.DecodeResponseBytes(target, res)
6132 if err != nil {
6133 return nil, err
6134 }
6135 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.enroll", "response", internallog.HTTPResponse(res, b))
6136 return ret, nil
6137 }
6138
6139 type ProjectsLocationsBareMetalAdminClustersGetCall struct {
6140 s *Service
6141 name string
6142 urlParams_ gensupport.URLParams
6143 ifNoneMatch_ string
6144 ctx_ context.Context
6145 header_ http.Header
6146 }
6147
6148 // Get: Gets details of a single bare metal admin cluster.
6149 //
6150 // - name: Name of the bare metal admin cluster to get. Format:
6151 // "projects/{project}/locations/{location}/bareMetalAdminClusters/{bare_metal
6152 // _admin_cluster}".
6153 func (r *ProjectsLocationsBareMetalAdminClustersService) Get(name string) *ProjectsLocationsBareMetalAdminClustersGetCall {
6154 c := &ProjectsLocationsBareMetalAdminClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6155 c.name = name
6156 return c
6157 }
6158
6159 // AllowMissing sets the optional parameter "allowMissing": If true, return
6160 // BareMetal Admin Cluster including the one that only exists in RMS.
6161 func (c *ProjectsLocationsBareMetalAdminClustersGetCall) AllowMissing(allowMissing bool) *ProjectsLocationsBareMetalAdminClustersGetCall {
6162 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
6163 return c
6164 }
6165
6166 // View sets the optional parameter "view": View for bare metal admin cluster.
6167 // When `BASIC` is specified, only the cluster resource name and membership are
6168 // returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED` is the same as
6169 // `FULL', which returns the complete cluster configuration details.
6170 //
6171 // Possible values:
6172 //
6173 // "CLUSTER_VIEW_UNSPECIFIED" - If the value is not set, the default `FULL`
6174 //
6175 // view is used.
6176 //
6177 // "BASIC" - Includes basic information of a cluster resource including
6178 //
6179 // cluster resource name and membership.
6180 //
6181 // "FULL" - Includes the complete configuration for bare metal admin cluster
6182 //
6183 // resource. This is the default value for GetBareMetalAdminClusterRequest
6184 // method.
6185 func (c *ProjectsLocationsBareMetalAdminClustersGetCall) View(view string) *ProjectsLocationsBareMetalAdminClustersGetCall {
6186 c.urlParams_.Set("view", view)
6187 return c
6188 }
6189
6190 // Fields allows partial responses to be retrieved. See
6191 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6192 // details.
6193 func (c *ProjectsLocationsBareMetalAdminClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalAdminClustersGetCall {
6194 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6195 return c
6196 }
6197
6198 // IfNoneMatch sets an optional parameter which makes the operation fail if the
6199 // object's ETag matches the given value. This is useful for getting updates
6200 // only after the object has changed since the last request.
6201 func (c *ProjectsLocationsBareMetalAdminClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBareMetalAdminClustersGetCall {
6202 c.ifNoneMatch_ = entityTag
6203 return c
6204 }
6205
6206 // Context sets the context to be used in this call's Do method.
6207 func (c *ProjectsLocationsBareMetalAdminClustersGetCall) Context(ctx context.Context) *ProjectsLocationsBareMetalAdminClustersGetCall {
6208 c.ctx_ = ctx
6209 return c
6210 }
6211
6212 // Header returns a http.Header that can be modified by the caller to add
6213 // headers to the request.
6214 func (c *ProjectsLocationsBareMetalAdminClustersGetCall) Header() http.Header {
6215 if c.header_ == nil {
6216 c.header_ = make(http.Header)
6217 }
6218 return c.header_
6219 }
6220
6221 func (c *ProjectsLocationsBareMetalAdminClustersGetCall) doRequest(alt string) (*http.Response, error) {
6222 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6223 if c.ifNoneMatch_ != "" {
6224 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6225 }
6226 c.urlParams_.Set("alt", alt)
6227 c.urlParams_.Set("prettyPrint", "false")
6228 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6229 urls += "?" + c.urlParams_.Encode()
6230 req, err := http.NewRequest("GET", urls, nil)
6231 if err != nil {
6232 return nil, err
6233 }
6234 req.Header = reqHeaders
6235 googleapi.Expand(req.URL, map[string]string{
6236 "name": c.name,
6237 })
6238 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.get", "request", internallog.HTTPRequest(req, nil))
6239 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6240 }
6241
6242 // Do executes the "gkeonprem.projects.locations.bareMetalAdminClusters.get" call.
6243 // Any non-2xx status code is an error. Response headers are in either
6244 // *BareMetalAdminCluster.ServerResponse.Header or (if a response was returned
6245 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6246 // check whether the returned error was because http.StatusNotModified was
6247 // returned.
6248 func (c *ProjectsLocationsBareMetalAdminClustersGetCall) Do(opts ...googleapi.CallOption) (*BareMetalAdminCluster, error) {
6249 gensupport.SetOptions(c.urlParams_, opts...)
6250 res, err := c.doRequest("json")
6251 if res != nil && res.StatusCode == http.StatusNotModified {
6252 if res.Body != nil {
6253 res.Body.Close()
6254 }
6255 return nil, gensupport.WrapError(&googleapi.Error{
6256 Code: res.StatusCode,
6257 Header: res.Header,
6258 })
6259 }
6260 if err != nil {
6261 return nil, err
6262 }
6263 defer googleapi.CloseBody(res)
6264 if err := googleapi.CheckResponse(res); err != nil {
6265 return nil, gensupport.WrapError(err)
6266 }
6267 ret := &BareMetalAdminCluster{
6268 ServerResponse: googleapi.ServerResponse{
6269 Header: res.Header,
6270 HTTPStatusCode: res.StatusCode,
6271 },
6272 }
6273 target := &ret
6274 b, err := gensupport.DecodeResponseBytes(target, res)
6275 if err != nil {
6276 return nil, err
6277 }
6278 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.get", "response", internallog.HTTPResponse(res, b))
6279 return ret, nil
6280 }
6281
6282 type ProjectsLocationsBareMetalAdminClustersGetIamPolicyCall struct {
6283 s *Service
6284 resource string
6285 urlParams_ gensupport.URLParams
6286 ifNoneMatch_ string
6287 ctx_ context.Context
6288 header_ http.Header
6289 }
6290
6291 // GetIamPolicy: Gets the access control policy for a resource. Returns an
6292 // empty policy if the resource exists and does not have a policy set.
6293 //
6294 // - resource: REQUIRED: The resource for which the policy is being requested.
6295 // See Resource names (https://cloud.google.com/apis/design/resource_names)
6296 // for the appropriate value for this field.
6297 func (r *ProjectsLocationsBareMetalAdminClustersService) GetIamPolicy(resource string) *ProjectsLocationsBareMetalAdminClustersGetIamPolicyCall {
6298 c := &ProjectsLocationsBareMetalAdminClustersGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6299 c.resource = resource
6300 return c
6301 }
6302
6303 // OptionsRequestedPolicyVersion sets the optional parameter
6304 // "options.requestedPolicyVersion": The maximum policy version that will be
6305 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
6306 // an invalid value will be rejected. Requests for policies with any
6307 // conditional role bindings must specify version 3. Policies with no
6308 // conditional role bindings may specify any valid value or leave the field
6309 // unset. The policy in the response might use the policy version that you
6310 // specified, or it might use a lower policy version. For example, if you
6311 // specify version 3, but the policy has no conditional role bindings, the
6312 // response uses version 1. To learn which resources support conditions in
6313 // their IAM policies, see the IAM documentation
6314 // (https://cloud.google.com/iam/help/conditions/resource-policies).
6315 func (c *ProjectsLocationsBareMetalAdminClustersGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsBareMetalAdminClustersGetIamPolicyCall {
6316 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
6317 return c
6318 }
6319
6320 // Fields allows partial responses to be retrieved. See
6321 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6322 // details.
6323 func (c *ProjectsLocationsBareMetalAdminClustersGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalAdminClustersGetIamPolicyCall {
6324 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6325 return c
6326 }
6327
6328 // IfNoneMatch sets an optional parameter which makes the operation fail if the
6329 // object's ETag matches the given value. This is useful for getting updates
6330 // only after the object has changed since the last request.
6331 func (c *ProjectsLocationsBareMetalAdminClustersGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsBareMetalAdminClustersGetIamPolicyCall {
6332 c.ifNoneMatch_ = entityTag
6333 return c
6334 }
6335
6336 // Context sets the context to be used in this call's Do method.
6337 func (c *ProjectsLocationsBareMetalAdminClustersGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBareMetalAdminClustersGetIamPolicyCall {
6338 c.ctx_ = ctx
6339 return c
6340 }
6341
6342 // Header returns a http.Header that can be modified by the caller to add
6343 // headers to the request.
6344 func (c *ProjectsLocationsBareMetalAdminClustersGetIamPolicyCall) Header() http.Header {
6345 if c.header_ == nil {
6346 c.header_ = make(http.Header)
6347 }
6348 return c.header_
6349 }
6350
6351 func (c *ProjectsLocationsBareMetalAdminClustersGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
6352 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6353 if c.ifNoneMatch_ != "" {
6354 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6355 }
6356 c.urlParams_.Set("alt", alt)
6357 c.urlParams_.Set("prettyPrint", "false")
6358 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
6359 urls += "?" + c.urlParams_.Encode()
6360 req, err := http.NewRequest("GET", urls, nil)
6361 if err != nil {
6362 return nil, err
6363 }
6364 req.Header = reqHeaders
6365 googleapi.Expand(req.URL, map[string]string{
6366 "resource": c.resource,
6367 })
6368 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
6369 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6370 }
6371
6372 // Do executes the "gkeonprem.projects.locations.bareMetalAdminClusters.getIamPolicy" call.
6373 // Any non-2xx status code is an error. Response headers are in either
6374 // *Policy.ServerResponse.Header or (if a response was returned at all) in
6375 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6376 // whether the returned error was because http.StatusNotModified was returned.
6377 func (c *ProjectsLocationsBareMetalAdminClustersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6378 gensupport.SetOptions(c.urlParams_, opts...)
6379 res, err := c.doRequest("json")
6380 if res != nil && res.StatusCode == http.StatusNotModified {
6381 if res.Body != nil {
6382 res.Body.Close()
6383 }
6384 return nil, gensupport.WrapError(&googleapi.Error{
6385 Code: res.StatusCode,
6386 Header: res.Header,
6387 })
6388 }
6389 if err != nil {
6390 return nil, err
6391 }
6392 defer googleapi.CloseBody(res)
6393 if err := googleapi.CheckResponse(res); err != nil {
6394 return nil, gensupport.WrapError(err)
6395 }
6396 ret := &Policy{
6397 ServerResponse: googleapi.ServerResponse{
6398 Header: res.Header,
6399 HTTPStatusCode: res.StatusCode,
6400 },
6401 }
6402 target := &ret
6403 b, err := gensupport.DecodeResponseBytes(target, res)
6404 if err != nil {
6405 return nil, err
6406 }
6407 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.getIamPolicy", "response", internallog.HTTPResponse(res, b))
6408 return ret, nil
6409 }
6410
6411 type ProjectsLocationsBareMetalAdminClustersListCall struct {
6412 s *Service
6413 parent string
6414 urlParams_ gensupport.URLParams
6415 ifNoneMatch_ string
6416 ctx_ context.Context
6417 header_ http.Header
6418 }
6419
6420 // List: Lists bare metal admin clusters in a given project and location.
6421 //
6422 // - parent: The parent of the project and location where the clusters are
6423 // listed in. Format: "projects/{project}/locations/{location}".
6424 func (r *ProjectsLocationsBareMetalAdminClustersService) List(parent string) *ProjectsLocationsBareMetalAdminClustersListCall {
6425 c := &ProjectsLocationsBareMetalAdminClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6426 c.parent = parent
6427 return c
6428 }
6429
6430 // AllowMissing sets the optional parameter "allowMissing": If true, return
6431 // list of BareMetal Admin Clusters including the ones that only exists in RMS.
6432 func (c *ProjectsLocationsBareMetalAdminClustersListCall) AllowMissing(allowMissing bool) *ProjectsLocationsBareMetalAdminClustersListCall {
6433 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
6434 return c
6435 }
6436
6437 // PageSize sets the optional parameter "pageSize": Requested page size. Server
6438 // may return fewer items than requested. If unspecified, at most 50 clusters
6439 // will be returned. The maximum value is 1000; values above 1000 will be
6440 // coerced to 1000.
6441 func (c *ProjectsLocationsBareMetalAdminClustersListCall) PageSize(pageSize int64) *ProjectsLocationsBareMetalAdminClustersListCall {
6442 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6443 return c
6444 }
6445
6446 // PageToken sets the optional parameter "pageToken": A token identifying a
6447 // page of results the server should return.
6448 func (c *ProjectsLocationsBareMetalAdminClustersListCall) PageToken(pageToken string) *ProjectsLocationsBareMetalAdminClustersListCall {
6449 c.urlParams_.Set("pageToken", pageToken)
6450 return c
6451 }
6452
6453 // View sets the optional parameter "view": View for bare metal admin clusters.
6454 // When `BASIC` is specified, only the admin cluster resource name and
6455 // membership are returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED`
6456 // is the same as `FULL', which returns the complete admin cluster
6457 // configuration details.
6458 //
6459 // Possible values:
6460 //
6461 // "CLUSTER_VIEW_UNSPECIFIED" - If the value is not set, the default `FULL`
6462 //
6463 // view is used.
6464 //
6465 // "BASIC" - Includes basic information of a admin cluster resource including
6466 //
6467 // admin cluster resource name and membership.
6468 //
6469 // "FULL" - Includes the complete configuration for bare metal admin cluster
6470 //
6471 // resource. This is the default value for ListBareMetalAdminClustersRequest
6472 // method.
6473 func (c *ProjectsLocationsBareMetalAdminClustersListCall) View(view string) *ProjectsLocationsBareMetalAdminClustersListCall {
6474 c.urlParams_.Set("view", view)
6475 return c
6476 }
6477
6478 // Fields allows partial responses to be retrieved. See
6479 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6480 // details.
6481 func (c *ProjectsLocationsBareMetalAdminClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalAdminClustersListCall {
6482 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6483 return c
6484 }
6485
6486 // IfNoneMatch sets an optional parameter which makes the operation fail if the
6487 // object's ETag matches the given value. This is useful for getting updates
6488 // only after the object has changed since the last request.
6489 func (c *ProjectsLocationsBareMetalAdminClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBareMetalAdminClustersListCall {
6490 c.ifNoneMatch_ = entityTag
6491 return c
6492 }
6493
6494 // Context sets the context to be used in this call's Do method.
6495 func (c *ProjectsLocationsBareMetalAdminClustersListCall) Context(ctx context.Context) *ProjectsLocationsBareMetalAdminClustersListCall {
6496 c.ctx_ = ctx
6497 return c
6498 }
6499
6500 // Header returns a http.Header that can be modified by the caller to add
6501 // headers to the request.
6502 func (c *ProjectsLocationsBareMetalAdminClustersListCall) Header() http.Header {
6503 if c.header_ == nil {
6504 c.header_ = make(http.Header)
6505 }
6506 return c.header_
6507 }
6508
6509 func (c *ProjectsLocationsBareMetalAdminClustersListCall) doRequest(alt string) (*http.Response, error) {
6510 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6511 if c.ifNoneMatch_ != "" {
6512 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6513 }
6514 c.urlParams_.Set("alt", alt)
6515 c.urlParams_.Set("prettyPrint", "false")
6516 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/bareMetalAdminClusters")
6517 urls += "?" + c.urlParams_.Encode()
6518 req, err := http.NewRequest("GET", urls, nil)
6519 if err != nil {
6520 return nil, err
6521 }
6522 req.Header = reqHeaders
6523 googleapi.Expand(req.URL, map[string]string{
6524 "parent": c.parent,
6525 })
6526 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.list", "request", internallog.HTTPRequest(req, nil))
6527 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6528 }
6529
6530 // Do executes the "gkeonprem.projects.locations.bareMetalAdminClusters.list" call.
6531 // Any non-2xx status code is an error. Response headers are in either
6532 // *ListBareMetalAdminClustersResponse.ServerResponse.Header or (if a response
6533 // was returned at all) in error.(*googleapi.Error).Header. Use
6534 // googleapi.IsNotModified to check whether the returned error was because
6535 // http.StatusNotModified was returned.
6536 func (c *ProjectsLocationsBareMetalAdminClustersListCall) Do(opts ...googleapi.CallOption) (*ListBareMetalAdminClustersResponse, error) {
6537 gensupport.SetOptions(c.urlParams_, opts...)
6538 res, err := c.doRequest("json")
6539 if res != nil && res.StatusCode == http.StatusNotModified {
6540 if res.Body != nil {
6541 res.Body.Close()
6542 }
6543 return nil, gensupport.WrapError(&googleapi.Error{
6544 Code: res.StatusCode,
6545 Header: res.Header,
6546 })
6547 }
6548 if err != nil {
6549 return nil, err
6550 }
6551 defer googleapi.CloseBody(res)
6552 if err := googleapi.CheckResponse(res); err != nil {
6553 return nil, gensupport.WrapError(err)
6554 }
6555 ret := &ListBareMetalAdminClustersResponse{
6556 ServerResponse: googleapi.ServerResponse{
6557 Header: res.Header,
6558 HTTPStatusCode: res.StatusCode,
6559 },
6560 }
6561 target := &ret
6562 b, err := gensupport.DecodeResponseBytes(target, res)
6563 if err != nil {
6564 return nil, err
6565 }
6566 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.list", "response", internallog.HTTPResponse(res, b))
6567 return ret, nil
6568 }
6569
6570 // Pages invokes f for each page of results.
6571 // A non-nil error returned from f will halt the iteration.
6572 // The provided context supersedes any context provided to the Context method.
6573 func (c *ProjectsLocationsBareMetalAdminClustersListCall) Pages(ctx context.Context, f func(*ListBareMetalAdminClustersResponse) error) error {
6574 c.ctx_ = ctx
6575 defer c.PageToken(c.urlParams_.Get("pageToken"))
6576 for {
6577 x, err := c.Do()
6578 if err != nil {
6579 return err
6580 }
6581 if err := f(x); err != nil {
6582 return err
6583 }
6584 if x.NextPageToken == "" {
6585 return nil
6586 }
6587 c.PageToken(x.NextPageToken)
6588 }
6589 }
6590
6591 type ProjectsLocationsBareMetalAdminClustersPatchCall struct {
6592 s *Service
6593 name string
6594 baremetaladmincluster *BareMetalAdminCluster
6595 urlParams_ gensupport.URLParams
6596 ctx_ context.Context
6597 header_ http.Header
6598 }
6599
6600 // Patch: Updates the parameters of a single bare metal admin cluster.
6601 //
6602 // - name: Immutable. The bare metal admin cluster resource name.
6603 func (r *ProjectsLocationsBareMetalAdminClustersService) Patch(name string, baremetaladmincluster *BareMetalAdminCluster) *ProjectsLocationsBareMetalAdminClustersPatchCall {
6604 c := &ProjectsLocationsBareMetalAdminClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6605 c.name = name
6606 c.baremetaladmincluster = baremetaladmincluster
6607 return c
6608 }
6609
6610 // UpdateMask sets the optional parameter "updateMask": Required. Field mask is
6611 // used to specify the fields to be overwritten in the BareMetalAdminCluster
6612 // resource by the update. The fields specified in the update_mask are relative
6613 // to the resource, not the full request. A field will be overwritten if it is
6614 // in the mask. If the user does not provide a mask then all populated fields
6615 // in the BareMetalAdminCluster message will be updated. Empty fields will be
6616 // ignored unless a field mask is used.
6617 func (c *ProjectsLocationsBareMetalAdminClustersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBareMetalAdminClustersPatchCall {
6618 c.urlParams_.Set("updateMask", updateMask)
6619 return c
6620 }
6621
6622 // ValidateOnly sets the optional parameter "validateOnly": Validate the
6623 // request without actually doing any updates.
6624 func (c *ProjectsLocationsBareMetalAdminClustersPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBareMetalAdminClustersPatchCall {
6625 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
6626 return c
6627 }
6628
6629 // Fields allows partial responses to be retrieved. See
6630 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6631 // details.
6632 func (c *ProjectsLocationsBareMetalAdminClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalAdminClustersPatchCall {
6633 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6634 return c
6635 }
6636
6637 // Context sets the context to be used in this call's Do method.
6638 func (c *ProjectsLocationsBareMetalAdminClustersPatchCall) Context(ctx context.Context) *ProjectsLocationsBareMetalAdminClustersPatchCall {
6639 c.ctx_ = ctx
6640 return c
6641 }
6642
6643 // Header returns a http.Header that can be modified by the caller to add
6644 // headers to the request.
6645 func (c *ProjectsLocationsBareMetalAdminClustersPatchCall) Header() http.Header {
6646 if c.header_ == nil {
6647 c.header_ = make(http.Header)
6648 }
6649 return c.header_
6650 }
6651
6652 func (c *ProjectsLocationsBareMetalAdminClustersPatchCall) doRequest(alt string) (*http.Response, error) {
6653 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6654 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.baremetaladmincluster)
6655 if err != nil {
6656 return nil, err
6657 }
6658 c.urlParams_.Set("alt", alt)
6659 c.urlParams_.Set("prettyPrint", "false")
6660 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6661 urls += "?" + c.urlParams_.Encode()
6662 req, err := http.NewRequest("PATCH", urls, body)
6663 if err != nil {
6664 return nil, err
6665 }
6666 req.Header = reqHeaders
6667 googleapi.Expand(req.URL, map[string]string{
6668 "name": c.name,
6669 })
6670 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
6671 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6672 }
6673
6674 // Do executes the "gkeonprem.projects.locations.bareMetalAdminClusters.patch" call.
6675 // Any non-2xx status code is an error. Response headers are in either
6676 // *Operation.ServerResponse.Header or (if a response was returned at all) in
6677 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6678 // whether the returned error was because http.StatusNotModified was returned.
6679 func (c *ProjectsLocationsBareMetalAdminClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6680 gensupport.SetOptions(c.urlParams_, opts...)
6681 res, err := c.doRequest("json")
6682 if res != nil && res.StatusCode == http.StatusNotModified {
6683 if res.Body != nil {
6684 res.Body.Close()
6685 }
6686 return nil, gensupport.WrapError(&googleapi.Error{
6687 Code: res.StatusCode,
6688 Header: res.Header,
6689 })
6690 }
6691 if err != nil {
6692 return nil, err
6693 }
6694 defer googleapi.CloseBody(res)
6695 if err := googleapi.CheckResponse(res); err != nil {
6696 return nil, gensupport.WrapError(err)
6697 }
6698 ret := &Operation{
6699 ServerResponse: googleapi.ServerResponse{
6700 Header: res.Header,
6701 HTTPStatusCode: res.StatusCode,
6702 },
6703 }
6704 target := &ret
6705 b, err := gensupport.DecodeResponseBytes(target, res)
6706 if err != nil {
6707 return nil, err
6708 }
6709 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.patch", "response", internallog.HTTPResponse(res, b))
6710 return ret, nil
6711 }
6712
6713 type ProjectsLocationsBareMetalAdminClustersQueryVersionConfigCall struct {
6714 s *Service
6715 parent string
6716 urlParams_ gensupport.URLParams
6717 ctx_ context.Context
6718 header_ http.Header
6719 }
6720
6721 // QueryVersionConfig: Queries the bare metal admin cluster version config.
6722 //
6723 // - parent: The parent of the project and location to query for version
6724 // config. Format: "projects/{project}/locations/{location}".
6725 func (r *ProjectsLocationsBareMetalAdminClustersService) QueryVersionConfig(parent string) *ProjectsLocationsBareMetalAdminClustersQueryVersionConfigCall {
6726 c := &ProjectsLocationsBareMetalAdminClustersQueryVersionConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6727 c.parent = parent
6728 return c
6729 }
6730
6731 // UpgradeConfigClusterName sets the optional parameter
6732 // "upgradeConfig.clusterName": The admin cluster resource name. This is the
6733 // full resource name of the admin cluster resource. Format:
6734 // "projects/{project}/locations/{location}/bareMetalAdminClusters/{bare_metal_a
6735 // dmin_cluster}"
6736 func (c *ProjectsLocationsBareMetalAdminClustersQueryVersionConfigCall) UpgradeConfigClusterName(upgradeConfigClusterName string) *ProjectsLocationsBareMetalAdminClustersQueryVersionConfigCall {
6737 c.urlParams_.Set("upgradeConfig.clusterName", upgradeConfigClusterName)
6738 return c
6739 }
6740
6741 // Fields allows partial responses to be retrieved. See
6742 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6743 // details.
6744 func (c *ProjectsLocationsBareMetalAdminClustersQueryVersionConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalAdminClustersQueryVersionConfigCall {
6745 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6746 return c
6747 }
6748
6749 // Context sets the context to be used in this call's Do method.
6750 func (c *ProjectsLocationsBareMetalAdminClustersQueryVersionConfigCall) Context(ctx context.Context) *ProjectsLocationsBareMetalAdminClustersQueryVersionConfigCall {
6751 c.ctx_ = ctx
6752 return c
6753 }
6754
6755 // Header returns a http.Header that can be modified by the caller to add
6756 // headers to the request.
6757 func (c *ProjectsLocationsBareMetalAdminClustersQueryVersionConfigCall) Header() http.Header {
6758 if c.header_ == nil {
6759 c.header_ = make(http.Header)
6760 }
6761 return c.header_
6762 }
6763
6764 func (c *ProjectsLocationsBareMetalAdminClustersQueryVersionConfigCall) doRequest(alt string) (*http.Response, error) {
6765 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6766 c.urlParams_.Set("alt", alt)
6767 c.urlParams_.Set("prettyPrint", "false")
6768 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/bareMetalAdminClusters:queryVersionConfig")
6769 urls += "?" + c.urlParams_.Encode()
6770 req, err := http.NewRequest("POST", urls, nil)
6771 if err != nil {
6772 return nil, err
6773 }
6774 req.Header = reqHeaders
6775 googleapi.Expand(req.URL, map[string]string{
6776 "parent": c.parent,
6777 })
6778 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.queryVersionConfig", "request", internallog.HTTPRequest(req, nil))
6779 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6780 }
6781
6782 // Do executes the "gkeonprem.projects.locations.bareMetalAdminClusters.queryVersionConfig" call.
6783 // Any non-2xx status code is an error. Response headers are in either
6784 // *QueryBareMetalAdminVersionConfigResponse.ServerResponse.Header or (if a
6785 // response was returned at all) in error.(*googleapi.Error).Header. Use
6786 // googleapi.IsNotModified to check whether the returned error was because
6787 // http.StatusNotModified was returned.
6788 func (c *ProjectsLocationsBareMetalAdminClustersQueryVersionConfigCall) Do(opts ...googleapi.CallOption) (*QueryBareMetalAdminVersionConfigResponse, error) {
6789 gensupport.SetOptions(c.urlParams_, opts...)
6790 res, err := c.doRequest("json")
6791 if res != nil && res.StatusCode == http.StatusNotModified {
6792 if res.Body != nil {
6793 res.Body.Close()
6794 }
6795 return nil, gensupport.WrapError(&googleapi.Error{
6796 Code: res.StatusCode,
6797 Header: res.Header,
6798 })
6799 }
6800 if err != nil {
6801 return nil, err
6802 }
6803 defer googleapi.CloseBody(res)
6804 if err := googleapi.CheckResponse(res); err != nil {
6805 return nil, gensupport.WrapError(err)
6806 }
6807 ret := &QueryBareMetalAdminVersionConfigResponse{
6808 ServerResponse: googleapi.ServerResponse{
6809 Header: res.Header,
6810 HTTPStatusCode: res.StatusCode,
6811 },
6812 }
6813 target := &ret
6814 b, err := gensupport.DecodeResponseBytes(target, res)
6815 if err != nil {
6816 return nil, err
6817 }
6818 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.queryVersionConfig", "response", internallog.HTTPResponse(res, b))
6819 return ret, nil
6820 }
6821
6822 type ProjectsLocationsBareMetalAdminClustersSetIamPolicyCall struct {
6823 s *Service
6824 resource string
6825 setiampolicyrequest *SetIamPolicyRequest
6826 urlParams_ gensupport.URLParams
6827 ctx_ context.Context
6828 header_ http.Header
6829 }
6830
6831 // SetIamPolicy: Sets the access control policy on the specified resource.
6832 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
6833 // and `PERMISSION_DENIED` errors.
6834 //
6835 // - resource: REQUIRED: The resource for which the policy is being specified.
6836 // See Resource names (https://cloud.google.com/apis/design/resource_names)
6837 // for the appropriate value for this field.
6838 func (r *ProjectsLocationsBareMetalAdminClustersService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsBareMetalAdminClustersSetIamPolicyCall {
6839 c := &ProjectsLocationsBareMetalAdminClustersSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6840 c.resource = resource
6841 c.setiampolicyrequest = setiampolicyrequest
6842 return c
6843 }
6844
6845 // Fields allows partial responses to be retrieved. See
6846 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6847 // details.
6848 func (c *ProjectsLocationsBareMetalAdminClustersSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalAdminClustersSetIamPolicyCall {
6849 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6850 return c
6851 }
6852
6853 // Context sets the context to be used in this call's Do method.
6854 func (c *ProjectsLocationsBareMetalAdminClustersSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBareMetalAdminClustersSetIamPolicyCall {
6855 c.ctx_ = ctx
6856 return c
6857 }
6858
6859 // Header returns a http.Header that can be modified by the caller to add
6860 // headers to the request.
6861 func (c *ProjectsLocationsBareMetalAdminClustersSetIamPolicyCall) Header() http.Header {
6862 if c.header_ == nil {
6863 c.header_ = make(http.Header)
6864 }
6865 return c.header_
6866 }
6867
6868 func (c *ProjectsLocationsBareMetalAdminClustersSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
6869 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6870 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
6871 if err != nil {
6872 return nil, err
6873 }
6874 c.urlParams_.Set("alt", alt)
6875 c.urlParams_.Set("prettyPrint", "false")
6876 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
6877 urls += "?" + c.urlParams_.Encode()
6878 req, err := http.NewRequest("POST", urls, body)
6879 if err != nil {
6880 return nil, err
6881 }
6882 req.Header = reqHeaders
6883 googleapi.Expand(req.URL, map[string]string{
6884 "resource": c.resource,
6885 })
6886 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
6887 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6888 }
6889
6890 // Do executes the "gkeonprem.projects.locations.bareMetalAdminClusters.setIamPolicy" call.
6891 // Any non-2xx status code is an error. Response headers are in either
6892 // *Policy.ServerResponse.Header or (if a response was returned at all) in
6893 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6894 // whether the returned error was because http.StatusNotModified was returned.
6895 func (c *ProjectsLocationsBareMetalAdminClustersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6896 gensupport.SetOptions(c.urlParams_, opts...)
6897 res, err := c.doRequest("json")
6898 if res != nil && res.StatusCode == http.StatusNotModified {
6899 if res.Body != nil {
6900 res.Body.Close()
6901 }
6902 return nil, gensupport.WrapError(&googleapi.Error{
6903 Code: res.StatusCode,
6904 Header: res.Header,
6905 })
6906 }
6907 if err != nil {
6908 return nil, err
6909 }
6910 defer googleapi.CloseBody(res)
6911 if err := googleapi.CheckResponse(res); err != nil {
6912 return nil, gensupport.WrapError(err)
6913 }
6914 ret := &Policy{
6915 ServerResponse: googleapi.ServerResponse{
6916 Header: res.Header,
6917 HTTPStatusCode: res.StatusCode,
6918 },
6919 }
6920 target := &ret
6921 b, err := gensupport.DecodeResponseBytes(target, res)
6922 if err != nil {
6923 return nil, err
6924 }
6925 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.setIamPolicy", "response", internallog.HTTPResponse(res, b))
6926 return ret, nil
6927 }
6928
6929 type ProjectsLocationsBareMetalAdminClustersTestIamPermissionsCall struct {
6930 s *Service
6931 resource string
6932 testiampermissionsrequest *TestIamPermissionsRequest
6933 urlParams_ gensupport.URLParams
6934 ctx_ context.Context
6935 header_ http.Header
6936 }
6937
6938 // TestIamPermissions: Returns permissions that a caller has on the specified
6939 // resource. If the resource does not exist, this will return an empty set of
6940 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
6941 // used for building permission-aware UIs and command-line tools, not for
6942 // authorization checking. This operation may "fail open" without warning.
6943 //
6944 // - resource: REQUIRED: The resource for which the policy detail is being
6945 // requested. See Resource names
6946 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
6947 // value for this field.
6948 func (r *ProjectsLocationsBareMetalAdminClustersService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsBareMetalAdminClustersTestIamPermissionsCall {
6949 c := &ProjectsLocationsBareMetalAdminClustersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6950 c.resource = resource
6951 c.testiampermissionsrequest = testiampermissionsrequest
6952 return c
6953 }
6954
6955 // Fields allows partial responses to be retrieved. See
6956 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6957 // details.
6958 func (c *ProjectsLocationsBareMetalAdminClustersTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalAdminClustersTestIamPermissionsCall {
6959 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6960 return c
6961 }
6962
6963 // Context sets the context to be used in this call's Do method.
6964 func (c *ProjectsLocationsBareMetalAdminClustersTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsBareMetalAdminClustersTestIamPermissionsCall {
6965 c.ctx_ = ctx
6966 return c
6967 }
6968
6969 // Header returns a http.Header that can be modified by the caller to add
6970 // headers to the request.
6971 func (c *ProjectsLocationsBareMetalAdminClustersTestIamPermissionsCall) Header() http.Header {
6972 if c.header_ == nil {
6973 c.header_ = make(http.Header)
6974 }
6975 return c.header_
6976 }
6977
6978 func (c *ProjectsLocationsBareMetalAdminClustersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
6979 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6980 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
6981 if err != nil {
6982 return nil, err
6983 }
6984 c.urlParams_.Set("alt", alt)
6985 c.urlParams_.Set("prettyPrint", "false")
6986 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
6987 urls += "?" + c.urlParams_.Encode()
6988 req, err := http.NewRequest("POST", urls, body)
6989 if err != nil {
6990 return nil, err
6991 }
6992 req.Header = reqHeaders
6993 googleapi.Expand(req.URL, map[string]string{
6994 "resource": c.resource,
6995 })
6996 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
6997 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6998 }
6999
7000 // Do executes the "gkeonprem.projects.locations.bareMetalAdminClusters.testIamPermissions" call.
7001 // Any non-2xx status code is an error. Response headers are in either
7002 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
7003 // returned at all) in error.(*googleapi.Error).Header. Use
7004 // googleapi.IsNotModified to check whether the returned error was because
7005 // http.StatusNotModified was returned.
7006 func (c *ProjectsLocationsBareMetalAdminClustersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
7007 gensupport.SetOptions(c.urlParams_, opts...)
7008 res, err := c.doRequest("json")
7009 if res != nil && res.StatusCode == http.StatusNotModified {
7010 if res.Body != nil {
7011 res.Body.Close()
7012 }
7013 return nil, gensupport.WrapError(&googleapi.Error{
7014 Code: res.StatusCode,
7015 Header: res.Header,
7016 })
7017 }
7018 if err != nil {
7019 return nil, err
7020 }
7021 defer googleapi.CloseBody(res)
7022 if err := googleapi.CheckResponse(res); err != nil {
7023 return nil, gensupport.WrapError(err)
7024 }
7025 ret := &TestIamPermissionsResponse{
7026 ServerResponse: googleapi.ServerResponse{
7027 Header: res.Header,
7028 HTTPStatusCode: res.StatusCode,
7029 },
7030 }
7031 target := &ret
7032 b, err := gensupport.DecodeResponseBytes(target, res)
7033 if err != nil {
7034 return nil, err
7035 }
7036 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.testIamPermissions", "response", internallog.HTTPResponse(res, b))
7037 return ret, nil
7038 }
7039
7040 type ProjectsLocationsBareMetalAdminClustersUnenrollCall struct {
7041 s *Service
7042 name string
7043 urlParams_ gensupport.URLParams
7044 ctx_ context.Context
7045 header_ http.Header
7046 }
7047
7048 // Unenroll: Unenrolls an existing bare metal admin cluster from the Anthos
7049 // On-Prem API within a given project and location. Unenrollment removes the
7050 // Cloud reference to the cluster without modifying the underlying OnPrem
7051 // Resources. Clusters will continue to run; however, they will no longer be
7052 // accessible through the Anthos On-Prem API or its clients.
7053 //
7054 // - name: Name of the bare metal admin cluster to be unenrolled. Format:
7055 // "projects/{project}/locations/{location}/bareMetalAdminClusters/{cluster}".
7056 func (r *ProjectsLocationsBareMetalAdminClustersService) Unenroll(name string) *ProjectsLocationsBareMetalAdminClustersUnenrollCall {
7057 c := &ProjectsLocationsBareMetalAdminClustersUnenrollCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7058 c.name = name
7059 return c
7060 }
7061
7062 // AllowMissing sets the optional parameter "allowMissing": If set to true, and
7063 // the bare metal admin cluster is not found, the request will succeed but no
7064 // action will be taken on the server and return a completed LRO.
7065 func (c *ProjectsLocationsBareMetalAdminClustersUnenrollCall) AllowMissing(allowMissing bool) *ProjectsLocationsBareMetalAdminClustersUnenrollCall {
7066 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
7067 return c
7068 }
7069
7070 // Etag sets the optional parameter "etag": The current etag of the bare metal
7071 // admin cluster. If an etag is provided and does not match the current etag of
7072 // the cluster, deletion will be blocked and an ABORTED error will be returned.
7073 func (c *ProjectsLocationsBareMetalAdminClustersUnenrollCall) Etag(etag string) *ProjectsLocationsBareMetalAdminClustersUnenrollCall {
7074 c.urlParams_.Set("etag", etag)
7075 return c
7076 }
7077
7078 // IgnoreErrors sets the optional parameter "ignoreErrors": If set to true, the
7079 // unenrollment of a bare metal admin cluster resource will succeed even if
7080 // errors occur during unenrollment. This parameter can be used when you want
7081 // to unenroll admin cluster resource and the on-prem admin cluster is
7082 // disconnected / unreachable. WARNING: Using this parameter when your admin
7083 // cluster still exists may result in a deleted GCP admin cluster but existing
7084 // resourcelink in on-prem admin cluster and membership.
7085 func (c *ProjectsLocationsBareMetalAdminClustersUnenrollCall) IgnoreErrors(ignoreErrors bool) *ProjectsLocationsBareMetalAdminClustersUnenrollCall {
7086 c.urlParams_.Set("ignoreErrors", fmt.Sprint(ignoreErrors))
7087 return c
7088 }
7089
7090 // ValidateOnly sets the optional parameter "validateOnly": Validate the
7091 // request without actually doing any updates.
7092 func (c *ProjectsLocationsBareMetalAdminClustersUnenrollCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBareMetalAdminClustersUnenrollCall {
7093 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
7094 return c
7095 }
7096
7097 // Fields allows partial responses to be retrieved. See
7098 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7099 // details.
7100 func (c *ProjectsLocationsBareMetalAdminClustersUnenrollCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalAdminClustersUnenrollCall {
7101 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7102 return c
7103 }
7104
7105 // Context sets the context to be used in this call's Do method.
7106 func (c *ProjectsLocationsBareMetalAdminClustersUnenrollCall) Context(ctx context.Context) *ProjectsLocationsBareMetalAdminClustersUnenrollCall {
7107 c.ctx_ = ctx
7108 return c
7109 }
7110
7111 // Header returns a http.Header that can be modified by the caller to add
7112 // headers to the request.
7113 func (c *ProjectsLocationsBareMetalAdminClustersUnenrollCall) Header() http.Header {
7114 if c.header_ == nil {
7115 c.header_ = make(http.Header)
7116 }
7117 return c.header_
7118 }
7119
7120 func (c *ProjectsLocationsBareMetalAdminClustersUnenrollCall) doRequest(alt string) (*http.Response, error) {
7121 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7122 c.urlParams_.Set("alt", alt)
7123 c.urlParams_.Set("prettyPrint", "false")
7124 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:unenroll")
7125 urls += "?" + c.urlParams_.Encode()
7126 req, err := http.NewRequest("DELETE", urls, nil)
7127 if err != nil {
7128 return nil, err
7129 }
7130 req.Header = reqHeaders
7131 googleapi.Expand(req.URL, map[string]string{
7132 "name": c.name,
7133 })
7134 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.unenroll", "request", internallog.HTTPRequest(req, nil))
7135 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7136 }
7137
7138 // Do executes the "gkeonprem.projects.locations.bareMetalAdminClusters.unenroll" call.
7139 // Any non-2xx status code is an error. Response headers are in either
7140 // *Operation.ServerResponse.Header or (if a response was returned at all) in
7141 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7142 // whether the returned error was because http.StatusNotModified was returned.
7143 func (c *ProjectsLocationsBareMetalAdminClustersUnenrollCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7144 gensupport.SetOptions(c.urlParams_, opts...)
7145 res, err := c.doRequest("json")
7146 if res != nil && res.StatusCode == http.StatusNotModified {
7147 if res.Body != nil {
7148 res.Body.Close()
7149 }
7150 return nil, gensupport.WrapError(&googleapi.Error{
7151 Code: res.StatusCode,
7152 Header: res.Header,
7153 })
7154 }
7155 if err != nil {
7156 return nil, err
7157 }
7158 defer googleapi.CloseBody(res)
7159 if err := googleapi.CheckResponse(res); err != nil {
7160 return nil, gensupport.WrapError(err)
7161 }
7162 ret := &Operation{
7163 ServerResponse: googleapi.ServerResponse{
7164 Header: res.Header,
7165 HTTPStatusCode: res.StatusCode,
7166 },
7167 }
7168 target := &ret
7169 b, err := gensupport.DecodeResponseBytes(target, res)
7170 if err != nil {
7171 return nil, err
7172 }
7173 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.unenroll", "response", internallog.HTTPResponse(res, b))
7174 return ret, nil
7175 }
7176
7177 type ProjectsLocationsBareMetalAdminClustersOperationsGetCall struct {
7178 s *Service
7179 name string
7180 urlParams_ gensupport.URLParams
7181 ifNoneMatch_ string
7182 ctx_ context.Context
7183 header_ http.Header
7184 }
7185
7186 // Get: Gets the latest state of a long-running operation. Clients can use this
7187 // method to poll the operation result at intervals as recommended by the API
7188 // service.
7189 //
7190 // - name: The name of the operation resource.
7191 func (r *ProjectsLocationsBareMetalAdminClustersOperationsService) Get(name string) *ProjectsLocationsBareMetalAdminClustersOperationsGetCall {
7192 c := &ProjectsLocationsBareMetalAdminClustersOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7193 c.name = name
7194 return c
7195 }
7196
7197 // Fields allows partial responses to be retrieved. See
7198 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7199 // details.
7200 func (c *ProjectsLocationsBareMetalAdminClustersOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalAdminClustersOperationsGetCall {
7201 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7202 return c
7203 }
7204
7205 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7206 // object's ETag matches the given value. This is useful for getting updates
7207 // only after the object has changed since the last request.
7208 func (c *ProjectsLocationsBareMetalAdminClustersOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBareMetalAdminClustersOperationsGetCall {
7209 c.ifNoneMatch_ = entityTag
7210 return c
7211 }
7212
7213 // Context sets the context to be used in this call's Do method.
7214 func (c *ProjectsLocationsBareMetalAdminClustersOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsBareMetalAdminClustersOperationsGetCall {
7215 c.ctx_ = ctx
7216 return c
7217 }
7218
7219 // Header returns a http.Header that can be modified by the caller to add
7220 // headers to the request.
7221 func (c *ProjectsLocationsBareMetalAdminClustersOperationsGetCall) Header() http.Header {
7222 if c.header_ == nil {
7223 c.header_ = make(http.Header)
7224 }
7225 return c.header_
7226 }
7227
7228 func (c *ProjectsLocationsBareMetalAdminClustersOperationsGetCall) doRequest(alt string) (*http.Response, error) {
7229 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7230 if c.ifNoneMatch_ != "" {
7231 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7232 }
7233 c.urlParams_.Set("alt", alt)
7234 c.urlParams_.Set("prettyPrint", "false")
7235 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7236 urls += "?" + c.urlParams_.Encode()
7237 req, err := http.NewRequest("GET", urls, nil)
7238 if err != nil {
7239 return nil, err
7240 }
7241 req.Header = reqHeaders
7242 googleapi.Expand(req.URL, map[string]string{
7243 "name": c.name,
7244 })
7245 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.operations.get", "request", internallog.HTTPRequest(req, nil))
7246 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7247 }
7248
7249 // Do executes the "gkeonprem.projects.locations.bareMetalAdminClusters.operations.get" call.
7250 // Any non-2xx status code is an error. Response headers are in either
7251 // *Operation.ServerResponse.Header or (if a response was returned at all) in
7252 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7253 // whether the returned error was because http.StatusNotModified was returned.
7254 func (c *ProjectsLocationsBareMetalAdminClustersOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7255 gensupport.SetOptions(c.urlParams_, opts...)
7256 res, err := c.doRequest("json")
7257 if res != nil && res.StatusCode == http.StatusNotModified {
7258 if res.Body != nil {
7259 res.Body.Close()
7260 }
7261 return nil, gensupport.WrapError(&googleapi.Error{
7262 Code: res.StatusCode,
7263 Header: res.Header,
7264 })
7265 }
7266 if err != nil {
7267 return nil, err
7268 }
7269 defer googleapi.CloseBody(res)
7270 if err := googleapi.CheckResponse(res); err != nil {
7271 return nil, gensupport.WrapError(err)
7272 }
7273 ret := &Operation{
7274 ServerResponse: googleapi.ServerResponse{
7275 Header: res.Header,
7276 HTTPStatusCode: res.StatusCode,
7277 },
7278 }
7279 target := &ret
7280 b, err := gensupport.DecodeResponseBytes(target, res)
7281 if err != nil {
7282 return nil, err
7283 }
7284 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.operations.get", "response", internallog.HTTPResponse(res, b))
7285 return ret, nil
7286 }
7287
7288 type ProjectsLocationsBareMetalAdminClustersOperationsListCall struct {
7289 s *Service
7290 name string
7291 urlParams_ gensupport.URLParams
7292 ifNoneMatch_ string
7293 ctx_ context.Context
7294 header_ http.Header
7295 }
7296
7297 // List: Lists operations that match the specified filter in the request. If
7298 // the server doesn't support this method, it returns `UNIMPLEMENTED`.
7299 //
7300 // - name: The name of the operation's parent resource.
7301 func (r *ProjectsLocationsBareMetalAdminClustersOperationsService) List(name string) *ProjectsLocationsBareMetalAdminClustersOperationsListCall {
7302 c := &ProjectsLocationsBareMetalAdminClustersOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7303 c.name = name
7304 return c
7305 }
7306
7307 // Filter sets the optional parameter "filter": The standard list filter.
7308 func (c *ProjectsLocationsBareMetalAdminClustersOperationsListCall) Filter(filter string) *ProjectsLocationsBareMetalAdminClustersOperationsListCall {
7309 c.urlParams_.Set("filter", filter)
7310 return c
7311 }
7312
7313 // PageSize sets the optional parameter "pageSize": The standard list page
7314 // size.
7315 func (c *ProjectsLocationsBareMetalAdminClustersOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsBareMetalAdminClustersOperationsListCall {
7316 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7317 return c
7318 }
7319
7320 // PageToken sets the optional parameter "pageToken": The standard list page
7321 // token.
7322 func (c *ProjectsLocationsBareMetalAdminClustersOperationsListCall) PageToken(pageToken string) *ProjectsLocationsBareMetalAdminClustersOperationsListCall {
7323 c.urlParams_.Set("pageToken", pageToken)
7324 return c
7325 }
7326
7327 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess":
7328 // When set to `true`, operations that are reachable are returned as normal,
7329 // and those that are unreachable are returned in the
7330 // ListOperationsResponse.unreachable field. This can only be `true` when
7331 // reading across collections. For example, when `parent` is set to
7332 // "projects/example/locations/-". This field is not supported by default and
7333 // will result in an `UNIMPLEMENTED` error if set unless explicitly documented
7334 // otherwise in service or product specific documentation.
7335 func (c *ProjectsLocationsBareMetalAdminClustersOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsBareMetalAdminClustersOperationsListCall {
7336 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
7337 return c
7338 }
7339
7340 // Fields allows partial responses to be retrieved. See
7341 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7342 // details.
7343 func (c *ProjectsLocationsBareMetalAdminClustersOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalAdminClustersOperationsListCall {
7344 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7345 return c
7346 }
7347
7348 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7349 // object's ETag matches the given value. This is useful for getting updates
7350 // only after the object has changed since the last request.
7351 func (c *ProjectsLocationsBareMetalAdminClustersOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBareMetalAdminClustersOperationsListCall {
7352 c.ifNoneMatch_ = entityTag
7353 return c
7354 }
7355
7356 // Context sets the context to be used in this call's Do method.
7357 func (c *ProjectsLocationsBareMetalAdminClustersOperationsListCall) Context(ctx context.Context) *ProjectsLocationsBareMetalAdminClustersOperationsListCall {
7358 c.ctx_ = ctx
7359 return c
7360 }
7361
7362 // Header returns a http.Header that can be modified by the caller to add
7363 // headers to the request.
7364 func (c *ProjectsLocationsBareMetalAdminClustersOperationsListCall) Header() http.Header {
7365 if c.header_ == nil {
7366 c.header_ = make(http.Header)
7367 }
7368 return c.header_
7369 }
7370
7371 func (c *ProjectsLocationsBareMetalAdminClustersOperationsListCall) doRequest(alt string) (*http.Response, error) {
7372 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7373 if c.ifNoneMatch_ != "" {
7374 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7375 }
7376 c.urlParams_.Set("alt", alt)
7377 c.urlParams_.Set("prettyPrint", "false")
7378 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
7379 urls += "?" + c.urlParams_.Encode()
7380 req, err := http.NewRequest("GET", urls, nil)
7381 if err != nil {
7382 return nil, err
7383 }
7384 req.Header = reqHeaders
7385 googleapi.Expand(req.URL, map[string]string{
7386 "name": c.name,
7387 })
7388 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.operations.list", "request", internallog.HTTPRequest(req, nil))
7389 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7390 }
7391
7392 // Do executes the "gkeonprem.projects.locations.bareMetalAdminClusters.operations.list" call.
7393 // Any non-2xx status code is an error. Response headers are in either
7394 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
7395 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7396 // check whether the returned error was because http.StatusNotModified was
7397 // returned.
7398 func (c *ProjectsLocationsBareMetalAdminClustersOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
7399 gensupport.SetOptions(c.urlParams_, opts...)
7400 res, err := c.doRequest("json")
7401 if res != nil && res.StatusCode == http.StatusNotModified {
7402 if res.Body != nil {
7403 res.Body.Close()
7404 }
7405 return nil, gensupport.WrapError(&googleapi.Error{
7406 Code: res.StatusCode,
7407 Header: res.Header,
7408 })
7409 }
7410 if err != nil {
7411 return nil, err
7412 }
7413 defer googleapi.CloseBody(res)
7414 if err := googleapi.CheckResponse(res); err != nil {
7415 return nil, gensupport.WrapError(err)
7416 }
7417 ret := &ListOperationsResponse{
7418 ServerResponse: googleapi.ServerResponse{
7419 Header: res.Header,
7420 HTTPStatusCode: res.StatusCode,
7421 },
7422 }
7423 target := &ret
7424 b, err := gensupport.DecodeResponseBytes(target, res)
7425 if err != nil {
7426 return nil, err
7427 }
7428 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalAdminClusters.operations.list", "response", internallog.HTTPResponse(res, b))
7429 return ret, nil
7430 }
7431
7432 // Pages invokes f for each page of results.
7433 // A non-nil error returned from f will halt the iteration.
7434 // The provided context supersedes any context provided to the Context method.
7435 func (c *ProjectsLocationsBareMetalAdminClustersOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
7436 c.ctx_ = ctx
7437 defer c.PageToken(c.urlParams_.Get("pageToken"))
7438 for {
7439 x, err := c.Do()
7440 if err != nil {
7441 return err
7442 }
7443 if err := f(x); err != nil {
7444 return err
7445 }
7446 if x.NextPageToken == "" {
7447 return nil
7448 }
7449 c.PageToken(x.NextPageToken)
7450 }
7451 }
7452
7453 type ProjectsLocationsBareMetalClustersCreateCall struct {
7454 s *Service
7455 parent string
7456 baremetalcluster *BareMetalCluster
7457 urlParams_ gensupport.URLParams
7458 ctx_ context.Context
7459 header_ http.Header
7460 }
7461
7462 // Create: Creates a new bare metal cluster in a given project and location.
7463 //
7464 // - parent: The parent of the project and location where the cluster is
7465 // created in. Format: "projects/{project}/locations/{location}".
7466 func (r *ProjectsLocationsBareMetalClustersService) Create(parent string, baremetalcluster *BareMetalCluster) *ProjectsLocationsBareMetalClustersCreateCall {
7467 c := &ProjectsLocationsBareMetalClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7468 c.parent = parent
7469 c.baremetalcluster = baremetalcluster
7470 return c
7471 }
7472
7473 // AllowPreflightFailure sets the optional parameter "allowPreflightFailure":
7474 // If set to true, CLM will force CCFE to persist the cluster resource in RMS
7475 // when the creation fails during standalone preflight checks. In that case the
7476 // subsequent create call will fail with "cluster already exists" error and
7477 // hence a update cluster is required to fix the cluster.
7478 func (c *ProjectsLocationsBareMetalClustersCreateCall) AllowPreflightFailure(allowPreflightFailure bool) *ProjectsLocationsBareMetalClustersCreateCall {
7479 c.urlParams_.Set("allowPreflightFailure", fmt.Sprint(allowPreflightFailure))
7480 return c
7481 }
7482
7483 // BareMetalClusterId sets the optional parameter "bareMetalClusterId":
7484 // Required. User provided identifier that is used as part of the resource
7485 // name; must conform to RFC-1034 and additionally restrict to lower-cased
7486 // letters. This comes out roughly to: /^a-z+[a-z0-9]$/
7487 func (c *ProjectsLocationsBareMetalClustersCreateCall) BareMetalClusterId(bareMetalClusterId string) *ProjectsLocationsBareMetalClustersCreateCall {
7488 c.urlParams_.Set("bareMetalClusterId", bareMetalClusterId)
7489 return c
7490 }
7491
7492 // ValidateOnly sets the optional parameter "validateOnly": Validate the
7493 // request without actually doing any updates.
7494 func (c *ProjectsLocationsBareMetalClustersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBareMetalClustersCreateCall {
7495 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
7496 return c
7497 }
7498
7499 // Fields allows partial responses to be retrieved. See
7500 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7501 // details.
7502 func (c *ProjectsLocationsBareMetalClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersCreateCall {
7503 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7504 return c
7505 }
7506
7507 // Context sets the context to be used in this call's Do method.
7508 func (c *ProjectsLocationsBareMetalClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersCreateCall {
7509 c.ctx_ = ctx
7510 return c
7511 }
7512
7513 // Header returns a http.Header that can be modified by the caller to add
7514 // headers to the request.
7515 func (c *ProjectsLocationsBareMetalClustersCreateCall) Header() http.Header {
7516 if c.header_ == nil {
7517 c.header_ = make(http.Header)
7518 }
7519 return c.header_
7520 }
7521
7522 func (c *ProjectsLocationsBareMetalClustersCreateCall) doRequest(alt string) (*http.Response, error) {
7523 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7524 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.baremetalcluster)
7525 if err != nil {
7526 return nil, err
7527 }
7528 c.urlParams_.Set("alt", alt)
7529 c.urlParams_.Set("prettyPrint", "false")
7530 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/bareMetalClusters")
7531 urls += "?" + c.urlParams_.Encode()
7532 req, err := http.NewRequest("POST", urls, body)
7533 if err != nil {
7534 return nil, err
7535 }
7536 req.Header = reqHeaders
7537 googleapi.Expand(req.URL, map[string]string{
7538 "parent": c.parent,
7539 })
7540 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.create", "request", internallog.HTTPRequest(req, body.Bytes()))
7541 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7542 }
7543
7544 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.create" call.
7545 // Any non-2xx status code is an error. Response headers are in either
7546 // *Operation.ServerResponse.Header or (if a response was returned at all) in
7547 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7548 // whether the returned error was because http.StatusNotModified was returned.
7549 func (c *ProjectsLocationsBareMetalClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7550 gensupport.SetOptions(c.urlParams_, opts...)
7551 res, err := c.doRequest("json")
7552 if res != nil && res.StatusCode == http.StatusNotModified {
7553 if res.Body != nil {
7554 res.Body.Close()
7555 }
7556 return nil, gensupport.WrapError(&googleapi.Error{
7557 Code: res.StatusCode,
7558 Header: res.Header,
7559 })
7560 }
7561 if err != nil {
7562 return nil, err
7563 }
7564 defer googleapi.CloseBody(res)
7565 if err := googleapi.CheckResponse(res); err != nil {
7566 return nil, gensupport.WrapError(err)
7567 }
7568 ret := &Operation{
7569 ServerResponse: googleapi.ServerResponse{
7570 Header: res.Header,
7571 HTTPStatusCode: res.StatusCode,
7572 },
7573 }
7574 target := &ret
7575 b, err := gensupport.DecodeResponseBytes(target, res)
7576 if err != nil {
7577 return nil, err
7578 }
7579 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.create", "response", internallog.HTTPResponse(res, b))
7580 return ret, nil
7581 }
7582
7583 type ProjectsLocationsBareMetalClustersDeleteCall struct {
7584 s *Service
7585 name string
7586 urlParams_ gensupport.URLParams
7587 ctx_ context.Context
7588 header_ http.Header
7589 }
7590
7591 // Delete: Deletes a single bare metal Cluster.
7592 //
7593 // - name: Name of the bare metal user cluster to be deleted. Format:
7594 // "projects/{project}/locations/{location}/bareMetalClusters/{bare_metal_clus
7595 // ter}".
7596 func (r *ProjectsLocationsBareMetalClustersService) Delete(name string) *ProjectsLocationsBareMetalClustersDeleteCall {
7597 c := &ProjectsLocationsBareMetalClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7598 c.name = name
7599 return c
7600 }
7601
7602 // AllowMissing sets the optional parameter "allowMissing": If set to true, and
7603 // the bare metal cluster is not found, the request will succeed but no action
7604 // will be taken on the server and return a completed LRO.
7605 func (c *ProjectsLocationsBareMetalClustersDeleteCall) AllowMissing(allowMissing bool) *ProjectsLocationsBareMetalClustersDeleteCall {
7606 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
7607 return c
7608 }
7609
7610 // Etag sets the optional parameter "etag": The current etag of the bare metal
7611 // Cluster. If an etag is provided and does not match the current etag of the
7612 // cluster, deletion will be blocked and an ABORTED error will be returned.
7613 func (c *ProjectsLocationsBareMetalClustersDeleteCall) Etag(etag string) *ProjectsLocationsBareMetalClustersDeleteCall {
7614 c.urlParams_.Set("etag", etag)
7615 return c
7616 }
7617
7618 // Force sets the optional parameter "force": If set to true, any node pools
7619 // from the cluster will also be deleted.
7620 func (c *ProjectsLocationsBareMetalClustersDeleteCall) Force(force bool) *ProjectsLocationsBareMetalClustersDeleteCall {
7621 c.urlParams_.Set("force", fmt.Sprint(force))
7622 return c
7623 }
7624
7625 // IgnoreErrors sets the optional parameter "ignoreErrors": If set to true, the
7626 // deletion of a bare metal user cluster resource will succeed even if errors
7627 // occur during deletion. This parameter can be used when you want to delete
7628 // GCP's cluster resource and the on-prem admin cluster that hosts your user
7629 // cluster is disconnected / unreachable or deleted. WARNING: Using this
7630 // parameter when your user cluster still exists may result in a deleted GCP
7631 // user cluster but an existing on-prem user cluster.
7632 func (c *ProjectsLocationsBareMetalClustersDeleteCall) IgnoreErrors(ignoreErrors bool) *ProjectsLocationsBareMetalClustersDeleteCall {
7633 c.urlParams_.Set("ignoreErrors", fmt.Sprint(ignoreErrors))
7634 return c
7635 }
7636
7637 // ValidateOnly sets the optional parameter "validateOnly": Validate the
7638 // request without actually doing any updates.
7639 func (c *ProjectsLocationsBareMetalClustersDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBareMetalClustersDeleteCall {
7640 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
7641 return c
7642 }
7643
7644 // Fields allows partial responses to be retrieved. See
7645 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7646 // details.
7647 func (c *ProjectsLocationsBareMetalClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersDeleteCall {
7648 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7649 return c
7650 }
7651
7652 // Context sets the context to be used in this call's Do method.
7653 func (c *ProjectsLocationsBareMetalClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersDeleteCall {
7654 c.ctx_ = ctx
7655 return c
7656 }
7657
7658 // Header returns a http.Header that can be modified by the caller to add
7659 // headers to the request.
7660 func (c *ProjectsLocationsBareMetalClustersDeleteCall) Header() http.Header {
7661 if c.header_ == nil {
7662 c.header_ = make(http.Header)
7663 }
7664 return c.header_
7665 }
7666
7667 func (c *ProjectsLocationsBareMetalClustersDeleteCall) doRequest(alt string) (*http.Response, error) {
7668 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7669 c.urlParams_.Set("alt", alt)
7670 c.urlParams_.Set("prettyPrint", "false")
7671 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7672 urls += "?" + c.urlParams_.Encode()
7673 req, err := http.NewRequest("DELETE", urls, nil)
7674 if err != nil {
7675 return nil, err
7676 }
7677 req.Header = reqHeaders
7678 googleapi.Expand(req.URL, map[string]string{
7679 "name": c.name,
7680 })
7681 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.delete", "request", internallog.HTTPRequest(req, nil))
7682 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7683 }
7684
7685 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.delete" call.
7686 // Any non-2xx status code is an error. Response headers are in either
7687 // *Operation.ServerResponse.Header or (if a response was returned at all) in
7688 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7689 // whether the returned error was because http.StatusNotModified was returned.
7690 func (c *ProjectsLocationsBareMetalClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7691 gensupport.SetOptions(c.urlParams_, opts...)
7692 res, err := c.doRequest("json")
7693 if res != nil && res.StatusCode == http.StatusNotModified {
7694 if res.Body != nil {
7695 res.Body.Close()
7696 }
7697 return nil, gensupport.WrapError(&googleapi.Error{
7698 Code: res.StatusCode,
7699 Header: res.Header,
7700 })
7701 }
7702 if err != nil {
7703 return nil, err
7704 }
7705 defer googleapi.CloseBody(res)
7706 if err := googleapi.CheckResponse(res); err != nil {
7707 return nil, gensupport.WrapError(err)
7708 }
7709 ret := &Operation{
7710 ServerResponse: googleapi.ServerResponse{
7711 Header: res.Header,
7712 HTTPStatusCode: res.StatusCode,
7713 },
7714 }
7715 target := &ret
7716 b, err := gensupport.DecodeResponseBytes(target, res)
7717 if err != nil {
7718 return nil, err
7719 }
7720 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.delete", "response", internallog.HTTPResponse(res, b))
7721 return ret, nil
7722 }
7723
7724 type ProjectsLocationsBareMetalClustersEnrollCall struct {
7725 s *Service
7726 parent string
7727 enrollbaremetalclusterrequest *EnrollBareMetalClusterRequest
7728 urlParams_ gensupport.URLParams
7729 ctx_ context.Context
7730 header_ http.Header
7731 }
7732
7733 // Enroll: Enrolls an existing bare metal user cluster and its node pools to
7734 // the Anthos On-Prem API within a given project and location. Through
7735 // enrollment, an existing cluster will become Anthos On-Prem API managed. The
7736 // corresponding GCP resources will be created and all future modifications to
7737 // the cluster and/or its node pools will be expected to be performed through
7738 // the API.
7739 //
7740 // - parent: The parent of the project and location where the cluster is
7741 // enrolled in. Format: "projects/{project}/locations/{location}".
7742 func (r *ProjectsLocationsBareMetalClustersService) Enroll(parent string, enrollbaremetalclusterrequest *EnrollBareMetalClusterRequest) *ProjectsLocationsBareMetalClustersEnrollCall {
7743 c := &ProjectsLocationsBareMetalClustersEnrollCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7744 c.parent = parent
7745 c.enrollbaremetalclusterrequest = enrollbaremetalclusterrequest
7746 return c
7747 }
7748
7749 // Fields allows partial responses to be retrieved. See
7750 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7751 // details.
7752 func (c *ProjectsLocationsBareMetalClustersEnrollCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersEnrollCall {
7753 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7754 return c
7755 }
7756
7757 // Context sets the context to be used in this call's Do method.
7758 func (c *ProjectsLocationsBareMetalClustersEnrollCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersEnrollCall {
7759 c.ctx_ = ctx
7760 return c
7761 }
7762
7763 // Header returns a http.Header that can be modified by the caller to add
7764 // headers to the request.
7765 func (c *ProjectsLocationsBareMetalClustersEnrollCall) Header() http.Header {
7766 if c.header_ == nil {
7767 c.header_ = make(http.Header)
7768 }
7769 return c.header_
7770 }
7771
7772 func (c *ProjectsLocationsBareMetalClustersEnrollCall) doRequest(alt string) (*http.Response, error) {
7773 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7774 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.enrollbaremetalclusterrequest)
7775 if err != nil {
7776 return nil, err
7777 }
7778 c.urlParams_.Set("alt", alt)
7779 c.urlParams_.Set("prettyPrint", "false")
7780 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/bareMetalClusters:enroll")
7781 urls += "?" + c.urlParams_.Encode()
7782 req, err := http.NewRequest("POST", urls, body)
7783 if err != nil {
7784 return nil, err
7785 }
7786 req.Header = reqHeaders
7787 googleapi.Expand(req.URL, map[string]string{
7788 "parent": c.parent,
7789 })
7790 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.enroll", "request", internallog.HTTPRequest(req, body.Bytes()))
7791 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7792 }
7793
7794 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.enroll" call.
7795 // Any non-2xx status code is an error. Response headers are in either
7796 // *Operation.ServerResponse.Header or (if a response was returned at all) in
7797 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7798 // whether the returned error was because http.StatusNotModified was returned.
7799 func (c *ProjectsLocationsBareMetalClustersEnrollCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7800 gensupport.SetOptions(c.urlParams_, opts...)
7801 res, err := c.doRequest("json")
7802 if res != nil && res.StatusCode == http.StatusNotModified {
7803 if res.Body != nil {
7804 res.Body.Close()
7805 }
7806 return nil, gensupport.WrapError(&googleapi.Error{
7807 Code: res.StatusCode,
7808 Header: res.Header,
7809 })
7810 }
7811 if err != nil {
7812 return nil, err
7813 }
7814 defer googleapi.CloseBody(res)
7815 if err := googleapi.CheckResponse(res); err != nil {
7816 return nil, gensupport.WrapError(err)
7817 }
7818 ret := &Operation{
7819 ServerResponse: googleapi.ServerResponse{
7820 Header: res.Header,
7821 HTTPStatusCode: res.StatusCode,
7822 },
7823 }
7824 target := &ret
7825 b, err := gensupport.DecodeResponseBytes(target, res)
7826 if err != nil {
7827 return nil, err
7828 }
7829 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.enroll", "response", internallog.HTTPResponse(res, b))
7830 return ret, nil
7831 }
7832
7833 type ProjectsLocationsBareMetalClustersGetCall struct {
7834 s *Service
7835 name string
7836 urlParams_ gensupport.URLParams
7837 ifNoneMatch_ string
7838 ctx_ context.Context
7839 header_ http.Header
7840 }
7841
7842 // Get: Gets details of a single bare metal Cluster.
7843 //
7844 // - name: Name of the bare metal user cluster to get. Format:
7845 // "projects/{project}/locations/{location}/bareMetalClusters/{bare_metal_clus
7846 // ter}".
7847 func (r *ProjectsLocationsBareMetalClustersService) Get(name string) *ProjectsLocationsBareMetalClustersGetCall {
7848 c := &ProjectsLocationsBareMetalClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7849 c.name = name
7850 return c
7851 }
7852
7853 // AllowMissing sets the optional parameter "allowMissing": If true, return
7854 // BareMetal Cluster including the one that only exists in RMS.
7855 func (c *ProjectsLocationsBareMetalClustersGetCall) AllowMissing(allowMissing bool) *ProjectsLocationsBareMetalClustersGetCall {
7856 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
7857 return c
7858 }
7859
7860 // View sets the optional parameter "view": View for bare metal user cluster.
7861 // When `BASIC` is specified, only the cluster resource name and admin cluster
7862 // membership are returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED`
7863 // is the same as `FULL', which returns the complete cluster configuration
7864 // details.
7865 //
7866 // Possible values:
7867 //
7868 // "CLUSTER_VIEW_UNSPECIFIED" - If the value is not set, the default `FULL`
7869 //
7870 // view is used.
7871 //
7872 // "BASIC" - Includes basic information of a cluster resource including
7873 //
7874 // cluster resource name and admin cluster membership.
7875 //
7876 // "FULL" - Includes the complete configuration for bare metal cluster
7877 //
7878 // resource. This is the default value for GetBareMetalClusterRequest method.
7879 func (c *ProjectsLocationsBareMetalClustersGetCall) View(view string) *ProjectsLocationsBareMetalClustersGetCall {
7880 c.urlParams_.Set("view", view)
7881 return c
7882 }
7883
7884 // Fields allows partial responses to be retrieved. See
7885 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7886 // details.
7887 func (c *ProjectsLocationsBareMetalClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersGetCall {
7888 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7889 return c
7890 }
7891
7892 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7893 // object's ETag matches the given value. This is useful for getting updates
7894 // only after the object has changed since the last request.
7895 func (c *ProjectsLocationsBareMetalClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBareMetalClustersGetCall {
7896 c.ifNoneMatch_ = entityTag
7897 return c
7898 }
7899
7900 // Context sets the context to be used in this call's Do method.
7901 func (c *ProjectsLocationsBareMetalClustersGetCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersGetCall {
7902 c.ctx_ = ctx
7903 return c
7904 }
7905
7906 // Header returns a http.Header that can be modified by the caller to add
7907 // headers to the request.
7908 func (c *ProjectsLocationsBareMetalClustersGetCall) Header() http.Header {
7909 if c.header_ == nil {
7910 c.header_ = make(http.Header)
7911 }
7912 return c.header_
7913 }
7914
7915 func (c *ProjectsLocationsBareMetalClustersGetCall) doRequest(alt string) (*http.Response, error) {
7916 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7917 if c.ifNoneMatch_ != "" {
7918 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7919 }
7920 c.urlParams_.Set("alt", alt)
7921 c.urlParams_.Set("prettyPrint", "false")
7922 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7923 urls += "?" + c.urlParams_.Encode()
7924 req, err := http.NewRequest("GET", urls, nil)
7925 if err != nil {
7926 return nil, err
7927 }
7928 req.Header = reqHeaders
7929 googleapi.Expand(req.URL, map[string]string{
7930 "name": c.name,
7931 })
7932 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.get", "request", internallog.HTTPRequest(req, nil))
7933 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7934 }
7935
7936 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.get" call.
7937 // Any non-2xx status code is an error. Response headers are in either
7938 // *BareMetalCluster.ServerResponse.Header or (if a response was returned at
7939 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7940 // check whether the returned error was because http.StatusNotModified was
7941 // returned.
7942 func (c *ProjectsLocationsBareMetalClustersGetCall) Do(opts ...googleapi.CallOption) (*BareMetalCluster, error) {
7943 gensupport.SetOptions(c.urlParams_, opts...)
7944 res, err := c.doRequest("json")
7945 if res != nil && res.StatusCode == http.StatusNotModified {
7946 if res.Body != nil {
7947 res.Body.Close()
7948 }
7949 return nil, gensupport.WrapError(&googleapi.Error{
7950 Code: res.StatusCode,
7951 Header: res.Header,
7952 })
7953 }
7954 if err != nil {
7955 return nil, err
7956 }
7957 defer googleapi.CloseBody(res)
7958 if err := googleapi.CheckResponse(res); err != nil {
7959 return nil, gensupport.WrapError(err)
7960 }
7961 ret := &BareMetalCluster{
7962 ServerResponse: googleapi.ServerResponse{
7963 Header: res.Header,
7964 HTTPStatusCode: res.StatusCode,
7965 },
7966 }
7967 target := &ret
7968 b, err := gensupport.DecodeResponseBytes(target, res)
7969 if err != nil {
7970 return nil, err
7971 }
7972 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.get", "response", internallog.HTTPResponse(res, b))
7973 return ret, nil
7974 }
7975
7976 type ProjectsLocationsBareMetalClustersGetIamPolicyCall struct {
7977 s *Service
7978 resource string
7979 urlParams_ gensupport.URLParams
7980 ifNoneMatch_ string
7981 ctx_ context.Context
7982 header_ http.Header
7983 }
7984
7985 // GetIamPolicy: Gets the access control policy for a resource. Returns an
7986 // empty policy if the resource exists and does not have a policy set.
7987 //
7988 // - resource: REQUIRED: The resource for which the policy is being requested.
7989 // See Resource names (https://cloud.google.com/apis/design/resource_names)
7990 // for the appropriate value for this field.
7991 func (r *ProjectsLocationsBareMetalClustersService) GetIamPolicy(resource string) *ProjectsLocationsBareMetalClustersGetIamPolicyCall {
7992 c := &ProjectsLocationsBareMetalClustersGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7993 c.resource = resource
7994 return c
7995 }
7996
7997 // OptionsRequestedPolicyVersion sets the optional parameter
7998 // "options.requestedPolicyVersion": The maximum policy version that will be
7999 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
8000 // an invalid value will be rejected. Requests for policies with any
8001 // conditional role bindings must specify version 3. Policies with no
8002 // conditional role bindings may specify any valid value or leave the field
8003 // unset. The policy in the response might use the policy version that you
8004 // specified, or it might use a lower policy version. For example, if you
8005 // specify version 3, but the policy has no conditional role bindings, the
8006 // response uses version 1. To learn which resources support conditions in
8007 // their IAM policies, see the IAM documentation
8008 // (https://cloud.google.com/iam/help/conditions/resource-policies).
8009 func (c *ProjectsLocationsBareMetalClustersGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsBareMetalClustersGetIamPolicyCall {
8010 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
8011 return c
8012 }
8013
8014 // Fields allows partial responses to be retrieved. See
8015 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8016 // details.
8017 func (c *ProjectsLocationsBareMetalClustersGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersGetIamPolicyCall {
8018 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8019 return c
8020 }
8021
8022 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8023 // object's ETag matches the given value. This is useful for getting updates
8024 // only after the object has changed since the last request.
8025 func (c *ProjectsLocationsBareMetalClustersGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsBareMetalClustersGetIamPolicyCall {
8026 c.ifNoneMatch_ = entityTag
8027 return c
8028 }
8029
8030 // Context sets the context to be used in this call's Do method.
8031 func (c *ProjectsLocationsBareMetalClustersGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersGetIamPolicyCall {
8032 c.ctx_ = ctx
8033 return c
8034 }
8035
8036 // Header returns a http.Header that can be modified by the caller to add
8037 // headers to the request.
8038 func (c *ProjectsLocationsBareMetalClustersGetIamPolicyCall) Header() http.Header {
8039 if c.header_ == nil {
8040 c.header_ = make(http.Header)
8041 }
8042 return c.header_
8043 }
8044
8045 func (c *ProjectsLocationsBareMetalClustersGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8046 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8047 if c.ifNoneMatch_ != "" {
8048 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8049 }
8050 c.urlParams_.Set("alt", alt)
8051 c.urlParams_.Set("prettyPrint", "false")
8052 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
8053 urls += "?" + c.urlParams_.Encode()
8054 req, err := http.NewRequest("GET", urls, nil)
8055 if err != nil {
8056 return nil, err
8057 }
8058 req.Header = reqHeaders
8059 googleapi.Expand(req.URL, map[string]string{
8060 "resource": c.resource,
8061 })
8062 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
8063 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8064 }
8065
8066 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.getIamPolicy" call.
8067 // Any non-2xx status code is an error. Response headers are in either
8068 // *Policy.ServerResponse.Header or (if a response was returned at all) in
8069 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8070 // whether the returned error was because http.StatusNotModified was returned.
8071 func (c *ProjectsLocationsBareMetalClustersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8072 gensupport.SetOptions(c.urlParams_, opts...)
8073 res, err := c.doRequest("json")
8074 if res != nil && res.StatusCode == http.StatusNotModified {
8075 if res.Body != nil {
8076 res.Body.Close()
8077 }
8078 return nil, gensupport.WrapError(&googleapi.Error{
8079 Code: res.StatusCode,
8080 Header: res.Header,
8081 })
8082 }
8083 if err != nil {
8084 return nil, err
8085 }
8086 defer googleapi.CloseBody(res)
8087 if err := googleapi.CheckResponse(res); err != nil {
8088 return nil, gensupport.WrapError(err)
8089 }
8090 ret := &Policy{
8091 ServerResponse: googleapi.ServerResponse{
8092 Header: res.Header,
8093 HTTPStatusCode: res.StatusCode,
8094 },
8095 }
8096 target := &ret
8097 b, err := gensupport.DecodeResponseBytes(target, res)
8098 if err != nil {
8099 return nil, err
8100 }
8101 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.getIamPolicy", "response", internallog.HTTPResponse(res, b))
8102 return ret, nil
8103 }
8104
8105 type ProjectsLocationsBareMetalClustersListCall struct {
8106 s *Service
8107 parent string
8108 urlParams_ gensupport.URLParams
8109 ifNoneMatch_ string
8110 ctx_ context.Context
8111 header_ http.Header
8112 }
8113
8114 // List: Lists bare metal clusters in a given project and location.
8115 //
8116 // - parent: The parent of the project and location where the clusters are
8117 // listed in. Format: "projects/{project}/locations/{location}".
8118 func (r *ProjectsLocationsBareMetalClustersService) List(parent string) *ProjectsLocationsBareMetalClustersListCall {
8119 c := &ProjectsLocationsBareMetalClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8120 c.parent = parent
8121 return c
8122 }
8123
8124 // AllowMissing sets the optional parameter "allowMissing": If true, return
8125 // list of BareMetal Clusters including the ones that only exists in RMS.
8126 func (c *ProjectsLocationsBareMetalClustersListCall) AllowMissing(allowMissing bool) *ProjectsLocationsBareMetalClustersListCall {
8127 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
8128 return c
8129 }
8130
8131 // Filter sets the optional parameter "filter": A resource filtering expression
8132 // following https://google.aip.dev/160. When non-empty, only resource's whose
8133 // attributes field matches the filter are returned.
8134 func (c *ProjectsLocationsBareMetalClustersListCall) Filter(filter string) *ProjectsLocationsBareMetalClustersListCall {
8135 c.urlParams_.Set("filter", filter)
8136 return c
8137 }
8138
8139 // PageSize sets the optional parameter "pageSize": Requested page size. Server
8140 // may return fewer items than requested. If unspecified, at most 50 clusters
8141 // will be returned. The maximum value is 1000; values above 1000 will be
8142 // coerced to 1000.
8143 func (c *ProjectsLocationsBareMetalClustersListCall) PageSize(pageSize int64) *ProjectsLocationsBareMetalClustersListCall {
8144 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8145 return c
8146 }
8147
8148 // PageToken sets the optional parameter "pageToken": A token identifying a
8149 // page of results the server should return.
8150 func (c *ProjectsLocationsBareMetalClustersListCall) PageToken(pageToken string) *ProjectsLocationsBareMetalClustersListCall {
8151 c.urlParams_.Set("pageToken", pageToken)
8152 return c
8153 }
8154
8155 // View sets the optional parameter "view": View for bare metal Clusters. When
8156 // `BASIC` is specified, only the cluster resource name and admin cluster
8157 // membership are returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED`
8158 // is the same as `FULL', which returns the complete cluster configuration
8159 // details.
8160 //
8161 // Possible values:
8162 //
8163 // "CLUSTER_VIEW_UNSPECIFIED" - If the value is not set, the default `FULL`
8164 //
8165 // view is used.
8166 //
8167 // "BASIC" - Includes basic information of a cluster resource including
8168 //
8169 // cluster resource name and admin cluster membership.
8170 //
8171 // "FULL" - Includes the complete configuration for bare metal cluster
8172 //
8173 // resource. This is the default value for ListBareMetalClustersRequest method.
8174 func (c *ProjectsLocationsBareMetalClustersListCall) View(view string) *ProjectsLocationsBareMetalClustersListCall {
8175 c.urlParams_.Set("view", view)
8176 return c
8177 }
8178
8179 // Fields allows partial responses to be retrieved. See
8180 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8181 // details.
8182 func (c *ProjectsLocationsBareMetalClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersListCall {
8183 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8184 return c
8185 }
8186
8187 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8188 // object's ETag matches the given value. This is useful for getting updates
8189 // only after the object has changed since the last request.
8190 func (c *ProjectsLocationsBareMetalClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBareMetalClustersListCall {
8191 c.ifNoneMatch_ = entityTag
8192 return c
8193 }
8194
8195 // Context sets the context to be used in this call's Do method.
8196 func (c *ProjectsLocationsBareMetalClustersListCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersListCall {
8197 c.ctx_ = ctx
8198 return c
8199 }
8200
8201 // Header returns a http.Header that can be modified by the caller to add
8202 // headers to the request.
8203 func (c *ProjectsLocationsBareMetalClustersListCall) Header() http.Header {
8204 if c.header_ == nil {
8205 c.header_ = make(http.Header)
8206 }
8207 return c.header_
8208 }
8209
8210 func (c *ProjectsLocationsBareMetalClustersListCall) doRequest(alt string) (*http.Response, error) {
8211 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8212 if c.ifNoneMatch_ != "" {
8213 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8214 }
8215 c.urlParams_.Set("alt", alt)
8216 c.urlParams_.Set("prettyPrint", "false")
8217 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/bareMetalClusters")
8218 urls += "?" + c.urlParams_.Encode()
8219 req, err := http.NewRequest("GET", urls, nil)
8220 if err != nil {
8221 return nil, err
8222 }
8223 req.Header = reqHeaders
8224 googleapi.Expand(req.URL, map[string]string{
8225 "parent": c.parent,
8226 })
8227 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.list", "request", internallog.HTTPRequest(req, nil))
8228 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8229 }
8230
8231 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.list" call.
8232 // Any non-2xx status code is an error. Response headers are in either
8233 // *ListBareMetalClustersResponse.ServerResponse.Header or (if a response was
8234 // returned at all) in error.(*googleapi.Error).Header. Use
8235 // googleapi.IsNotModified to check whether the returned error was because
8236 // http.StatusNotModified was returned.
8237 func (c *ProjectsLocationsBareMetalClustersListCall) Do(opts ...googleapi.CallOption) (*ListBareMetalClustersResponse, error) {
8238 gensupport.SetOptions(c.urlParams_, opts...)
8239 res, err := c.doRequest("json")
8240 if res != nil && res.StatusCode == http.StatusNotModified {
8241 if res.Body != nil {
8242 res.Body.Close()
8243 }
8244 return nil, gensupport.WrapError(&googleapi.Error{
8245 Code: res.StatusCode,
8246 Header: res.Header,
8247 })
8248 }
8249 if err != nil {
8250 return nil, err
8251 }
8252 defer googleapi.CloseBody(res)
8253 if err := googleapi.CheckResponse(res); err != nil {
8254 return nil, gensupport.WrapError(err)
8255 }
8256 ret := &ListBareMetalClustersResponse{
8257 ServerResponse: googleapi.ServerResponse{
8258 Header: res.Header,
8259 HTTPStatusCode: res.StatusCode,
8260 },
8261 }
8262 target := &ret
8263 b, err := gensupport.DecodeResponseBytes(target, res)
8264 if err != nil {
8265 return nil, err
8266 }
8267 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.list", "response", internallog.HTTPResponse(res, b))
8268 return ret, nil
8269 }
8270
8271 // Pages invokes f for each page of results.
8272 // A non-nil error returned from f will halt the iteration.
8273 // The provided context supersedes any context provided to the Context method.
8274 func (c *ProjectsLocationsBareMetalClustersListCall) Pages(ctx context.Context, f func(*ListBareMetalClustersResponse) error) error {
8275 c.ctx_ = ctx
8276 defer c.PageToken(c.urlParams_.Get("pageToken"))
8277 for {
8278 x, err := c.Do()
8279 if err != nil {
8280 return err
8281 }
8282 if err := f(x); err != nil {
8283 return err
8284 }
8285 if x.NextPageToken == "" {
8286 return nil
8287 }
8288 c.PageToken(x.NextPageToken)
8289 }
8290 }
8291
8292 type ProjectsLocationsBareMetalClustersPatchCall struct {
8293 s *Service
8294 name string
8295 baremetalcluster *BareMetalCluster
8296 urlParams_ gensupport.URLParams
8297 ctx_ context.Context
8298 header_ http.Header
8299 }
8300
8301 // Patch: Updates the parameters of a single bare metal Cluster.
8302 //
8303 // - name: Immutable. The bare metal user cluster resource name.
8304 func (r *ProjectsLocationsBareMetalClustersService) Patch(name string, baremetalcluster *BareMetalCluster) *ProjectsLocationsBareMetalClustersPatchCall {
8305 c := &ProjectsLocationsBareMetalClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8306 c.name = name
8307 c.baremetalcluster = baremetalcluster
8308 return c
8309 }
8310
8311 // AllowMissing sets the optional parameter "allowMissing": If set to true, and
8312 // the bare metal cluster is not found, the request will create a new bare
8313 // metal cluster with the provided configuration. The user must have both
8314 // create and update permission to call Update with allow_missing set to true.
8315 func (c *ProjectsLocationsBareMetalClustersPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsBareMetalClustersPatchCall {
8316 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
8317 return c
8318 }
8319
8320 // UpdateMask sets the optional parameter "updateMask": Required. Field mask is
8321 // used to specify the fields to be overwritten in the BareMetalCluster
8322 // resource by the update. The fields specified in the update_mask are relative
8323 // to the resource, not the full request. A field will be overwritten if it is
8324 // in the mask. If the user does not provide a mask then all populated fields
8325 // in the BareMetalCluster message will be updated. Empty fields will be
8326 // ignored unless a field mask is used.
8327 func (c *ProjectsLocationsBareMetalClustersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBareMetalClustersPatchCall {
8328 c.urlParams_.Set("updateMask", updateMask)
8329 return c
8330 }
8331
8332 // ValidateOnly sets the optional parameter "validateOnly": Validate the
8333 // request without actually doing any updates.
8334 func (c *ProjectsLocationsBareMetalClustersPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBareMetalClustersPatchCall {
8335 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
8336 return c
8337 }
8338
8339 // Fields allows partial responses to be retrieved. See
8340 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8341 // details.
8342 func (c *ProjectsLocationsBareMetalClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersPatchCall {
8343 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8344 return c
8345 }
8346
8347 // Context sets the context to be used in this call's Do method.
8348 func (c *ProjectsLocationsBareMetalClustersPatchCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersPatchCall {
8349 c.ctx_ = ctx
8350 return c
8351 }
8352
8353 // Header returns a http.Header that can be modified by the caller to add
8354 // headers to the request.
8355 func (c *ProjectsLocationsBareMetalClustersPatchCall) Header() http.Header {
8356 if c.header_ == nil {
8357 c.header_ = make(http.Header)
8358 }
8359 return c.header_
8360 }
8361
8362 func (c *ProjectsLocationsBareMetalClustersPatchCall) doRequest(alt string) (*http.Response, error) {
8363 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8364 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.baremetalcluster)
8365 if err != nil {
8366 return nil, err
8367 }
8368 c.urlParams_.Set("alt", alt)
8369 c.urlParams_.Set("prettyPrint", "false")
8370 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8371 urls += "?" + c.urlParams_.Encode()
8372 req, err := http.NewRequest("PATCH", urls, body)
8373 if err != nil {
8374 return nil, err
8375 }
8376 req.Header = reqHeaders
8377 googleapi.Expand(req.URL, map[string]string{
8378 "name": c.name,
8379 })
8380 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
8381 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8382 }
8383
8384 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.patch" call.
8385 // Any non-2xx status code is an error. Response headers are in either
8386 // *Operation.ServerResponse.Header or (if a response was returned at all) in
8387 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8388 // whether the returned error was because http.StatusNotModified was returned.
8389 func (c *ProjectsLocationsBareMetalClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8390 gensupport.SetOptions(c.urlParams_, opts...)
8391 res, err := c.doRequest("json")
8392 if res != nil && res.StatusCode == http.StatusNotModified {
8393 if res.Body != nil {
8394 res.Body.Close()
8395 }
8396 return nil, gensupport.WrapError(&googleapi.Error{
8397 Code: res.StatusCode,
8398 Header: res.Header,
8399 })
8400 }
8401 if err != nil {
8402 return nil, err
8403 }
8404 defer googleapi.CloseBody(res)
8405 if err := googleapi.CheckResponse(res); err != nil {
8406 return nil, gensupport.WrapError(err)
8407 }
8408 ret := &Operation{
8409 ServerResponse: googleapi.ServerResponse{
8410 Header: res.Header,
8411 HTTPStatusCode: res.StatusCode,
8412 },
8413 }
8414 target := &ret
8415 b, err := gensupport.DecodeResponseBytes(target, res)
8416 if err != nil {
8417 return nil, err
8418 }
8419 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.patch", "response", internallog.HTTPResponse(res, b))
8420 return ret, nil
8421 }
8422
8423 type ProjectsLocationsBareMetalClustersQueryVersionConfigCall struct {
8424 s *Service
8425 parent string
8426 urlParams_ gensupport.URLParams
8427 ctx_ context.Context
8428 header_ http.Header
8429 }
8430
8431 // QueryVersionConfig: Queries the bare metal user cluster version config.
8432 //
8433 // - parent: The parent of the project and location to query for version
8434 // config. Format: "projects/{project}/locations/{location}".
8435 func (r *ProjectsLocationsBareMetalClustersService) QueryVersionConfig(parent string) *ProjectsLocationsBareMetalClustersQueryVersionConfigCall {
8436 c := &ProjectsLocationsBareMetalClustersQueryVersionConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8437 c.parent = parent
8438 return c
8439 }
8440
8441 // CreateConfigAdminClusterMembership sets the optional parameter
8442 // "createConfig.adminClusterMembership": The admin cluster membership. This is
8443 // the full resource name of the admin cluster's fleet membership. Format:
8444 // "projects/{project}/locations/{location}/memberships/{membership}"
8445 func (c *ProjectsLocationsBareMetalClustersQueryVersionConfigCall) CreateConfigAdminClusterMembership(createConfigAdminClusterMembership string) *ProjectsLocationsBareMetalClustersQueryVersionConfigCall {
8446 c.urlParams_.Set("createConfig.adminClusterMembership", createConfigAdminClusterMembership)
8447 return c
8448 }
8449
8450 // CreateConfigAdminClusterName sets the optional parameter
8451 // "createConfig.adminClusterName": The admin cluster resource name. This is
8452 // the full resource name of the admin cluster resource. Format:
8453 // "projects/{project}/locations/{location}/bareMetalAdminClusters/{bare_metal_a
8454 // dmin_cluster}"
8455 func (c *ProjectsLocationsBareMetalClustersQueryVersionConfigCall) CreateConfigAdminClusterName(createConfigAdminClusterName string) *ProjectsLocationsBareMetalClustersQueryVersionConfigCall {
8456 c.urlParams_.Set("createConfig.adminClusterName", createConfigAdminClusterName)
8457 return c
8458 }
8459
8460 // UpgradeConfigClusterName sets the optional parameter
8461 // "upgradeConfig.clusterName": The user cluster resource name. This is the
8462 // full resource name of the user cluster resource. Format:
8463 // "projects/{project}/locations/{location}/bareMetalClusters/{bare_metal_cluste
8464 // r}"
8465 func (c *ProjectsLocationsBareMetalClustersQueryVersionConfigCall) UpgradeConfigClusterName(upgradeConfigClusterName string) *ProjectsLocationsBareMetalClustersQueryVersionConfigCall {
8466 c.urlParams_.Set("upgradeConfig.clusterName", upgradeConfigClusterName)
8467 return c
8468 }
8469
8470 // Fields allows partial responses to be retrieved. See
8471 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8472 // details.
8473 func (c *ProjectsLocationsBareMetalClustersQueryVersionConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersQueryVersionConfigCall {
8474 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8475 return c
8476 }
8477
8478 // Context sets the context to be used in this call's Do method.
8479 func (c *ProjectsLocationsBareMetalClustersQueryVersionConfigCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersQueryVersionConfigCall {
8480 c.ctx_ = ctx
8481 return c
8482 }
8483
8484 // Header returns a http.Header that can be modified by the caller to add
8485 // headers to the request.
8486 func (c *ProjectsLocationsBareMetalClustersQueryVersionConfigCall) Header() http.Header {
8487 if c.header_ == nil {
8488 c.header_ = make(http.Header)
8489 }
8490 return c.header_
8491 }
8492
8493 func (c *ProjectsLocationsBareMetalClustersQueryVersionConfigCall) doRequest(alt string) (*http.Response, error) {
8494 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8495 c.urlParams_.Set("alt", alt)
8496 c.urlParams_.Set("prettyPrint", "false")
8497 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/bareMetalClusters:queryVersionConfig")
8498 urls += "?" + c.urlParams_.Encode()
8499 req, err := http.NewRequest("POST", urls, nil)
8500 if err != nil {
8501 return nil, err
8502 }
8503 req.Header = reqHeaders
8504 googleapi.Expand(req.URL, map[string]string{
8505 "parent": c.parent,
8506 })
8507 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.queryVersionConfig", "request", internallog.HTTPRequest(req, nil))
8508 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8509 }
8510
8511 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.queryVersionConfig" call.
8512 // Any non-2xx status code is an error. Response headers are in either
8513 // *QueryBareMetalVersionConfigResponse.ServerResponse.Header or (if a response
8514 // was returned at all) in error.(*googleapi.Error).Header. Use
8515 // googleapi.IsNotModified to check whether the returned error was because
8516 // http.StatusNotModified was returned.
8517 func (c *ProjectsLocationsBareMetalClustersQueryVersionConfigCall) Do(opts ...googleapi.CallOption) (*QueryBareMetalVersionConfigResponse, error) {
8518 gensupport.SetOptions(c.urlParams_, opts...)
8519 res, err := c.doRequest("json")
8520 if res != nil && res.StatusCode == http.StatusNotModified {
8521 if res.Body != nil {
8522 res.Body.Close()
8523 }
8524 return nil, gensupport.WrapError(&googleapi.Error{
8525 Code: res.StatusCode,
8526 Header: res.Header,
8527 })
8528 }
8529 if err != nil {
8530 return nil, err
8531 }
8532 defer googleapi.CloseBody(res)
8533 if err := googleapi.CheckResponse(res); err != nil {
8534 return nil, gensupport.WrapError(err)
8535 }
8536 ret := &QueryBareMetalVersionConfigResponse{
8537 ServerResponse: googleapi.ServerResponse{
8538 Header: res.Header,
8539 HTTPStatusCode: res.StatusCode,
8540 },
8541 }
8542 target := &ret
8543 b, err := gensupport.DecodeResponseBytes(target, res)
8544 if err != nil {
8545 return nil, err
8546 }
8547 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.queryVersionConfig", "response", internallog.HTTPResponse(res, b))
8548 return ret, nil
8549 }
8550
8551 type ProjectsLocationsBareMetalClustersSetIamPolicyCall struct {
8552 s *Service
8553 resource string
8554 setiampolicyrequest *SetIamPolicyRequest
8555 urlParams_ gensupport.URLParams
8556 ctx_ context.Context
8557 header_ http.Header
8558 }
8559
8560 // SetIamPolicy: Sets the access control policy on the specified resource.
8561 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
8562 // and `PERMISSION_DENIED` errors.
8563 //
8564 // - resource: REQUIRED: The resource for which the policy is being specified.
8565 // See Resource names (https://cloud.google.com/apis/design/resource_names)
8566 // for the appropriate value for this field.
8567 func (r *ProjectsLocationsBareMetalClustersService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsBareMetalClustersSetIamPolicyCall {
8568 c := &ProjectsLocationsBareMetalClustersSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8569 c.resource = resource
8570 c.setiampolicyrequest = setiampolicyrequest
8571 return c
8572 }
8573
8574 // Fields allows partial responses to be retrieved. See
8575 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8576 // details.
8577 func (c *ProjectsLocationsBareMetalClustersSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersSetIamPolicyCall {
8578 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8579 return c
8580 }
8581
8582 // Context sets the context to be used in this call's Do method.
8583 func (c *ProjectsLocationsBareMetalClustersSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersSetIamPolicyCall {
8584 c.ctx_ = ctx
8585 return c
8586 }
8587
8588 // Header returns a http.Header that can be modified by the caller to add
8589 // headers to the request.
8590 func (c *ProjectsLocationsBareMetalClustersSetIamPolicyCall) Header() http.Header {
8591 if c.header_ == nil {
8592 c.header_ = make(http.Header)
8593 }
8594 return c.header_
8595 }
8596
8597 func (c *ProjectsLocationsBareMetalClustersSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8598 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8599 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
8600 if err != nil {
8601 return nil, err
8602 }
8603 c.urlParams_.Set("alt", alt)
8604 c.urlParams_.Set("prettyPrint", "false")
8605 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
8606 urls += "?" + c.urlParams_.Encode()
8607 req, err := http.NewRequest("POST", urls, body)
8608 if err != nil {
8609 return nil, err
8610 }
8611 req.Header = reqHeaders
8612 googleapi.Expand(req.URL, map[string]string{
8613 "resource": c.resource,
8614 })
8615 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
8616 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8617 }
8618
8619 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.setIamPolicy" call.
8620 // Any non-2xx status code is an error. Response headers are in either
8621 // *Policy.ServerResponse.Header or (if a response was returned at all) in
8622 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8623 // whether the returned error was because http.StatusNotModified was returned.
8624 func (c *ProjectsLocationsBareMetalClustersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8625 gensupport.SetOptions(c.urlParams_, opts...)
8626 res, err := c.doRequest("json")
8627 if res != nil && res.StatusCode == http.StatusNotModified {
8628 if res.Body != nil {
8629 res.Body.Close()
8630 }
8631 return nil, gensupport.WrapError(&googleapi.Error{
8632 Code: res.StatusCode,
8633 Header: res.Header,
8634 })
8635 }
8636 if err != nil {
8637 return nil, err
8638 }
8639 defer googleapi.CloseBody(res)
8640 if err := googleapi.CheckResponse(res); err != nil {
8641 return nil, gensupport.WrapError(err)
8642 }
8643 ret := &Policy{
8644 ServerResponse: googleapi.ServerResponse{
8645 Header: res.Header,
8646 HTTPStatusCode: res.StatusCode,
8647 },
8648 }
8649 target := &ret
8650 b, err := gensupport.DecodeResponseBytes(target, res)
8651 if err != nil {
8652 return nil, err
8653 }
8654 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.setIamPolicy", "response", internallog.HTTPResponse(res, b))
8655 return ret, nil
8656 }
8657
8658 type ProjectsLocationsBareMetalClustersTestIamPermissionsCall struct {
8659 s *Service
8660 resource string
8661 testiampermissionsrequest *TestIamPermissionsRequest
8662 urlParams_ gensupport.URLParams
8663 ctx_ context.Context
8664 header_ http.Header
8665 }
8666
8667 // TestIamPermissions: Returns permissions that a caller has on the specified
8668 // resource. If the resource does not exist, this will return an empty set of
8669 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
8670 // used for building permission-aware UIs and command-line tools, not for
8671 // authorization checking. This operation may "fail open" without warning.
8672 //
8673 // - resource: REQUIRED: The resource for which the policy detail is being
8674 // requested. See Resource names
8675 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
8676 // value for this field.
8677 func (r *ProjectsLocationsBareMetalClustersService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsBareMetalClustersTestIamPermissionsCall {
8678 c := &ProjectsLocationsBareMetalClustersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8679 c.resource = resource
8680 c.testiampermissionsrequest = testiampermissionsrequest
8681 return c
8682 }
8683
8684 // Fields allows partial responses to be retrieved. See
8685 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8686 // details.
8687 func (c *ProjectsLocationsBareMetalClustersTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersTestIamPermissionsCall {
8688 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8689 return c
8690 }
8691
8692 // Context sets the context to be used in this call's Do method.
8693 func (c *ProjectsLocationsBareMetalClustersTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersTestIamPermissionsCall {
8694 c.ctx_ = ctx
8695 return c
8696 }
8697
8698 // Header returns a http.Header that can be modified by the caller to add
8699 // headers to the request.
8700 func (c *ProjectsLocationsBareMetalClustersTestIamPermissionsCall) Header() http.Header {
8701 if c.header_ == nil {
8702 c.header_ = make(http.Header)
8703 }
8704 return c.header_
8705 }
8706
8707 func (c *ProjectsLocationsBareMetalClustersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
8708 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8709 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
8710 if err != nil {
8711 return nil, err
8712 }
8713 c.urlParams_.Set("alt", alt)
8714 c.urlParams_.Set("prettyPrint", "false")
8715 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
8716 urls += "?" + c.urlParams_.Encode()
8717 req, err := http.NewRequest("POST", urls, body)
8718 if err != nil {
8719 return nil, err
8720 }
8721 req.Header = reqHeaders
8722 googleapi.Expand(req.URL, map[string]string{
8723 "resource": c.resource,
8724 })
8725 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
8726 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8727 }
8728
8729 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.testIamPermissions" call.
8730 // Any non-2xx status code is an error. Response headers are in either
8731 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
8732 // returned at all) in error.(*googleapi.Error).Header. Use
8733 // googleapi.IsNotModified to check whether the returned error was because
8734 // http.StatusNotModified was returned.
8735 func (c *ProjectsLocationsBareMetalClustersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
8736 gensupport.SetOptions(c.urlParams_, opts...)
8737 res, err := c.doRequest("json")
8738 if res != nil && res.StatusCode == http.StatusNotModified {
8739 if res.Body != nil {
8740 res.Body.Close()
8741 }
8742 return nil, gensupport.WrapError(&googleapi.Error{
8743 Code: res.StatusCode,
8744 Header: res.Header,
8745 })
8746 }
8747 if err != nil {
8748 return nil, err
8749 }
8750 defer googleapi.CloseBody(res)
8751 if err := googleapi.CheckResponse(res); err != nil {
8752 return nil, gensupport.WrapError(err)
8753 }
8754 ret := &TestIamPermissionsResponse{
8755 ServerResponse: googleapi.ServerResponse{
8756 Header: res.Header,
8757 HTTPStatusCode: res.StatusCode,
8758 },
8759 }
8760 target := &ret
8761 b, err := gensupport.DecodeResponseBytes(target, res)
8762 if err != nil {
8763 return nil, err
8764 }
8765 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.testIamPermissions", "response", internallog.HTTPResponse(res, b))
8766 return ret, nil
8767 }
8768
8769 type ProjectsLocationsBareMetalClustersUnenrollCall struct {
8770 s *Service
8771 name string
8772 urlParams_ gensupport.URLParams
8773 ctx_ context.Context
8774 header_ http.Header
8775 }
8776
8777 // Unenroll: Unenrolls an existing bare metal user cluster and its node pools
8778 // from the Anthos On-Prem API within a given project and location.
8779 // Unenrollment removes the Cloud reference to the cluster without modifying
8780 // the underlying OnPrem Resources. Clusters and node pools will continue to
8781 // run; however, they will no longer be accessible through the Anthos On-Prem
8782 // API or its clients.
8783 //
8784 // - name: Name of the bare metal user cluster to be unenrolled. Format:
8785 // "projects/{project}/locations/{location}/bareMetalClusters/{cluster}".
8786 func (r *ProjectsLocationsBareMetalClustersService) Unenroll(name string) *ProjectsLocationsBareMetalClustersUnenrollCall {
8787 c := &ProjectsLocationsBareMetalClustersUnenrollCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8788 c.name = name
8789 return c
8790 }
8791
8792 // AllowMissing sets the optional parameter "allowMissing": If set to true, and
8793 // the bare metal cluster is not found, the request will succeed but no action
8794 // will be taken on the server and return a completed LRO.
8795 func (c *ProjectsLocationsBareMetalClustersUnenrollCall) AllowMissing(allowMissing bool) *ProjectsLocationsBareMetalClustersUnenrollCall {
8796 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
8797 return c
8798 }
8799
8800 // Etag sets the optional parameter "etag": The current etag of the bare metal
8801 // Cluster. If an etag is provided and does not match the current etag of the
8802 // cluster, deletion will be blocked and an ABORTED error will be returned.
8803 func (c *ProjectsLocationsBareMetalClustersUnenrollCall) Etag(etag string) *ProjectsLocationsBareMetalClustersUnenrollCall {
8804 c.urlParams_.Set("etag", etag)
8805 return c
8806 }
8807
8808 // Force sets the optional parameter "force": This is required if the cluster
8809 // has any associated node pools. When set, any child node pools will also be
8810 // unenrolled.
8811 func (c *ProjectsLocationsBareMetalClustersUnenrollCall) Force(force bool) *ProjectsLocationsBareMetalClustersUnenrollCall {
8812 c.urlParams_.Set("force", fmt.Sprint(force))
8813 return c
8814 }
8815
8816 // ValidateOnly sets the optional parameter "validateOnly": Validate the
8817 // request without actually doing any updates.
8818 func (c *ProjectsLocationsBareMetalClustersUnenrollCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBareMetalClustersUnenrollCall {
8819 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
8820 return c
8821 }
8822
8823 // Fields allows partial responses to be retrieved. See
8824 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8825 // details.
8826 func (c *ProjectsLocationsBareMetalClustersUnenrollCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersUnenrollCall {
8827 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8828 return c
8829 }
8830
8831 // Context sets the context to be used in this call's Do method.
8832 func (c *ProjectsLocationsBareMetalClustersUnenrollCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersUnenrollCall {
8833 c.ctx_ = ctx
8834 return c
8835 }
8836
8837 // Header returns a http.Header that can be modified by the caller to add
8838 // headers to the request.
8839 func (c *ProjectsLocationsBareMetalClustersUnenrollCall) Header() http.Header {
8840 if c.header_ == nil {
8841 c.header_ = make(http.Header)
8842 }
8843 return c.header_
8844 }
8845
8846 func (c *ProjectsLocationsBareMetalClustersUnenrollCall) doRequest(alt string) (*http.Response, error) {
8847 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8848 c.urlParams_.Set("alt", alt)
8849 c.urlParams_.Set("prettyPrint", "false")
8850 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:unenroll")
8851 urls += "?" + c.urlParams_.Encode()
8852 req, err := http.NewRequest("DELETE", urls, nil)
8853 if err != nil {
8854 return nil, err
8855 }
8856 req.Header = reqHeaders
8857 googleapi.Expand(req.URL, map[string]string{
8858 "name": c.name,
8859 })
8860 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.unenroll", "request", internallog.HTTPRequest(req, nil))
8861 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8862 }
8863
8864 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.unenroll" call.
8865 // Any non-2xx status code is an error. Response headers are in either
8866 // *Operation.ServerResponse.Header or (if a response was returned at all) in
8867 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8868 // whether the returned error was because http.StatusNotModified was returned.
8869 func (c *ProjectsLocationsBareMetalClustersUnenrollCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8870 gensupport.SetOptions(c.urlParams_, opts...)
8871 res, err := c.doRequest("json")
8872 if res != nil && res.StatusCode == http.StatusNotModified {
8873 if res.Body != nil {
8874 res.Body.Close()
8875 }
8876 return nil, gensupport.WrapError(&googleapi.Error{
8877 Code: res.StatusCode,
8878 Header: res.Header,
8879 })
8880 }
8881 if err != nil {
8882 return nil, err
8883 }
8884 defer googleapi.CloseBody(res)
8885 if err := googleapi.CheckResponse(res); err != nil {
8886 return nil, gensupport.WrapError(err)
8887 }
8888 ret := &Operation{
8889 ServerResponse: googleapi.ServerResponse{
8890 Header: res.Header,
8891 HTTPStatusCode: res.StatusCode,
8892 },
8893 }
8894 target := &ret
8895 b, err := gensupport.DecodeResponseBytes(target, res)
8896 if err != nil {
8897 return nil, err
8898 }
8899 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.unenroll", "response", internallog.HTTPResponse(res, b))
8900 return ret, nil
8901 }
8902
8903 type ProjectsLocationsBareMetalClustersBareMetalNodePoolsCreateCall struct {
8904 s *Service
8905 parent string
8906 baremetalnodepool *BareMetalNodePool
8907 urlParams_ gensupport.URLParams
8908 ctx_ context.Context
8909 header_ http.Header
8910 }
8911
8912 // Create: Creates a new bare metal node pool in a given project, location and
8913 // Bare Metal cluster.
8914 //
8915 // - parent: The parent resource where this node pool will be created.
8916 // projects/{project}/locations/{location}/bareMetalClusters/{cluster}.
8917 func (r *ProjectsLocationsBareMetalClustersBareMetalNodePoolsService) Create(parent string, baremetalnodepool *BareMetalNodePool) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsCreateCall {
8918 c := &ProjectsLocationsBareMetalClustersBareMetalNodePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8919 c.parent = parent
8920 c.baremetalnodepool = baremetalnodepool
8921 return c
8922 }
8923
8924 // BareMetalNodePoolId sets the optional parameter "bareMetalNodePoolId": The
8925 // ID to use for the node pool, which will become the final component of the
8926 // node pool's resource name. This value must be up to 63 characters, and valid
8927 // characters are /a-z-/. The value must not be permitted to be a UUID (or
8928 // UUID-like: anything matching
8929 // /^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i).
8930 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsCreateCall) BareMetalNodePoolId(bareMetalNodePoolId string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsCreateCall {
8931 c.urlParams_.Set("bareMetalNodePoolId", bareMetalNodePoolId)
8932 return c
8933 }
8934
8935 // ValidateOnly sets the optional parameter "validateOnly": If set, only
8936 // validate the request, but do not actually create the node pool.
8937 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsCreateCall {
8938 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
8939 return c
8940 }
8941
8942 // Fields allows partial responses to be retrieved. See
8943 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8944 // details.
8945 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsCreateCall {
8946 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8947 return c
8948 }
8949
8950 // Context sets the context to be used in this call's Do method.
8951 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsCreateCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsCreateCall {
8952 c.ctx_ = ctx
8953 return c
8954 }
8955
8956 // Header returns a http.Header that can be modified by the caller to add
8957 // headers to the request.
8958 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsCreateCall) Header() http.Header {
8959 if c.header_ == nil {
8960 c.header_ = make(http.Header)
8961 }
8962 return c.header_
8963 }
8964
8965 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) {
8966 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8967 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.baremetalnodepool)
8968 if err != nil {
8969 return nil, err
8970 }
8971 c.urlParams_.Set("alt", alt)
8972 c.urlParams_.Set("prettyPrint", "false")
8973 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/bareMetalNodePools")
8974 urls += "?" + c.urlParams_.Encode()
8975 req, err := http.NewRequest("POST", urls, body)
8976 if err != nil {
8977 return nil, err
8978 }
8979 req.Header = reqHeaders
8980 googleapi.Expand(req.URL, map[string]string{
8981 "parent": c.parent,
8982 })
8983 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.create", "request", internallog.HTTPRequest(req, body.Bytes()))
8984 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8985 }
8986
8987 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.create" call.
8988 // Any non-2xx status code is an error. Response headers are in either
8989 // *Operation.ServerResponse.Header or (if a response was returned at all) in
8990 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8991 // whether the returned error was because http.StatusNotModified was returned.
8992 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8993 gensupport.SetOptions(c.urlParams_, opts...)
8994 res, err := c.doRequest("json")
8995 if res != nil && res.StatusCode == http.StatusNotModified {
8996 if res.Body != nil {
8997 res.Body.Close()
8998 }
8999 return nil, gensupport.WrapError(&googleapi.Error{
9000 Code: res.StatusCode,
9001 Header: res.Header,
9002 })
9003 }
9004 if err != nil {
9005 return nil, err
9006 }
9007 defer googleapi.CloseBody(res)
9008 if err := googleapi.CheckResponse(res); err != nil {
9009 return nil, gensupport.WrapError(err)
9010 }
9011 ret := &Operation{
9012 ServerResponse: googleapi.ServerResponse{
9013 Header: res.Header,
9014 HTTPStatusCode: res.StatusCode,
9015 },
9016 }
9017 target := &ret
9018 b, err := gensupport.DecodeResponseBytes(target, res)
9019 if err != nil {
9020 return nil, err
9021 }
9022 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.create", "response", internallog.HTTPResponse(res, b))
9023 return ret, nil
9024 }
9025
9026 type ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteCall struct {
9027 s *Service
9028 name string
9029 urlParams_ gensupport.URLParams
9030 ctx_ context.Context
9031 header_ http.Header
9032 }
9033
9034 // Delete: Deletes a single bare metal node pool.
9035 //
9036 // - name: The name of the node pool to delete. Format:
9037 // projects/{project}/locations/{location}/bareMetalClusters/{cluster}/bareMet
9038 // alNodePools/{nodepool}.
9039 func (r *ProjectsLocationsBareMetalClustersBareMetalNodePoolsService) Delete(name string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteCall {
9040 c := &ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9041 c.name = name
9042 return c
9043 }
9044
9045 // AllowMissing sets the optional parameter "allowMissing": If set to true, and
9046 // the bare metal node pool is not found, the request will succeed but no
9047 // action will be taken on the server and return a completed LRO.
9048 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteCall) AllowMissing(allowMissing bool) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteCall {
9049 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
9050 return c
9051 }
9052
9053 // Etag sets the optional parameter "etag": The current etag of the
9054 // BareMetalNodePool. If an etag is provided and does not match the current
9055 // etag of the node pool, deletion will be blocked and an ABORTED error will be
9056 // returned.
9057 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteCall) Etag(etag string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteCall {
9058 c.urlParams_.Set("etag", etag)
9059 return c
9060 }
9061
9062 // IgnoreErrors sets the optional parameter "ignoreErrors": If set to true, the
9063 // deletion of a bare metal node pool resource will succeed even if errors
9064 // occur during deletion. This parameter can be used when you want to delete
9065 // GCP's node pool resource and you've already deleted the on-prem admin
9066 // cluster that hosted your node pool. WARNING: Using this parameter when your
9067 // user cluster still exists may result in a deleted GCP node pool but an
9068 // existing on-prem node pool.
9069 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteCall) IgnoreErrors(ignoreErrors bool) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteCall {
9070 c.urlParams_.Set("ignoreErrors", fmt.Sprint(ignoreErrors))
9071 return c
9072 }
9073
9074 // ValidateOnly sets the optional parameter "validateOnly": If set, only
9075 // validate the request, but do not actually delete the node pool.
9076 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteCall {
9077 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
9078 return c
9079 }
9080
9081 // Fields allows partial responses to be retrieved. See
9082 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9083 // details.
9084 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteCall {
9085 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9086 return c
9087 }
9088
9089 // Context sets the context to be used in this call's Do method.
9090 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteCall {
9091 c.ctx_ = ctx
9092 return c
9093 }
9094
9095 // Header returns a http.Header that can be modified by the caller to add
9096 // headers to the request.
9097 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteCall) Header() http.Header {
9098 if c.header_ == nil {
9099 c.header_ = make(http.Header)
9100 }
9101 return c.header_
9102 }
9103
9104 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
9105 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9106 c.urlParams_.Set("alt", alt)
9107 c.urlParams_.Set("prettyPrint", "false")
9108 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9109 urls += "?" + c.urlParams_.Encode()
9110 req, err := http.NewRequest("DELETE", urls, nil)
9111 if err != nil {
9112 return nil, err
9113 }
9114 req.Header = reqHeaders
9115 googleapi.Expand(req.URL, map[string]string{
9116 "name": c.name,
9117 })
9118 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.delete", "request", internallog.HTTPRequest(req, nil))
9119 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9120 }
9121
9122 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.delete" call.
9123 // Any non-2xx status code is an error. Response headers are in either
9124 // *Operation.ServerResponse.Header or (if a response was returned at all) in
9125 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9126 // whether the returned error was because http.StatusNotModified was returned.
9127 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9128 gensupport.SetOptions(c.urlParams_, opts...)
9129 res, err := c.doRequest("json")
9130 if res != nil && res.StatusCode == http.StatusNotModified {
9131 if res.Body != nil {
9132 res.Body.Close()
9133 }
9134 return nil, gensupport.WrapError(&googleapi.Error{
9135 Code: res.StatusCode,
9136 Header: res.Header,
9137 })
9138 }
9139 if err != nil {
9140 return nil, err
9141 }
9142 defer googleapi.CloseBody(res)
9143 if err := googleapi.CheckResponse(res); err != nil {
9144 return nil, gensupport.WrapError(err)
9145 }
9146 ret := &Operation{
9147 ServerResponse: googleapi.ServerResponse{
9148 Header: res.Header,
9149 HTTPStatusCode: res.StatusCode,
9150 },
9151 }
9152 target := &ret
9153 b, err := gensupport.DecodeResponseBytes(target, res)
9154 if err != nil {
9155 return nil, err
9156 }
9157 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.delete", "response", internallog.HTTPResponse(res, b))
9158 return ret, nil
9159 }
9160
9161 type ProjectsLocationsBareMetalClustersBareMetalNodePoolsEnrollCall struct {
9162 s *Service
9163 parent string
9164 enrollbaremetalnodepoolrequest *EnrollBareMetalNodePoolRequest
9165 urlParams_ gensupport.URLParams
9166 ctx_ context.Context
9167 header_ http.Header
9168 }
9169
9170 // Enroll: Enrolls an existing bare metal node pool to the Anthos On-Prem API
9171 // within a given project and location. Through enrollment, an existing node
9172 // pool will become Anthos On-Prem API managed. The corresponding GCP resources
9173 // will be created.
9174 //
9175 // - parent: The parent resource where this node pool will be created.
9176 // projects/{project}/locations/{location}/bareMetalClusters/{cluster}.
9177 func (r *ProjectsLocationsBareMetalClustersBareMetalNodePoolsService) Enroll(parent string, enrollbaremetalnodepoolrequest *EnrollBareMetalNodePoolRequest) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsEnrollCall {
9178 c := &ProjectsLocationsBareMetalClustersBareMetalNodePoolsEnrollCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9179 c.parent = parent
9180 c.enrollbaremetalnodepoolrequest = enrollbaremetalnodepoolrequest
9181 return c
9182 }
9183
9184 // Fields allows partial responses to be retrieved. See
9185 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9186 // details.
9187 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsEnrollCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsEnrollCall {
9188 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9189 return c
9190 }
9191
9192 // Context sets the context to be used in this call's Do method.
9193 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsEnrollCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsEnrollCall {
9194 c.ctx_ = ctx
9195 return c
9196 }
9197
9198 // Header returns a http.Header that can be modified by the caller to add
9199 // headers to the request.
9200 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsEnrollCall) Header() http.Header {
9201 if c.header_ == nil {
9202 c.header_ = make(http.Header)
9203 }
9204 return c.header_
9205 }
9206
9207 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsEnrollCall) doRequest(alt string) (*http.Response, error) {
9208 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9209 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.enrollbaremetalnodepoolrequest)
9210 if err != nil {
9211 return nil, err
9212 }
9213 c.urlParams_.Set("alt", alt)
9214 c.urlParams_.Set("prettyPrint", "false")
9215 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/bareMetalNodePools:enroll")
9216 urls += "?" + c.urlParams_.Encode()
9217 req, err := http.NewRequest("POST", urls, body)
9218 if err != nil {
9219 return nil, err
9220 }
9221 req.Header = reqHeaders
9222 googleapi.Expand(req.URL, map[string]string{
9223 "parent": c.parent,
9224 })
9225 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.enroll", "request", internallog.HTTPRequest(req, body.Bytes()))
9226 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9227 }
9228
9229 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.enroll" call.
9230 // Any non-2xx status code is an error. Response headers are in either
9231 // *Operation.ServerResponse.Header or (if a response was returned at all) in
9232 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9233 // whether the returned error was because http.StatusNotModified was returned.
9234 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsEnrollCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9235 gensupport.SetOptions(c.urlParams_, opts...)
9236 res, err := c.doRequest("json")
9237 if res != nil && res.StatusCode == http.StatusNotModified {
9238 if res.Body != nil {
9239 res.Body.Close()
9240 }
9241 return nil, gensupport.WrapError(&googleapi.Error{
9242 Code: res.StatusCode,
9243 Header: res.Header,
9244 })
9245 }
9246 if err != nil {
9247 return nil, err
9248 }
9249 defer googleapi.CloseBody(res)
9250 if err := googleapi.CheckResponse(res); err != nil {
9251 return nil, gensupport.WrapError(err)
9252 }
9253 ret := &Operation{
9254 ServerResponse: googleapi.ServerResponse{
9255 Header: res.Header,
9256 HTTPStatusCode: res.StatusCode,
9257 },
9258 }
9259 target := &ret
9260 b, err := gensupport.DecodeResponseBytes(target, res)
9261 if err != nil {
9262 return nil, err
9263 }
9264 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.enroll", "response", internallog.HTTPResponse(res, b))
9265 return ret, nil
9266 }
9267
9268 type ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetCall struct {
9269 s *Service
9270 name string
9271 urlParams_ gensupport.URLParams
9272 ifNoneMatch_ string
9273 ctx_ context.Context
9274 header_ http.Header
9275 }
9276
9277 // Get: Gets details of a single bare metal node pool.
9278 //
9279 // - name: The name of the node pool to retrieve.
9280 // projects/{project}/locations/{location}/bareMetalClusters/{cluster}/bareMet
9281 // alNodePools/{nodepool}.
9282 func (r *ProjectsLocationsBareMetalClustersBareMetalNodePoolsService) Get(name string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetCall {
9283 c := &ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9284 c.name = name
9285 return c
9286 }
9287
9288 // View sets the optional parameter "view": View for bare metal node pool. When
9289 // `BASIC` is specified, only the node pool resource name is returned. The
9290 // default/unset value `NODE_POOL_VIEW_UNSPECIFIED` is the same as `FULL',
9291 // which returns the complete node pool configuration details.
9292 //
9293 // Possible values:
9294 //
9295 // "NODE_POOL_VIEW_UNSPECIFIED" - If the value is not set, the default `FULL`
9296 //
9297 // view is used.
9298 //
9299 // "BASIC" - Includes basic information of a node pool resource including
9300 //
9301 // node pool resource name.
9302 //
9303 // "FULL" - Includes the complete configuration for bare metal node pool
9304 //
9305 // resource. This is the default value for GetBareMetalNodePoolRequest method.
9306 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetCall) View(view string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetCall {
9307 c.urlParams_.Set("view", view)
9308 return c
9309 }
9310
9311 // Fields allows partial responses to be retrieved. See
9312 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9313 // details.
9314 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetCall {
9315 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9316 return c
9317 }
9318
9319 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9320 // object's ETag matches the given value. This is useful for getting updates
9321 // only after the object has changed since the last request.
9322 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetCall {
9323 c.ifNoneMatch_ = entityTag
9324 return c
9325 }
9326
9327 // Context sets the context to be used in this call's Do method.
9328 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetCall {
9329 c.ctx_ = ctx
9330 return c
9331 }
9332
9333 // Header returns a http.Header that can be modified by the caller to add
9334 // headers to the request.
9335 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetCall) Header() http.Header {
9336 if c.header_ == nil {
9337 c.header_ = make(http.Header)
9338 }
9339 return c.header_
9340 }
9341
9342 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetCall) doRequest(alt string) (*http.Response, error) {
9343 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9344 if c.ifNoneMatch_ != "" {
9345 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9346 }
9347 c.urlParams_.Set("alt", alt)
9348 c.urlParams_.Set("prettyPrint", "false")
9349 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9350 urls += "?" + c.urlParams_.Encode()
9351 req, err := http.NewRequest("GET", urls, nil)
9352 if err != nil {
9353 return nil, err
9354 }
9355 req.Header = reqHeaders
9356 googleapi.Expand(req.URL, map[string]string{
9357 "name": c.name,
9358 })
9359 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.get", "request", internallog.HTTPRequest(req, nil))
9360 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9361 }
9362
9363 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.get" call.
9364 // Any non-2xx status code is an error. Response headers are in either
9365 // *BareMetalNodePool.ServerResponse.Header or (if a response was returned at
9366 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9367 // check whether the returned error was because http.StatusNotModified was
9368 // returned.
9369 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetCall) Do(opts ...googleapi.CallOption) (*BareMetalNodePool, error) {
9370 gensupport.SetOptions(c.urlParams_, opts...)
9371 res, err := c.doRequest("json")
9372 if res != nil && res.StatusCode == http.StatusNotModified {
9373 if res.Body != nil {
9374 res.Body.Close()
9375 }
9376 return nil, gensupport.WrapError(&googleapi.Error{
9377 Code: res.StatusCode,
9378 Header: res.Header,
9379 })
9380 }
9381 if err != nil {
9382 return nil, err
9383 }
9384 defer googleapi.CloseBody(res)
9385 if err := googleapi.CheckResponse(res); err != nil {
9386 return nil, gensupport.WrapError(err)
9387 }
9388 ret := &BareMetalNodePool{
9389 ServerResponse: googleapi.ServerResponse{
9390 Header: res.Header,
9391 HTTPStatusCode: res.StatusCode,
9392 },
9393 }
9394 target := &ret
9395 b, err := gensupport.DecodeResponseBytes(target, res)
9396 if err != nil {
9397 return nil, err
9398 }
9399 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.get", "response", internallog.HTTPResponse(res, b))
9400 return ret, nil
9401 }
9402
9403 type ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetIamPolicyCall struct {
9404 s *Service
9405 resource string
9406 urlParams_ gensupport.URLParams
9407 ifNoneMatch_ string
9408 ctx_ context.Context
9409 header_ http.Header
9410 }
9411
9412 // GetIamPolicy: Gets the access control policy for a resource. Returns an
9413 // empty policy if the resource exists and does not have a policy set.
9414 //
9415 // - resource: REQUIRED: The resource for which the policy is being requested.
9416 // See Resource names (https://cloud.google.com/apis/design/resource_names)
9417 // for the appropriate value for this field.
9418 func (r *ProjectsLocationsBareMetalClustersBareMetalNodePoolsService) GetIamPolicy(resource string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetIamPolicyCall {
9419 c := &ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9420 c.resource = resource
9421 return c
9422 }
9423
9424 // OptionsRequestedPolicyVersion sets the optional parameter
9425 // "options.requestedPolicyVersion": The maximum policy version that will be
9426 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
9427 // an invalid value will be rejected. Requests for policies with any
9428 // conditional role bindings must specify version 3. Policies with no
9429 // conditional role bindings may specify any valid value or leave the field
9430 // unset. The policy in the response might use the policy version that you
9431 // specified, or it might use a lower policy version. For example, if you
9432 // specify version 3, but the policy has no conditional role bindings, the
9433 // response uses version 1. To learn which resources support conditions in
9434 // their IAM policies, see the IAM documentation
9435 // (https://cloud.google.com/iam/help/conditions/resource-policies).
9436 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetIamPolicyCall {
9437 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
9438 return c
9439 }
9440
9441 // Fields allows partial responses to be retrieved. See
9442 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9443 // details.
9444 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetIamPolicyCall {
9445 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9446 return c
9447 }
9448
9449 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9450 // object's ETag matches the given value. This is useful for getting updates
9451 // only after the object has changed since the last request.
9452 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetIamPolicyCall {
9453 c.ifNoneMatch_ = entityTag
9454 return c
9455 }
9456
9457 // Context sets the context to be used in this call's Do method.
9458 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetIamPolicyCall {
9459 c.ctx_ = ctx
9460 return c
9461 }
9462
9463 // Header returns a http.Header that can be modified by the caller to add
9464 // headers to the request.
9465 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetIamPolicyCall) Header() http.Header {
9466 if c.header_ == nil {
9467 c.header_ = make(http.Header)
9468 }
9469 return c.header_
9470 }
9471
9472 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9473 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9474 if c.ifNoneMatch_ != "" {
9475 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9476 }
9477 c.urlParams_.Set("alt", alt)
9478 c.urlParams_.Set("prettyPrint", "false")
9479 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
9480 urls += "?" + c.urlParams_.Encode()
9481 req, err := http.NewRequest("GET", urls, nil)
9482 if err != nil {
9483 return nil, err
9484 }
9485 req.Header = reqHeaders
9486 googleapi.Expand(req.URL, map[string]string{
9487 "resource": c.resource,
9488 })
9489 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
9490 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9491 }
9492
9493 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.getIamPolicy" call.
9494 // Any non-2xx status code is an error. Response headers are in either
9495 // *Policy.ServerResponse.Header or (if a response was returned at all) in
9496 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9497 // whether the returned error was because http.StatusNotModified was returned.
9498 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
9499 gensupport.SetOptions(c.urlParams_, opts...)
9500 res, err := c.doRequest("json")
9501 if res != nil && res.StatusCode == http.StatusNotModified {
9502 if res.Body != nil {
9503 res.Body.Close()
9504 }
9505 return nil, gensupport.WrapError(&googleapi.Error{
9506 Code: res.StatusCode,
9507 Header: res.Header,
9508 })
9509 }
9510 if err != nil {
9511 return nil, err
9512 }
9513 defer googleapi.CloseBody(res)
9514 if err := googleapi.CheckResponse(res); err != nil {
9515 return nil, gensupport.WrapError(err)
9516 }
9517 ret := &Policy{
9518 ServerResponse: googleapi.ServerResponse{
9519 Header: res.Header,
9520 HTTPStatusCode: res.StatusCode,
9521 },
9522 }
9523 target := &ret
9524 b, err := gensupport.DecodeResponseBytes(target, res)
9525 if err != nil {
9526 return nil, err
9527 }
9528 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.getIamPolicy", "response", internallog.HTTPResponse(res, b))
9529 return ret, nil
9530 }
9531
9532 type ProjectsLocationsBareMetalClustersBareMetalNodePoolsListCall struct {
9533 s *Service
9534 parent string
9535 urlParams_ gensupport.URLParams
9536 ifNoneMatch_ string
9537 ctx_ context.Context
9538 header_ http.Header
9539 }
9540
9541 // List: Lists bare metal node pools in a given project, location and bare
9542 // metal cluster.
9543 //
9544 // - parent: The parent, which owns this collection of node pools. Format:
9545 // projects/{project}/locations/{location}/bareMetalClusters/{bareMetalCluster
9546 // }.
9547 func (r *ProjectsLocationsBareMetalClustersBareMetalNodePoolsService) List(parent string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsListCall {
9548 c := &ProjectsLocationsBareMetalClustersBareMetalNodePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9549 c.parent = parent
9550 return c
9551 }
9552
9553 // PageSize sets the optional parameter "pageSize": The maximum number of node
9554 // pools to return. The service may return fewer than this value. If
9555 // unspecified, at most 50 node pools will be returned. The maximum value is
9556 // 1000; values above 1000 will be coerced to 1000.
9557 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsListCall) PageSize(pageSize int64) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsListCall {
9558 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9559 return c
9560 }
9561
9562 // PageToken sets the optional parameter "pageToken": A page token, received
9563 // from a previous `ListBareMetalNodePools` call. Provide this to retrieve the
9564 // subsequent page. When paginating, all other parameters provided to
9565 // `ListBareMetalNodePools` must match the call that provided the page token.
9566 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsListCall) PageToken(pageToken string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsListCall {
9567 c.urlParams_.Set("pageToken", pageToken)
9568 return c
9569 }
9570
9571 // View sets the optional parameter "view": View for bare metal node pools.
9572 // When `BASIC` is specified, only the node pool resource name is returned. The
9573 // default/unset value `NODE_POOL_VIEW_UNSPECIFIED` is the same as `FULL',
9574 // which returns the complete node pool configuration details.
9575 //
9576 // Possible values:
9577 //
9578 // "NODE_POOL_VIEW_UNSPECIFIED" - If the value is not set, the default `FULL`
9579 //
9580 // view is used.
9581 //
9582 // "BASIC" - Includes basic information of a node pool resource including
9583 //
9584 // node pool resource name.
9585 //
9586 // "FULL" - Includes the complete configuration for bare metal node pool
9587 //
9588 // resource. This is the default value for ListBareMetalNodePoolsRequest
9589 // method.
9590 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsListCall) View(view string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsListCall {
9591 c.urlParams_.Set("view", view)
9592 return c
9593 }
9594
9595 // Fields allows partial responses to be retrieved. See
9596 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9597 // details.
9598 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsListCall {
9599 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9600 return c
9601 }
9602
9603 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9604 // object's ETag matches the given value. This is useful for getting updates
9605 // only after the object has changed since the last request.
9606 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsListCall {
9607 c.ifNoneMatch_ = entityTag
9608 return c
9609 }
9610
9611 // Context sets the context to be used in this call's Do method.
9612 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsListCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsListCall {
9613 c.ctx_ = ctx
9614 return c
9615 }
9616
9617 // Header returns a http.Header that can be modified by the caller to add
9618 // headers to the request.
9619 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsListCall) Header() http.Header {
9620 if c.header_ == nil {
9621 c.header_ = make(http.Header)
9622 }
9623 return c.header_
9624 }
9625
9626 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsListCall) doRequest(alt string) (*http.Response, error) {
9627 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9628 if c.ifNoneMatch_ != "" {
9629 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9630 }
9631 c.urlParams_.Set("alt", alt)
9632 c.urlParams_.Set("prettyPrint", "false")
9633 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/bareMetalNodePools")
9634 urls += "?" + c.urlParams_.Encode()
9635 req, err := http.NewRequest("GET", urls, nil)
9636 if err != nil {
9637 return nil, err
9638 }
9639 req.Header = reqHeaders
9640 googleapi.Expand(req.URL, map[string]string{
9641 "parent": c.parent,
9642 })
9643 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.list", "request", internallog.HTTPRequest(req, nil))
9644 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9645 }
9646
9647 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.list" call.
9648 // Any non-2xx status code is an error. Response headers are in either
9649 // *ListBareMetalNodePoolsResponse.ServerResponse.Header or (if a response was
9650 // returned at all) in error.(*googleapi.Error).Header. Use
9651 // googleapi.IsNotModified to check whether the returned error was because
9652 // http.StatusNotModified was returned.
9653 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsListCall) Do(opts ...googleapi.CallOption) (*ListBareMetalNodePoolsResponse, error) {
9654 gensupport.SetOptions(c.urlParams_, opts...)
9655 res, err := c.doRequest("json")
9656 if res != nil && res.StatusCode == http.StatusNotModified {
9657 if res.Body != nil {
9658 res.Body.Close()
9659 }
9660 return nil, gensupport.WrapError(&googleapi.Error{
9661 Code: res.StatusCode,
9662 Header: res.Header,
9663 })
9664 }
9665 if err != nil {
9666 return nil, err
9667 }
9668 defer googleapi.CloseBody(res)
9669 if err := googleapi.CheckResponse(res); err != nil {
9670 return nil, gensupport.WrapError(err)
9671 }
9672 ret := &ListBareMetalNodePoolsResponse{
9673 ServerResponse: googleapi.ServerResponse{
9674 Header: res.Header,
9675 HTTPStatusCode: res.StatusCode,
9676 },
9677 }
9678 target := &ret
9679 b, err := gensupport.DecodeResponseBytes(target, res)
9680 if err != nil {
9681 return nil, err
9682 }
9683 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.list", "response", internallog.HTTPResponse(res, b))
9684 return ret, nil
9685 }
9686
9687 // Pages invokes f for each page of results.
9688 // A non-nil error returned from f will halt the iteration.
9689 // The provided context supersedes any context provided to the Context method.
9690 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsListCall) Pages(ctx context.Context, f func(*ListBareMetalNodePoolsResponse) error) error {
9691 c.ctx_ = ctx
9692 defer c.PageToken(c.urlParams_.Get("pageToken"))
9693 for {
9694 x, err := c.Do()
9695 if err != nil {
9696 return err
9697 }
9698 if err := f(x); err != nil {
9699 return err
9700 }
9701 if x.NextPageToken == "" {
9702 return nil
9703 }
9704 c.PageToken(x.NextPageToken)
9705 }
9706 }
9707
9708 type ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchCall struct {
9709 s *Service
9710 name string
9711 baremetalnodepool *BareMetalNodePool
9712 urlParams_ gensupport.URLParams
9713 ctx_ context.Context
9714 header_ http.Header
9715 }
9716
9717 // Patch: Updates the parameters of a single bare metal node pool.
9718 //
9719 // - name: Immutable. The bare metal node pool resource name.
9720 func (r *ProjectsLocationsBareMetalClustersBareMetalNodePoolsService) Patch(name string, baremetalnodepool *BareMetalNodePool) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchCall {
9721 c := &ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9722 c.name = name
9723 c.baremetalnodepool = baremetalnodepool
9724 return c
9725 }
9726
9727 // AllowMissing sets the optional parameter "allowMissing": If set to true, and
9728 // the bare metal node pool is not found, the request will create a new bare
9729 // metal node pool with the provided configuration. The user must have both
9730 // create and update permission to call Update with allow_missing set to true.
9731 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchCall {
9732 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
9733 return c
9734 }
9735
9736 // UpdateMask sets the optional parameter "updateMask": Required. Field mask is
9737 // used to specify the fields to be overwritten in the BareMetalNodePool
9738 // resource by the update. The fields specified in the update_mask are relative
9739 // to the resource, not the full request. A field will be overwritten if it is
9740 // in the mask. If the user does not provide a mask then all populated fields
9741 // in the BareMetalNodePool message will be updated. Empty fields will be
9742 // ignored unless a field mask is used.
9743 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchCall {
9744 c.urlParams_.Set("updateMask", updateMask)
9745 return c
9746 }
9747
9748 // ValidateOnly sets the optional parameter "validateOnly": Validate the
9749 // request without actually doing any updates.
9750 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchCall {
9751 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
9752 return c
9753 }
9754
9755 // Fields allows partial responses to be retrieved. See
9756 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9757 // details.
9758 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchCall {
9759 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9760 return c
9761 }
9762
9763 // Context sets the context to be used in this call's Do method.
9764 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchCall {
9765 c.ctx_ = ctx
9766 return c
9767 }
9768
9769 // Header returns a http.Header that can be modified by the caller to add
9770 // headers to the request.
9771 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchCall) Header() http.Header {
9772 if c.header_ == nil {
9773 c.header_ = make(http.Header)
9774 }
9775 return c.header_
9776 }
9777
9778 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchCall) doRequest(alt string) (*http.Response, error) {
9779 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9780 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.baremetalnodepool)
9781 if err != nil {
9782 return nil, err
9783 }
9784 c.urlParams_.Set("alt", alt)
9785 c.urlParams_.Set("prettyPrint", "false")
9786 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9787 urls += "?" + c.urlParams_.Encode()
9788 req, err := http.NewRequest("PATCH", urls, body)
9789 if err != nil {
9790 return nil, err
9791 }
9792 req.Header = reqHeaders
9793 googleapi.Expand(req.URL, map[string]string{
9794 "name": c.name,
9795 })
9796 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
9797 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9798 }
9799
9800 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.patch" call.
9801 // Any non-2xx status code is an error. Response headers are in either
9802 // *Operation.ServerResponse.Header or (if a response was returned at all) in
9803 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9804 // whether the returned error was because http.StatusNotModified was returned.
9805 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9806 gensupport.SetOptions(c.urlParams_, opts...)
9807 res, err := c.doRequest("json")
9808 if res != nil && res.StatusCode == http.StatusNotModified {
9809 if res.Body != nil {
9810 res.Body.Close()
9811 }
9812 return nil, gensupport.WrapError(&googleapi.Error{
9813 Code: res.StatusCode,
9814 Header: res.Header,
9815 })
9816 }
9817 if err != nil {
9818 return nil, err
9819 }
9820 defer googleapi.CloseBody(res)
9821 if err := googleapi.CheckResponse(res); err != nil {
9822 return nil, gensupport.WrapError(err)
9823 }
9824 ret := &Operation{
9825 ServerResponse: googleapi.ServerResponse{
9826 Header: res.Header,
9827 HTTPStatusCode: res.StatusCode,
9828 },
9829 }
9830 target := &ret
9831 b, err := gensupport.DecodeResponseBytes(target, res)
9832 if err != nil {
9833 return nil, err
9834 }
9835 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.patch", "response", internallog.HTTPResponse(res, b))
9836 return ret, nil
9837 }
9838
9839 type ProjectsLocationsBareMetalClustersBareMetalNodePoolsSetIamPolicyCall struct {
9840 s *Service
9841 resource string
9842 setiampolicyrequest *SetIamPolicyRequest
9843 urlParams_ gensupport.URLParams
9844 ctx_ context.Context
9845 header_ http.Header
9846 }
9847
9848 // SetIamPolicy: Sets the access control policy on the specified resource.
9849 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
9850 // and `PERMISSION_DENIED` errors.
9851 //
9852 // - resource: REQUIRED: The resource for which the policy is being specified.
9853 // See Resource names (https://cloud.google.com/apis/design/resource_names)
9854 // for the appropriate value for this field.
9855 func (r *ProjectsLocationsBareMetalClustersBareMetalNodePoolsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsSetIamPolicyCall {
9856 c := &ProjectsLocationsBareMetalClustersBareMetalNodePoolsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9857 c.resource = resource
9858 c.setiampolicyrequest = setiampolicyrequest
9859 return c
9860 }
9861
9862 // Fields allows partial responses to be retrieved. See
9863 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9864 // details.
9865 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsSetIamPolicyCall {
9866 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9867 return c
9868 }
9869
9870 // Context sets the context to be used in this call's Do method.
9871 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsSetIamPolicyCall {
9872 c.ctx_ = ctx
9873 return c
9874 }
9875
9876 // Header returns a http.Header that can be modified by the caller to add
9877 // headers to the request.
9878 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsSetIamPolicyCall) Header() http.Header {
9879 if c.header_ == nil {
9880 c.header_ = make(http.Header)
9881 }
9882 return c.header_
9883 }
9884
9885 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9886 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9887 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
9888 if err != nil {
9889 return nil, err
9890 }
9891 c.urlParams_.Set("alt", alt)
9892 c.urlParams_.Set("prettyPrint", "false")
9893 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
9894 urls += "?" + c.urlParams_.Encode()
9895 req, err := http.NewRequest("POST", urls, body)
9896 if err != nil {
9897 return nil, err
9898 }
9899 req.Header = reqHeaders
9900 googleapi.Expand(req.URL, map[string]string{
9901 "resource": c.resource,
9902 })
9903 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
9904 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9905 }
9906
9907 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.setIamPolicy" call.
9908 // Any non-2xx status code is an error. Response headers are in either
9909 // *Policy.ServerResponse.Header or (if a response was returned at all) in
9910 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9911 // whether the returned error was because http.StatusNotModified was returned.
9912 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
9913 gensupport.SetOptions(c.urlParams_, opts...)
9914 res, err := c.doRequest("json")
9915 if res != nil && res.StatusCode == http.StatusNotModified {
9916 if res.Body != nil {
9917 res.Body.Close()
9918 }
9919 return nil, gensupport.WrapError(&googleapi.Error{
9920 Code: res.StatusCode,
9921 Header: res.Header,
9922 })
9923 }
9924 if err != nil {
9925 return nil, err
9926 }
9927 defer googleapi.CloseBody(res)
9928 if err := googleapi.CheckResponse(res); err != nil {
9929 return nil, gensupport.WrapError(err)
9930 }
9931 ret := &Policy{
9932 ServerResponse: googleapi.ServerResponse{
9933 Header: res.Header,
9934 HTTPStatusCode: res.StatusCode,
9935 },
9936 }
9937 target := &ret
9938 b, err := gensupport.DecodeResponseBytes(target, res)
9939 if err != nil {
9940 return nil, err
9941 }
9942 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.setIamPolicy", "response", internallog.HTTPResponse(res, b))
9943 return ret, nil
9944 }
9945
9946 type ProjectsLocationsBareMetalClustersBareMetalNodePoolsTestIamPermissionsCall struct {
9947 s *Service
9948 resource string
9949 testiampermissionsrequest *TestIamPermissionsRequest
9950 urlParams_ gensupport.URLParams
9951 ctx_ context.Context
9952 header_ http.Header
9953 }
9954
9955 // TestIamPermissions: Returns permissions that a caller has on the specified
9956 // resource. If the resource does not exist, this will return an empty set of
9957 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
9958 // used for building permission-aware UIs and command-line tools, not for
9959 // authorization checking. This operation may "fail open" without warning.
9960 //
9961 // - resource: REQUIRED: The resource for which the policy detail is being
9962 // requested. See Resource names
9963 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
9964 // value for this field.
9965 func (r *ProjectsLocationsBareMetalClustersBareMetalNodePoolsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsTestIamPermissionsCall {
9966 c := &ProjectsLocationsBareMetalClustersBareMetalNodePoolsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9967 c.resource = resource
9968 c.testiampermissionsrequest = testiampermissionsrequest
9969 return c
9970 }
9971
9972 // Fields allows partial responses to be retrieved. See
9973 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9974 // details.
9975 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsTestIamPermissionsCall {
9976 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9977 return c
9978 }
9979
9980 // Context sets the context to be used in this call's Do method.
9981 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsTestIamPermissionsCall {
9982 c.ctx_ = ctx
9983 return c
9984 }
9985
9986 // Header returns a http.Header that can be modified by the caller to add
9987 // headers to the request.
9988 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsTestIamPermissionsCall) Header() http.Header {
9989 if c.header_ == nil {
9990 c.header_ = make(http.Header)
9991 }
9992 return c.header_
9993 }
9994
9995 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
9996 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9997 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
9998 if err != nil {
9999 return nil, err
10000 }
10001 c.urlParams_.Set("alt", alt)
10002 c.urlParams_.Set("prettyPrint", "false")
10003 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
10004 urls += "?" + c.urlParams_.Encode()
10005 req, err := http.NewRequest("POST", urls, body)
10006 if err != nil {
10007 return nil, err
10008 }
10009 req.Header = reqHeaders
10010 googleapi.Expand(req.URL, map[string]string{
10011 "resource": c.resource,
10012 })
10013 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
10014 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10015 }
10016
10017 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.testIamPermissions" call.
10018 // Any non-2xx status code is an error. Response headers are in either
10019 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
10020 // returned at all) in error.(*googleapi.Error).Header. Use
10021 // googleapi.IsNotModified to check whether the returned error was because
10022 // http.StatusNotModified was returned.
10023 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
10024 gensupport.SetOptions(c.urlParams_, opts...)
10025 res, err := c.doRequest("json")
10026 if res != nil && res.StatusCode == http.StatusNotModified {
10027 if res.Body != nil {
10028 res.Body.Close()
10029 }
10030 return nil, gensupport.WrapError(&googleapi.Error{
10031 Code: res.StatusCode,
10032 Header: res.Header,
10033 })
10034 }
10035 if err != nil {
10036 return nil, err
10037 }
10038 defer googleapi.CloseBody(res)
10039 if err := googleapi.CheckResponse(res); err != nil {
10040 return nil, gensupport.WrapError(err)
10041 }
10042 ret := &TestIamPermissionsResponse{
10043 ServerResponse: googleapi.ServerResponse{
10044 Header: res.Header,
10045 HTTPStatusCode: res.StatusCode,
10046 },
10047 }
10048 target := &ret
10049 b, err := gensupport.DecodeResponseBytes(target, res)
10050 if err != nil {
10051 return nil, err
10052 }
10053 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.testIamPermissions", "response", internallog.HTTPResponse(res, b))
10054 return ret, nil
10055 }
10056
10057 type ProjectsLocationsBareMetalClustersBareMetalNodePoolsUnenrollCall struct {
10058 s *Service
10059 name string
10060 urlParams_ gensupport.URLParams
10061 ctx_ context.Context
10062 header_ http.Header
10063 }
10064
10065 // Unenroll: Unenrolls a bare metal node pool from Anthos On-Prem API.
10066 //
10067 // - name: The name of the node pool to unenroll. Format:
10068 // projects/{project}/locations/{location}/bareMetalClusters/{cluster}/bareMet
10069 // alNodePools/{nodepool}.
10070 func (r *ProjectsLocationsBareMetalClustersBareMetalNodePoolsService) Unenroll(name string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsUnenrollCall {
10071 c := &ProjectsLocationsBareMetalClustersBareMetalNodePoolsUnenrollCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10072 c.name = name
10073 return c
10074 }
10075
10076 // AllowMissing sets the optional parameter "allowMissing": If set to true, and
10077 // the bare metal node pool is not found, the request will succeed but no
10078 // action will be taken on the server and return a completed LRO.
10079 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsUnenrollCall) AllowMissing(allowMissing bool) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsUnenrollCall {
10080 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
10081 return c
10082 }
10083
10084 // Etag sets the optional parameter "etag": The current etag of the bare metal
10085 // node pool. If an etag is provided and does not match the current etag of
10086 // node pool, deletion will be blocked and an ABORTED error will be returned.
10087 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsUnenrollCall) Etag(etag string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsUnenrollCall {
10088 c.urlParams_.Set("etag", etag)
10089 return c
10090 }
10091
10092 // ValidateOnly sets the optional parameter "validateOnly": If set, only
10093 // validate the request, but do not actually unenroll the node pool.
10094 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsUnenrollCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsUnenrollCall {
10095 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
10096 return c
10097 }
10098
10099 // Fields allows partial responses to be retrieved. See
10100 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10101 // details.
10102 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsUnenrollCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsUnenrollCall {
10103 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10104 return c
10105 }
10106
10107 // Context sets the context to be used in this call's Do method.
10108 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsUnenrollCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsUnenrollCall {
10109 c.ctx_ = ctx
10110 return c
10111 }
10112
10113 // Header returns a http.Header that can be modified by the caller to add
10114 // headers to the request.
10115 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsUnenrollCall) Header() http.Header {
10116 if c.header_ == nil {
10117 c.header_ = make(http.Header)
10118 }
10119 return c.header_
10120 }
10121
10122 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsUnenrollCall) doRequest(alt string) (*http.Response, error) {
10123 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10124 c.urlParams_.Set("alt", alt)
10125 c.urlParams_.Set("prettyPrint", "false")
10126 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:unenroll")
10127 urls += "?" + c.urlParams_.Encode()
10128 req, err := http.NewRequest("DELETE", urls, nil)
10129 if err != nil {
10130 return nil, err
10131 }
10132 req.Header = reqHeaders
10133 googleapi.Expand(req.URL, map[string]string{
10134 "name": c.name,
10135 })
10136 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.unenroll", "request", internallog.HTTPRequest(req, nil))
10137 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10138 }
10139
10140 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.unenroll" call.
10141 // Any non-2xx status code is an error. Response headers are in either
10142 // *Operation.ServerResponse.Header or (if a response was returned at all) in
10143 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10144 // whether the returned error was because http.StatusNotModified was returned.
10145 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsUnenrollCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10146 gensupport.SetOptions(c.urlParams_, opts...)
10147 res, err := c.doRequest("json")
10148 if res != nil && res.StatusCode == http.StatusNotModified {
10149 if res.Body != nil {
10150 res.Body.Close()
10151 }
10152 return nil, gensupport.WrapError(&googleapi.Error{
10153 Code: res.StatusCode,
10154 Header: res.Header,
10155 })
10156 }
10157 if err != nil {
10158 return nil, err
10159 }
10160 defer googleapi.CloseBody(res)
10161 if err := googleapi.CheckResponse(res); err != nil {
10162 return nil, gensupport.WrapError(err)
10163 }
10164 ret := &Operation{
10165 ServerResponse: googleapi.ServerResponse{
10166 Header: res.Header,
10167 HTTPStatusCode: res.StatusCode,
10168 },
10169 }
10170 target := &ret
10171 b, err := gensupport.DecodeResponseBytes(target, res)
10172 if err != nil {
10173 return nil, err
10174 }
10175 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.unenroll", "response", internallog.HTTPResponse(res, b))
10176 return ret, nil
10177 }
10178
10179 type ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsGetCall struct {
10180 s *Service
10181 name string
10182 urlParams_ gensupport.URLParams
10183 ifNoneMatch_ string
10184 ctx_ context.Context
10185 header_ http.Header
10186 }
10187
10188 // Get: Gets the latest state of a long-running operation. Clients can use this
10189 // method to poll the operation result at intervals as recommended by the API
10190 // service.
10191 //
10192 // - name: The name of the operation resource.
10193 func (r *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsService) Get(name string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsGetCall {
10194 c := &ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10195 c.name = name
10196 return c
10197 }
10198
10199 // Fields allows partial responses to be retrieved. See
10200 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10201 // details.
10202 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsGetCall {
10203 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10204 return c
10205 }
10206
10207 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10208 // object's ETag matches the given value. This is useful for getting updates
10209 // only after the object has changed since the last request.
10210 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsGetCall {
10211 c.ifNoneMatch_ = entityTag
10212 return c
10213 }
10214
10215 // Context sets the context to be used in this call's Do method.
10216 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsGetCall {
10217 c.ctx_ = ctx
10218 return c
10219 }
10220
10221 // Header returns a http.Header that can be modified by the caller to add
10222 // headers to the request.
10223 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsGetCall) Header() http.Header {
10224 if c.header_ == nil {
10225 c.header_ = make(http.Header)
10226 }
10227 return c.header_
10228 }
10229
10230 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
10231 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10232 if c.ifNoneMatch_ != "" {
10233 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10234 }
10235 c.urlParams_.Set("alt", alt)
10236 c.urlParams_.Set("prettyPrint", "false")
10237 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10238 urls += "?" + c.urlParams_.Encode()
10239 req, err := http.NewRequest("GET", urls, nil)
10240 if err != nil {
10241 return nil, err
10242 }
10243 req.Header = reqHeaders
10244 googleapi.Expand(req.URL, map[string]string{
10245 "name": c.name,
10246 })
10247 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.operations.get", "request", internallog.HTTPRequest(req, nil))
10248 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10249 }
10250
10251 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.operations.get" call.
10252 // Any non-2xx status code is an error. Response headers are in either
10253 // *Operation.ServerResponse.Header or (if a response was returned at all) in
10254 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10255 // whether the returned error was because http.StatusNotModified was returned.
10256 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10257 gensupport.SetOptions(c.urlParams_, opts...)
10258 res, err := c.doRequest("json")
10259 if res != nil && res.StatusCode == http.StatusNotModified {
10260 if res.Body != nil {
10261 res.Body.Close()
10262 }
10263 return nil, gensupport.WrapError(&googleapi.Error{
10264 Code: res.StatusCode,
10265 Header: res.Header,
10266 })
10267 }
10268 if err != nil {
10269 return nil, err
10270 }
10271 defer googleapi.CloseBody(res)
10272 if err := googleapi.CheckResponse(res); err != nil {
10273 return nil, gensupport.WrapError(err)
10274 }
10275 ret := &Operation{
10276 ServerResponse: googleapi.ServerResponse{
10277 Header: res.Header,
10278 HTTPStatusCode: res.StatusCode,
10279 },
10280 }
10281 target := &ret
10282 b, err := gensupport.DecodeResponseBytes(target, res)
10283 if err != nil {
10284 return nil, err
10285 }
10286 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.operations.get", "response", internallog.HTTPResponse(res, b))
10287 return ret, nil
10288 }
10289
10290 type ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall struct {
10291 s *Service
10292 name string
10293 urlParams_ gensupport.URLParams
10294 ifNoneMatch_ string
10295 ctx_ context.Context
10296 header_ http.Header
10297 }
10298
10299 // List: Lists operations that match the specified filter in the request. If
10300 // the server doesn't support this method, it returns `UNIMPLEMENTED`.
10301 //
10302 // - name: The name of the operation's parent resource.
10303 func (r *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsService) List(name string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall {
10304 c := &ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10305 c.name = name
10306 return c
10307 }
10308
10309 // Filter sets the optional parameter "filter": The standard list filter.
10310 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall) Filter(filter string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall {
10311 c.urlParams_.Set("filter", filter)
10312 return c
10313 }
10314
10315 // PageSize sets the optional parameter "pageSize": The standard list page
10316 // size.
10317 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall {
10318 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10319 return c
10320 }
10321
10322 // PageToken sets the optional parameter "pageToken": The standard list page
10323 // token.
10324 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall {
10325 c.urlParams_.Set("pageToken", pageToken)
10326 return c
10327 }
10328
10329 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess":
10330 // When set to `true`, operations that are reachable are returned as normal,
10331 // and those that are unreachable are returned in the
10332 // ListOperationsResponse.unreachable field. This can only be `true` when
10333 // reading across collections. For example, when `parent` is set to
10334 // "projects/example/locations/-". This field is not supported by default and
10335 // will result in an `UNIMPLEMENTED` error if set unless explicitly documented
10336 // otherwise in service or product specific documentation.
10337 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall {
10338 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
10339 return c
10340 }
10341
10342 // Fields allows partial responses to be retrieved. See
10343 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10344 // details.
10345 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall {
10346 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10347 return c
10348 }
10349
10350 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10351 // object's ETag matches the given value. This is useful for getting updates
10352 // only after the object has changed since the last request.
10353 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall {
10354 c.ifNoneMatch_ = entityTag
10355 return c
10356 }
10357
10358 // Context sets the context to be used in this call's Do method.
10359 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall {
10360 c.ctx_ = ctx
10361 return c
10362 }
10363
10364 // Header returns a http.Header that can be modified by the caller to add
10365 // headers to the request.
10366 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall) Header() http.Header {
10367 if c.header_ == nil {
10368 c.header_ = make(http.Header)
10369 }
10370 return c.header_
10371 }
10372
10373 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall) doRequest(alt string) (*http.Response, error) {
10374 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10375 if c.ifNoneMatch_ != "" {
10376 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10377 }
10378 c.urlParams_.Set("alt", alt)
10379 c.urlParams_.Set("prettyPrint", "false")
10380 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
10381 urls += "?" + c.urlParams_.Encode()
10382 req, err := http.NewRequest("GET", urls, nil)
10383 if err != nil {
10384 return nil, err
10385 }
10386 req.Header = reqHeaders
10387 googleapi.Expand(req.URL, map[string]string{
10388 "name": c.name,
10389 })
10390 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.operations.list", "request", internallog.HTTPRequest(req, nil))
10391 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10392 }
10393
10394 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.operations.list" call.
10395 // Any non-2xx status code is an error. Response headers are in either
10396 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
10397 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10398 // check whether the returned error was because http.StatusNotModified was
10399 // returned.
10400 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
10401 gensupport.SetOptions(c.urlParams_, opts...)
10402 res, err := c.doRequest("json")
10403 if res != nil && res.StatusCode == http.StatusNotModified {
10404 if res.Body != nil {
10405 res.Body.Close()
10406 }
10407 return nil, gensupport.WrapError(&googleapi.Error{
10408 Code: res.StatusCode,
10409 Header: res.Header,
10410 })
10411 }
10412 if err != nil {
10413 return nil, err
10414 }
10415 defer googleapi.CloseBody(res)
10416 if err := googleapi.CheckResponse(res); err != nil {
10417 return nil, gensupport.WrapError(err)
10418 }
10419 ret := &ListOperationsResponse{
10420 ServerResponse: googleapi.ServerResponse{
10421 Header: res.Header,
10422 HTTPStatusCode: res.StatusCode,
10423 },
10424 }
10425 target := &ret
10426 b, err := gensupport.DecodeResponseBytes(target, res)
10427 if err != nil {
10428 return nil, err
10429 }
10430 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.bareMetalNodePools.operations.list", "response", internallog.HTTPResponse(res, b))
10431 return ret, nil
10432 }
10433
10434 // Pages invokes f for each page of results.
10435 // A non-nil error returned from f will halt the iteration.
10436 // The provided context supersedes any context provided to the Context method.
10437 func (c *ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
10438 c.ctx_ = ctx
10439 defer c.PageToken(c.urlParams_.Get("pageToken"))
10440 for {
10441 x, err := c.Do()
10442 if err != nil {
10443 return err
10444 }
10445 if err := f(x); err != nil {
10446 return err
10447 }
10448 if x.NextPageToken == "" {
10449 return nil
10450 }
10451 c.PageToken(x.NextPageToken)
10452 }
10453 }
10454
10455 type ProjectsLocationsBareMetalClustersOperationsGetCall struct {
10456 s *Service
10457 name string
10458 urlParams_ gensupport.URLParams
10459 ifNoneMatch_ string
10460 ctx_ context.Context
10461 header_ http.Header
10462 }
10463
10464 // Get: Gets the latest state of a long-running operation. Clients can use this
10465 // method to poll the operation result at intervals as recommended by the API
10466 // service.
10467 //
10468 // - name: The name of the operation resource.
10469 func (r *ProjectsLocationsBareMetalClustersOperationsService) Get(name string) *ProjectsLocationsBareMetalClustersOperationsGetCall {
10470 c := &ProjectsLocationsBareMetalClustersOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10471 c.name = name
10472 return c
10473 }
10474
10475 // Fields allows partial responses to be retrieved. See
10476 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10477 // details.
10478 func (c *ProjectsLocationsBareMetalClustersOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersOperationsGetCall {
10479 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10480 return c
10481 }
10482
10483 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10484 // object's ETag matches the given value. This is useful for getting updates
10485 // only after the object has changed since the last request.
10486 func (c *ProjectsLocationsBareMetalClustersOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBareMetalClustersOperationsGetCall {
10487 c.ifNoneMatch_ = entityTag
10488 return c
10489 }
10490
10491 // Context sets the context to be used in this call's Do method.
10492 func (c *ProjectsLocationsBareMetalClustersOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersOperationsGetCall {
10493 c.ctx_ = ctx
10494 return c
10495 }
10496
10497 // Header returns a http.Header that can be modified by the caller to add
10498 // headers to the request.
10499 func (c *ProjectsLocationsBareMetalClustersOperationsGetCall) Header() http.Header {
10500 if c.header_ == nil {
10501 c.header_ = make(http.Header)
10502 }
10503 return c.header_
10504 }
10505
10506 func (c *ProjectsLocationsBareMetalClustersOperationsGetCall) doRequest(alt string) (*http.Response, error) {
10507 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10508 if c.ifNoneMatch_ != "" {
10509 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10510 }
10511 c.urlParams_.Set("alt", alt)
10512 c.urlParams_.Set("prettyPrint", "false")
10513 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10514 urls += "?" + c.urlParams_.Encode()
10515 req, err := http.NewRequest("GET", urls, nil)
10516 if err != nil {
10517 return nil, err
10518 }
10519 req.Header = reqHeaders
10520 googleapi.Expand(req.URL, map[string]string{
10521 "name": c.name,
10522 })
10523 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.operations.get", "request", internallog.HTTPRequest(req, nil))
10524 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10525 }
10526
10527 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.operations.get" call.
10528 // Any non-2xx status code is an error. Response headers are in either
10529 // *Operation.ServerResponse.Header or (if a response was returned at all) in
10530 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10531 // whether the returned error was because http.StatusNotModified was returned.
10532 func (c *ProjectsLocationsBareMetalClustersOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10533 gensupport.SetOptions(c.urlParams_, opts...)
10534 res, err := c.doRequest("json")
10535 if res != nil && res.StatusCode == http.StatusNotModified {
10536 if res.Body != nil {
10537 res.Body.Close()
10538 }
10539 return nil, gensupport.WrapError(&googleapi.Error{
10540 Code: res.StatusCode,
10541 Header: res.Header,
10542 })
10543 }
10544 if err != nil {
10545 return nil, err
10546 }
10547 defer googleapi.CloseBody(res)
10548 if err := googleapi.CheckResponse(res); err != nil {
10549 return nil, gensupport.WrapError(err)
10550 }
10551 ret := &Operation{
10552 ServerResponse: googleapi.ServerResponse{
10553 Header: res.Header,
10554 HTTPStatusCode: res.StatusCode,
10555 },
10556 }
10557 target := &ret
10558 b, err := gensupport.DecodeResponseBytes(target, res)
10559 if err != nil {
10560 return nil, err
10561 }
10562 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.operations.get", "response", internallog.HTTPResponse(res, b))
10563 return ret, nil
10564 }
10565
10566 type ProjectsLocationsBareMetalClustersOperationsListCall struct {
10567 s *Service
10568 name string
10569 urlParams_ gensupport.URLParams
10570 ifNoneMatch_ string
10571 ctx_ context.Context
10572 header_ http.Header
10573 }
10574
10575 // List: Lists operations that match the specified filter in the request. If
10576 // the server doesn't support this method, it returns `UNIMPLEMENTED`.
10577 //
10578 // - name: The name of the operation's parent resource.
10579 func (r *ProjectsLocationsBareMetalClustersOperationsService) List(name string) *ProjectsLocationsBareMetalClustersOperationsListCall {
10580 c := &ProjectsLocationsBareMetalClustersOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10581 c.name = name
10582 return c
10583 }
10584
10585 // Filter sets the optional parameter "filter": The standard list filter.
10586 func (c *ProjectsLocationsBareMetalClustersOperationsListCall) Filter(filter string) *ProjectsLocationsBareMetalClustersOperationsListCall {
10587 c.urlParams_.Set("filter", filter)
10588 return c
10589 }
10590
10591 // PageSize sets the optional parameter "pageSize": The standard list page
10592 // size.
10593 func (c *ProjectsLocationsBareMetalClustersOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsBareMetalClustersOperationsListCall {
10594 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10595 return c
10596 }
10597
10598 // PageToken sets the optional parameter "pageToken": The standard list page
10599 // token.
10600 func (c *ProjectsLocationsBareMetalClustersOperationsListCall) PageToken(pageToken string) *ProjectsLocationsBareMetalClustersOperationsListCall {
10601 c.urlParams_.Set("pageToken", pageToken)
10602 return c
10603 }
10604
10605 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess":
10606 // When set to `true`, operations that are reachable are returned as normal,
10607 // and those that are unreachable are returned in the
10608 // ListOperationsResponse.unreachable field. This can only be `true` when
10609 // reading across collections. For example, when `parent` is set to
10610 // "projects/example/locations/-". This field is not supported by default and
10611 // will result in an `UNIMPLEMENTED` error if set unless explicitly documented
10612 // otherwise in service or product specific documentation.
10613 func (c *ProjectsLocationsBareMetalClustersOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsBareMetalClustersOperationsListCall {
10614 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
10615 return c
10616 }
10617
10618 // Fields allows partial responses to be retrieved. See
10619 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10620 // details.
10621 func (c *ProjectsLocationsBareMetalClustersOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBareMetalClustersOperationsListCall {
10622 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10623 return c
10624 }
10625
10626 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10627 // object's ETag matches the given value. This is useful for getting updates
10628 // only after the object has changed since the last request.
10629 func (c *ProjectsLocationsBareMetalClustersOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBareMetalClustersOperationsListCall {
10630 c.ifNoneMatch_ = entityTag
10631 return c
10632 }
10633
10634 // Context sets the context to be used in this call's Do method.
10635 func (c *ProjectsLocationsBareMetalClustersOperationsListCall) Context(ctx context.Context) *ProjectsLocationsBareMetalClustersOperationsListCall {
10636 c.ctx_ = ctx
10637 return c
10638 }
10639
10640 // Header returns a http.Header that can be modified by the caller to add
10641 // headers to the request.
10642 func (c *ProjectsLocationsBareMetalClustersOperationsListCall) Header() http.Header {
10643 if c.header_ == nil {
10644 c.header_ = make(http.Header)
10645 }
10646 return c.header_
10647 }
10648
10649 func (c *ProjectsLocationsBareMetalClustersOperationsListCall) doRequest(alt string) (*http.Response, error) {
10650 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10651 if c.ifNoneMatch_ != "" {
10652 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10653 }
10654 c.urlParams_.Set("alt", alt)
10655 c.urlParams_.Set("prettyPrint", "false")
10656 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
10657 urls += "?" + c.urlParams_.Encode()
10658 req, err := http.NewRequest("GET", urls, nil)
10659 if err != nil {
10660 return nil, err
10661 }
10662 req.Header = reqHeaders
10663 googleapi.Expand(req.URL, map[string]string{
10664 "name": c.name,
10665 })
10666 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.operations.list", "request", internallog.HTTPRequest(req, nil))
10667 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10668 }
10669
10670 // Do executes the "gkeonprem.projects.locations.bareMetalClusters.operations.list" call.
10671 // Any non-2xx status code is an error. Response headers are in either
10672 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
10673 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10674 // check whether the returned error was because http.StatusNotModified was
10675 // returned.
10676 func (c *ProjectsLocationsBareMetalClustersOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
10677 gensupport.SetOptions(c.urlParams_, opts...)
10678 res, err := c.doRequest("json")
10679 if res != nil && res.StatusCode == http.StatusNotModified {
10680 if res.Body != nil {
10681 res.Body.Close()
10682 }
10683 return nil, gensupport.WrapError(&googleapi.Error{
10684 Code: res.StatusCode,
10685 Header: res.Header,
10686 })
10687 }
10688 if err != nil {
10689 return nil, err
10690 }
10691 defer googleapi.CloseBody(res)
10692 if err := googleapi.CheckResponse(res); err != nil {
10693 return nil, gensupport.WrapError(err)
10694 }
10695 ret := &ListOperationsResponse{
10696 ServerResponse: googleapi.ServerResponse{
10697 Header: res.Header,
10698 HTTPStatusCode: res.StatusCode,
10699 },
10700 }
10701 target := &ret
10702 b, err := gensupport.DecodeResponseBytes(target, res)
10703 if err != nil {
10704 return nil, err
10705 }
10706 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.bareMetalClusters.operations.list", "response", internallog.HTTPResponse(res, b))
10707 return ret, nil
10708 }
10709
10710 // Pages invokes f for each page of results.
10711 // A non-nil error returned from f will halt the iteration.
10712 // The provided context supersedes any context provided to the Context method.
10713 func (c *ProjectsLocationsBareMetalClustersOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
10714 c.ctx_ = ctx
10715 defer c.PageToken(c.urlParams_.Get("pageToken"))
10716 for {
10717 x, err := c.Do()
10718 if err != nil {
10719 return err
10720 }
10721 if err := f(x); err != nil {
10722 return err
10723 }
10724 if x.NextPageToken == "" {
10725 return nil
10726 }
10727 c.PageToken(x.NextPageToken)
10728 }
10729 }
10730
10731 type ProjectsLocationsOperationsCancelCall struct {
10732 s *Service
10733 name string
10734 canceloperationrequest *CancelOperationRequest
10735 urlParams_ gensupport.URLParams
10736 ctx_ context.Context
10737 header_ http.Header
10738 }
10739
10740 // Cancel: Starts asynchronous cancellation on a long-running operation. The
10741 // server makes a best effort to cancel the operation, but success is not
10742 // guaranteed. If the server doesn't support this method, it returns
10743 // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
10744 // other methods to check whether the cancellation succeeded or whether the
10745 // operation completed despite cancellation. On successful cancellation, the
10746 // operation is not deleted; instead, it becomes an operation with an
10747 // Operation.error value with a google.rpc.Status.code of `1`, corresponding to
10748 // `Code.CANCELLED`.
10749 //
10750 // - name: The name of the operation resource to be cancelled.
10751 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
10752 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10753 c.name = name
10754 c.canceloperationrequest = canceloperationrequest
10755 return c
10756 }
10757
10758 // Fields allows partial responses to be retrieved. See
10759 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10760 // details.
10761 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
10762 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10763 return c
10764 }
10765
10766 // Context sets the context to be used in this call's Do method.
10767 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
10768 c.ctx_ = ctx
10769 return c
10770 }
10771
10772 // Header returns a http.Header that can be modified by the caller to add
10773 // headers to the request.
10774 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
10775 if c.header_ == nil {
10776 c.header_ = make(http.Header)
10777 }
10778 return c.header_
10779 }
10780
10781 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
10782 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10783 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.canceloperationrequest)
10784 if err != nil {
10785 return nil, err
10786 }
10787 c.urlParams_.Set("alt", alt)
10788 c.urlParams_.Set("prettyPrint", "false")
10789 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
10790 urls += "?" + c.urlParams_.Encode()
10791 req, err := http.NewRequest("POST", urls, body)
10792 if err != nil {
10793 return nil, err
10794 }
10795 req.Header = reqHeaders
10796 googleapi.Expand(req.URL, map[string]string{
10797 "name": c.name,
10798 })
10799 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.operations.cancel", "request", internallog.HTTPRequest(req, body.Bytes()))
10800 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10801 }
10802
10803 // Do executes the "gkeonprem.projects.locations.operations.cancel" call.
10804 // Any non-2xx status code is an error. Response headers are in either
10805 // *Empty.ServerResponse.Header or (if a response was returned at all) in
10806 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10807 // whether the returned error was because http.StatusNotModified was returned.
10808 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10809 gensupport.SetOptions(c.urlParams_, opts...)
10810 res, err := c.doRequest("json")
10811 if res != nil && res.StatusCode == http.StatusNotModified {
10812 if res.Body != nil {
10813 res.Body.Close()
10814 }
10815 return nil, gensupport.WrapError(&googleapi.Error{
10816 Code: res.StatusCode,
10817 Header: res.Header,
10818 })
10819 }
10820 if err != nil {
10821 return nil, err
10822 }
10823 defer googleapi.CloseBody(res)
10824 if err := googleapi.CheckResponse(res); err != nil {
10825 return nil, gensupport.WrapError(err)
10826 }
10827 ret := &Empty{
10828 ServerResponse: googleapi.ServerResponse{
10829 Header: res.Header,
10830 HTTPStatusCode: res.StatusCode,
10831 },
10832 }
10833 target := &ret
10834 b, err := gensupport.DecodeResponseBytes(target, res)
10835 if err != nil {
10836 return nil, err
10837 }
10838 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.operations.cancel", "response", internallog.HTTPResponse(res, b))
10839 return ret, nil
10840 }
10841
10842 type ProjectsLocationsOperationsDeleteCall struct {
10843 s *Service
10844 name string
10845 urlParams_ gensupport.URLParams
10846 ctx_ context.Context
10847 header_ http.Header
10848 }
10849
10850 // Delete: Deletes a long-running operation. This method indicates that the
10851 // client is no longer interested in the operation result. It does not cancel
10852 // the operation. If the server doesn't support this method, it returns
10853 // `google.rpc.Code.UNIMPLEMENTED`.
10854 //
10855 // - name: The name of the operation resource to be deleted.
10856 func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
10857 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10858 c.name = name
10859 return c
10860 }
10861
10862 // Fields allows partial responses to be retrieved. See
10863 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10864 // details.
10865 func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
10866 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10867 return c
10868 }
10869
10870 // Context sets the context to be used in this call's Do method.
10871 func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
10872 c.ctx_ = ctx
10873 return c
10874 }
10875
10876 // Header returns a http.Header that can be modified by the caller to add
10877 // headers to the request.
10878 func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
10879 if c.header_ == nil {
10880 c.header_ = make(http.Header)
10881 }
10882 return c.header_
10883 }
10884
10885 func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
10886 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10887 c.urlParams_.Set("alt", alt)
10888 c.urlParams_.Set("prettyPrint", "false")
10889 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10890 urls += "?" + c.urlParams_.Encode()
10891 req, err := http.NewRequest("DELETE", urls, nil)
10892 if err != nil {
10893 return nil, err
10894 }
10895 req.Header = reqHeaders
10896 googleapi.Expand(req.URL, map[string]string{
10897 "name": c.name,
10898 })
10899 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.operations.delete", "request", internallog.HTTPRequest(req, nil))
10900 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10901 }
10902
10903 // Do executes the "gkeonprem.projects.locations.operations.delete" call.
10904 // Any non-2xx status code is an error. Response headers are in either
10905 // *Empty.ServerResponse.Header or (if a response was returned at all) in
10906 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10907 // whether the returned error was because http.StatusNotModified was returned.
10908 func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10909 gensupport.SetOptions(c.urlParams_, opts...)
10910 res, err := c.doRequest("json")
10911 if res != nil && res.StatusCode == http.StatusNotModified {
10912 if res.Body != nil {
10913 res.Body.Close()
10914 }
10915 return nil, gensupport.WrapError(&googleapi.Error{
10916 Code: res.StatusCode,
10917 Header: res.Header,
10918 })
10919 }
10920 if err != nil {
10921 return nil, err
10922 }
10923 defer googleapi.CloseBody(res)
10924 if err := googleapi.CheckResponse(res); err != nil {
10925 return nil, gensupport.WrapError(err)
10926 }
10927 ret := &Empty{
10928 ServerResponse: googleapi.ServerResponse{
10929 Header: res.Header,
10930 HTTPStatusCode: res.StatusCode,
10931 },
10932 }
10933 target := &ret
10934 b, err := gensupport.DecodeResponseBytes(target, res)
10935 if err != nil {
10936 return nil, err
10937 }
10938 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.operations.delete", "response", internallog.HTTPResponse(res, b))
10939 return ret, nil
10940 }
10941
10942 type ProjectsLocationsOperationsGetCall struct {
10943 s *Service
10944 name string
10945 urlParams_ gensupport.URLParams
10946 ifNoneMatch_ string
10947 ctx_ context.Context
10948 header_ http.Header
10949 }
10950
10951 // Get: Gets the latest state of a long-running operation. Clients can use this
10952 // method to poll the operation result at intervals as recommended by the API
10953 // service.
10954 //
10955 // - name: The name of the operation resource.
10956 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
10957 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10958 c.name = name
10959 return c
10960 }
10961
10962 // Fields allows partial responses to be retrieved. See
10963 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10964 // details.
10965 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
10966 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10967 return c
10968 }
10969
10970 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10971 // object's ETag matches the given value. This is useful for getting updates
10972 // only after the object has changed since the last request.
10973 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
10974 c.ifNoneMatch_ = entityTag
10975 return c
10976 }
10977
10978 // Context sets the context to be used in this call's Do method.
10979 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
10980 c.ctx_ = ctx
10981 return c
10982 }
10983
10984 // Header returns a http.Header that can be modified by the caller to add
10985 // headers to the request.
10986 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
10987 if c.header_ == nil {
10988 c.header_ = make(http.Header)
10989 }
10990 return c.header_
10991 }
10992
10993 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
10994 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10995 if c.ifNoneMatch_ != "" {
10996 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10997 }
10998 c.urlParams_.Set("alt", alt)
10999 c.urlParams_.Set("prettyPrint", "false")
11000 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
11001 urls += "?" + c.urlParams_.Encode()
11002 req, err := http.NewRequest("GET", urls, nil)
11003 if err != nil {
11004 return nil, err
11005 }
11006 req.Header = reqHeaders
11007 googleapi.Expand(req.URL, map[string]string{
11008 "name": c.name,
11009 })
11010 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.operations.get", "request", internallog.HTTPRequest(req, nil))
11011 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11012 }
11013
11014 // Do executes the "gkeonprem.projects.locations.operations.get" call.
11015 // Any non-2xx status code is an error. Response headers are in either
11016 // *Operation.ServerResponse.Header or (if a response was returned at all) in
11017 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11018 // whether the returned error was because http.StatusNotModified was returned.
11019 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11020 gensupport.SetOptions(c.urlParams_, opts...)
11021 res, err := c.doRequest("json")
11022 if res != nil && res.StatusCode == http.StatusNotModified {
11023 if res.Body != nil {
11024 res.Body.Close()
11025 }
11026 return nil, gensupport.WrapError(&googleapi.Error{
11027 Code: res.StatusCode,
11028 Header: res.Header,
11029 })
11030 }
11031 if err != nil {
11032 return nil, err
11033 }
11034 defer googleapi.CloseBody(res)
11035 if err := googleapi.CheckResponse(res); err != nil {
11036 return nil, gensupport.WrapError(err)
11037 }
11038 ret := &Operation{
11039 ServerResponse: googleapi.ServerResponse{
11040 Header: res.Header,
11041 HTTPStatusCode: res.StatusCode,
11042 },
11043 }
11044 target := &ret
11045 b, err := gensupport.DecodeResponseBytes(target, res)
11046 if err != nil {
11047 return nil, err
11048 }
11049 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.operations.get", "response", internallog.HTTPResponse(res, b))
11050 return ret, nil
11051 }
11052
11053 type ProjectsLocationsOperationsListCall struct {
11054 s *Service
11055 name string
11056 urlParams_ gensupport.URLParams
11057 ifNoneMatch_ string
11058 ctx_ context.Context
11059 header_ http.Header
11060 }
11061
11062 // List: Lists operations that match the specified filter in the request. If
11063 // the server doesn't support this method, it returns `UNIMPLEMENTED`.
11064 //
11065 // - name: The name of the operation's parent resource.
11066 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
11067 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11068 c.name = name
11069 return c
11070 }
11071
11072 // Filter sets the optional parameter "filter": The standard list filter.
11073 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
11074 c.urlParams_.Set("filter", filter)
11075 return c
11076 }
11077
11078 // PageSize sets the optional parameter "pageSize": The standard list page
11079 // size.
11080 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
11081 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11082 return c
11083 }
11084
11085 // PageToken sets the optional parameter "pageToken": The standard list page
11086 // token.
11087 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
11088 c.urlParams_.Set("pageToken", pageToken)
11089 return c
11090 }
11091
11092 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess":
11093 // When set to `true`, operations that are reachable are returned as normal,
11094 // and those that are unreachable are returned in the
11095 // ListOperationsResponse.unreachable field. This can only be `true` when
11096 // reading across collections. For example, when `parent` is set to
11097 // "projects/example/locations/-". This field is not supported by default and
11098 // will result in an `UNIMPLEMENTED` error if set unless explicitly documented
11099 // otherwise in service or product specific documentation.
11100 func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall {
11101 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
11102 return c
11103 }
11104
11105 // Fields allows partial responses to be retrieved. See
11106 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11107 // details.
11108 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
11109 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11110 return c
11111 }
11112
11113 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11114 // object's ETag matches the given value. This is useful for getting updates
11115 // only after the object has changed since the last request.
11116 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
11117 c.ifNoneMatch_ = entityTag
11118 return c
11119 }
11120
11121 // Context sets the context to be used in this call's Do method.
11122 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
11123 c.ctx_ = ctx
11124 return c
11125 }
11126
11127 // Header returns a http.Header that can be modified by the caller to add
11128 // headers to the request.
11129 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
11130 if c.header_ == nil {
11131 c.header_ = make(http.Header)
11132 }
11133 return c.header_
11134 }
11135
11136 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
11137 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11138 if c.ifNoneMatch_ != "" {
11139 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11140 }
11141 c.urlParams_.Set("alt", alt)
11142 c.urlParams_.Set("prettyPrint", "false")
11143 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
11144 urls += "?" + c.urlParams_.Encode()
11145 req, err := http.NewRequest("GET", urls, nil)
11146 if err != nil {
11147 return nil, err
11148 }
11149 req.Header = reqHeaders
11150 googleapi.Expand(req.URL, map[string]string{
11151 "name": c.name,
11152 })
11153 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.operations.list", "request", internallog.HTTPRequest(req, nil))
11154 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11155 }
11156
11157 // Do executes the "gkeonprem.projects.locations.operations.list" call.
11158 // Any non-2xx status code is an error. Response headers are in either
11159 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
11160 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11161 // check whether the returned error was because http.StatusNotModified was
11162 // returned.
11163 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
11164 gensupport.SetOptions(c.urlParams_, opts...)
11165 res, err := c.doRequest("json")
11166 if res != nil && res.StatusCode == http.StatusNotModified {
11167 if res.Body != nil {
11168 res.Body.Close()
11169 }
11170 return nil, gensupport.WrapError(&googleapi.Error{
11171 Code: res.StatusCode,
11172 Header: res.Header,
11173 })
11174 }
11175 if err != nil {
11176 return nil, err
11177 }
11178 defer googleapi.CloseBody(res)
11179 if err := googleapi.CheckResponse(res); err != nil {
11180 return nil, gensupport.WrapError(err)
11181 }
11182 ret := &ListOperationsResponse{
11183 ServerResponse: googleapi.ServerResponse{
11184 Header: res.Header,
11185 HTTPStatusCode: res.StatusCode,
11186 },
11187 }
11188 target := &ret
11189 b, err := gensupport.DecodeResponseBytes(target, res)
11190 if err != nil {
11191 return nil, err
11192 }
11193 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.operations.list", "response", internallog.HTTPResponse(res, b))
11194 return ret, nil
11195 }
11196
11197 // Pages invokes f for each page of results.
11198 // A non-nil error returned from f will halt the iteration.
11199 // The provided context supersedes any context provided to the Context method.
11200 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
11201 c.ctx_ = ctx
11202 defer c.PageToken(c.urlParams_.Get("pageToken"))
11203 for {
11204 x, err := c.Do()
11205 if err != nil {
11206 return err
11207 }
11208 if err := f(x); err != nil {
11209 return err
11210 }
11211 if x.NextPageToken == "" {
11212 return nil
11213 }
11214 c.PageToken(x.NextPageToken)
11215 }
11216 }
11217
11218 type ProjectsLocationsVmwareAdminClustersCreateCall struct {
11219 s *Service
11220 parent string
11221 vmwareadmincluster *VmwareAdminCluster
11222 urlParams_ gensupport.URLParams
11223 ctx_ context.Context
11224 header_ http.Header
11225 }
11226
11227 // Create: Creates a new VMware admin cluster in a given project and location.
11228 // The API needs to be combined with creating a bootstrap cluster to work.
11229 //
11230 // - parent: The parent of the project and location where the cluster is
11231 // created in. Format: "projects/{project}/locations/{location}".
11232 func (r *ProjectsLocationsVmwareAdminClustersService) Create(parent string, vmwareadmincluster *VmwareAdminCluster) *ProjectsLocationsVmwareAdminClustersCreateCall {
11233 c := &ProjectsLocationsVmwareAdminClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11234 c.parent = parent
11235 c.vmwareadmincluster = vmwareadmincluster
11236 return c
11237 }
11238
11239 // AllowPreflightFailure sets the optional parameter "allowPreflightFailure":
11240 // If set to true, CLM will force CCFE to persist the cluster resource in RMS
11241 // when the creation fails during standalone preflight checks. In that case the
11242 // subsequent create call will fail with "cluster already exists" error and
11243 // hence a update cluster is required to fix the cluster.
11244 func (c *ProjectsLocationsVmwareAdminClustersCreateCall) AllowPreflightFailure(allowPreflightFailure bool) *ProjectsLocationsVmwareAdminClustersCreateCall {
11245 c.urlParams_.Set("allowPreflightFailure", fmt.Sprint(allowPreflightFailure))
11246 return c
11247 }
11248
11249 // SkipValidations sets the optional parameter "skipValidations": If set, skip
11250 // the specified validations.
11251 func (c *ProjectsLocationsVmwareAdminClustersCreateCall) SkipValidations(skipValidations ...string) *ProjectsLocationsVmwareAdminClustersCreateCall {
11252 c.urlParams_.SetMulti("skipValidations", append([]string{}, skipValidations...))
11253 return c
11254 }
11255
11256 // ValidateOnly sets the optional parameter "validateOnly": Validate the
11257 // request without actually doing any updates.
11258 func (c *ProjectsLocationsVmwareAdminClustersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsVmwareAdminClustersCreateCall {
11259 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
11260 return c
11261 }
11262
11263 // VmwareAdminClusterId sets the optional parameter "vmwareAdminClusterId":
11264 // Required. User provided identifier that is used as part of the resource
11265 // name; must conform to RFC-1034 and additionally restrict to lower-cased
11266 // letters. This comes out roughly to: /^a-z+[a-z0-9]$/
11267 func (c *ProjectsLocationsVmwareAdminClustersCreateCall) VmwareAdminClusterId(vmwareAdminClusterId string) *ProjectsLocationsVmwareAdminClustersCreateCall {
11268 c.urlParams_.Set("vmwareAdminClusterId", vmwareAdminClusterId)
11269 return c
11270 }
11271
11272 // Fields allows partial responses to be retrieved. See
11273 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11274 // details.
11275 func (c *ProjectsLocationsVmwareAdminClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareAdminClustersCreateCall {
11276 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11277 return c
11278 }
11279
11280 // Context sets the context to be used in this call's Do method.
11281 func (c *ProjectsLocationsVmwareAdminClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsVmwareAdminClustersCreateCall {
11282 c.ctx_ = ctx
11283 return c
11284 }
11285
11286 // Header returns a http.Header that can be modified by the caller to add
11287 // headers to the request.
11288 func (c *ProjectsLocationsVmwareAdminClustersCreateCall) Header() http.Header {
11289 if c.header_ == nil {
11290 c.header_ = make(http.Header)
11291 }
11292 return c.header_
11293 }
11294
11295 func (c *ProjectsLocationsVmwareAdminClustersCreateCall) doRequest(alt string) (*http.Response, error) {
11296 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11297 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.vmwareadmincluster)
11298 if err != nil {
11299 return nil, err
11300 }
11301 c.urlParams_.Set("alt", alt)
11302 c.urlParams_.Set("prettyPrint", "false")
11303 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/vmwareAdminClusters")
11304 urls += "?" + c.urlParams_.Encode()
11305 req, err := http.NewRequest("POST", urls, body)
11306 if err != nil {
11307 return nil, err
11308 }
11309 req.Header = reqHeaders
11310 googleapi.Expand(req.URL, map[string]string{
11311 "parent": c.parent,
11312 })
11313 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.create", "request", internallog.HTTPRequest(req, body.Bytes()))
11314 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11315 }
11316
11317 // Do executes the "gkeonprem.projects.locations.vmwareAdminClusters.create" call.
11318 // Any non-2xx status code is an error. Response headers are in either
11319 // *Operation.ServerResponse.Header or (if a response was returned at all) in
11320 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11321 // whether the returned error was because http.StatusNotModified was returned.
11322 func (c *ProjectsLocationsVmwareAdminClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11323 gensupport.SetOptions(c.urlParams_, opts...)
11324 res, err := c.doRequest("json")
11325 if res != nil && res.StatusCode == http.StatusNotModified {
11326 if res.Body != nil {
11327 res.Body.Close()
11328 }
11329 return nil, gensupport.WrapError(&googleapi.Error{
11330 Code: res.StatusCode,
11331 Header: res.Header,
11332 })
11333 }
11334 if err != nil {
11335 return nil, err
11336 }
11337 defer googleapi.CloseBody(res)
11338 if err := googleapi.CheckResponse(res); err != nil {
11339 return nil, gensupport.WrapError(err)
11340 }
11341 ret := &Operation{
11342 ServerResponse: googleapi.ServerResponse{
11343 Header: res.Header,
11344 HTTPStatusCode: res.StatusCode,
11345 },
11346 }
11347 target := &ret
11348 b, err := gensupport.DecodeResponseBytes(target, res)
11349 if err != nil {
11350 return nil, err
11351 }
11352 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.create", "response", internallog.HTTPResponse(res, b))
11353 return ret, nil
11354 }
11355
11356 type ProjectsLocationsVmwareAdminClustersEnrollCall struct {
11357 s *Service
11358 parent string
11359 enrollvmwareadminclusterrequest *EnrollVmwareAdminClusterRequest
11360 urlParams_ gensupport.URLParams
11361 ctx_ context.Context
11362 header_ http.Header
11363 }
11364
11365 // Enroll: Enrolls an existing VMware admin cluster to the Anthos On-Prem API
11366 // within a given project and location. Through enrollment, an existing admin
11367 // cluster will become Anthos On-Prem API managed. The corresponding GCP
11368 // resources will be created and all future modifications to the cluster will
11369 // be expected to be performed through the API.
11370 //
11371 // - parent: The parent of the project and location where the cluster is
11372 // enrolled in. Format: "projects/{project}/locations/{location}".
11373 func (r *ProjectsLocationsVmwareAdminClustersService) Enroll(parent string, enrollvmwareadminclusterrequest *EnrollVmwareAdminClusterRequest) *ProjectsLocationsVmwareAdminClustersEnrollCall {
11374 c := &ProjectsLocationsVmwareAdminClustersEnrollCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11375 c.parent = parent
11376 c.enrollvmwareadminclusterrequest = enrollvmwareadminclusterrequest
11377 return c
11378 }
11379
11380 // Fields allows partial responses to be retrieved. See
11381 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11382 // details.
11383 func (c *ProjectsLocationsVmwareAdminClustersEnrollCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareAdminClustersEnrollCall {
11384 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11385 return c
11386 }
11387
11388 // Context sets the context to be used in this call's Do method.
11389 func (c *ProjectsLocationsVmwareAdminClustersEnrollCall) Context(ctx context.Context) *ProjectsLocationsVmwareAdminClustersEnrollCall {
11390 c.ctx_ = ctx
11391 return c
11392 }
11393
11394 // Header returns a http.Header that can be modified by the caller to add
11395 // headers to the request.
11396 func (c *ProjectsLocationsVmwareAdminClustersEnrollCall) Header() http.Header {
11397 if c.header_ == nil {
11398 c.header_ = make(http.Header)
11399 }
11400 return c.header_
11401 }
11402
11403 func (c *ProjectsLocationsVmwareAdminClustersEnrollCall) doRequest(alt string) (*http.Response, error) {
11404 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11405 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.enrollvmwareadminclusterrequest)
11406 if err != nil {
11407 return nil, err
11408 }
11409 c.urlParams_.Set("alt", alt)
11410 c.urlParams_.Set("prettyPrint", "false")
11411 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/vmwareAdminClusters:enroll")
11412 urls += "?" + c.urlParams_.Encode()
11413 req, err := http.NewRequest("POST", urls, body)
11414 if err != nil {
11415 return nil, err
11416 }
11417 req.Header = reqHeaders
11418 googleapi.Expand(req.URL, map[string]string{
11419 "parent": c.parent,
11420 })
11421 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.enroll", "request", internallog.HTTPRequest(req, body.Bytes()))
11422 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11423 }
11424
11425 // Do executes the "gkeonprem.projects.locations.vmwareAdminClusters.enroll" call.
11426 // Any non-2xx status code is an error. Response headers are in either
11427 // *Operation.ServerResponse.Header or (if a response was returned at all) in
11428 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11429 // whether the returned error was because http.StatusNotModified was returned.
11430 func (c *ProjectsLocationsVmwareAdminClustersEnrollCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11431 gensupport.SetOptions(c.urlParams_, opts...)
11432 res, err := c.doRequest("json")
11433 if res != nil && res.StatusCode == http.StatusNotModified {
11434 if res.Body != nil {
11435 res.Body.Close()
11436 }
11437 return nil, gensupport.WrapError(&googleapi.Error{
11438 Code: res.StatusCode,
11439 Header: res.Header,
11440 })
11441 }
11442 if err != nil {
11443 return nil, err
11444 }
11445 defer googleapi.CloseBody(res)
11446 if err := googleapi.CheckResponse(res); err != nil {
11447 return nil, gensupport.WrapError(err)
11448 }
11449 ret := &Operation{
11450 ServerResponse: googleapi.ServerResponse{
11451 Header: res.Header,
11452 HTTPStatusCode: res.StatusCode,
11453 },
11454 }
11455 target := &ret
11456 b, err := gensupport.DecodeResponseBytes(target, res)
11457 if err != nil {
11458 return nil, err
11459 }
11460 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.enroll", "response", internallog.HTTPResponse(res, b))
11461 return ret, nil
11462 }
11463
11464 type ProjectsLocationsVmwareAdminClustersGetCall struct {
11465 s *Service
11466 name string
11467 urlParams_ gensupport.URLParams
11468 ifNoneMatch_ string
11469 ctx_ context.Context
11470 header_ http.Header
11471 }
11472
11473 // Get: Gets details of a single VMware admin cluster.
11474 //
11475 // - name: Name of the VMware admin cluster to be returned. Format:
11476 // "projects/{project}/locations/{location}/vmwareAdminClusters/{vmware_admin_
11477 // cluster}".
11478 func (r *ProjectsLocationsVmwareAdminClustersService) Get(name string) *ProjectsLocationsVmwareAdminClustersGetCall {
11479 c := &ProjectsLocationsVmwareAdminClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11480 c.name = name
11481 return c
11482 }
11483
11484 // AllowMissing sets the optional parameter "allowMissing": If true, return
11485 // Vmware Admin Cluster including the one that only exists in RMS.
11486 func (c *ProjectsLocationsVmwareAdminClustersGetCall) AllowMissing(allowMissing bool) *ProjectsLocationsVmwareAdminClustersGetCall {
11487 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
11488 return c
11489 }
11490
11491 // View sets the optional parameter "view": View for VMware admin cluster. When
11492 // `BASIC` is specified, only the cluster resource name and membership are
11493 // returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED` is the same as
11494 // `FULL', which returns the complete cluster configuration details.
11495 //
11496 // Possible values:
11497 //
11498 // "CLUSTER_VIEW_UNSPECIFIED" - If the value is not set, the default `FULL`
11499 //
11500 // view is used.
11501 //
11502 // "BASIC" - Includes basic information of a cluster resource including
11503 //
11504 // cluster resource name and membership.
11505 //
11506 // "FULL" - Includes the complete configuration for VMware admin cluster
11507 //
11508 // resource. This is the default value for GetVmwareAdminClusterRequest method.
11509 func (c *ProjectsLocationsVmwareAdminClustersGetCall) View(view string) *ProjectsLocationsVmwareAdminClustersGetCall {
11510 c.urlParams_.Set("view", view)
11511 return c
11512 }
11513
11514 // Fields allows partial responses to be retrieved. See
11515 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11516 // details.
11517 func (c *ProjectsLocationsVmwareAdminClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareAdminClustersGetCall {
11518 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11519 return c
11520 }
11521
11522 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11523 // object's ETag matches the given value. This is useful for getting updates
11524 // only after the object has changed since the last request.
11525 func (c *ProjectsLocationsVmwareAdminClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVmwareAdminClustersGetCall {
11526 c.ifNoneMatch_ = entityTag
11527 return c
11528 }
11529
11530 // Context sets the context to be used in this call's Do method.
11531 func (c *ProjectsLocationsVmwareAdminClustersGetCall) Context(ctx context.Context) *ProjectsLocationsVmwareAdminClustersGetCall {
11532 c.ctx_ = ctx
11533 return c
11534 }
11535
11536 // Header returns a http.Header that can be modified by the caller to add
11537 // headers to the request.
11538 func (c *ProjectsLocationsVmwareAdminClustersGetCall) Header() http.Header {
11539 if c.header_ == nil {
11540 c.header_ = make(http.Header)
11541 }
11542 return c.header_
11543 }
11544
11545 func (c *ProjectsLocationsVmwareAdminClustersGetCall) doRequest(alt string) (*http.Response, error) {
11546 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11547 if c.ifNoneMatch_ != "" {
11548 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11549 }
11550 c.urlParams_.Set("alt", alt)
11551 c.urlParams_.Set("prettyPrint", "false")
11552 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
11553 urls += "?" + c.urlParams_.Encode()
11554 req, err := http.NewRequest("GET", urls, nil)
11555 if err != nil {
11556 return nil, err
11557 }
11558 req.Header = reqHeaders
11559 googleapi.Expand(req.URL, map[string]string{
11560 "name": c.name,
11561 })
11562 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.get", "request", internallog.HTTPRequest(req, nil))
11563 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11564 }
11565
11566 // Do executes the "gkeonprem.projects.locations.vmwareAdminClusters.get" call.
11567 // Any non-2xx status code is an error. Response headers are in either
11568 // *VmwareAdminCluster.ServerResponse.Header or (if a response was returned at
11569 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11570 // check whether the returned error was because http.StatusNotModified was
11571 // returned.
11572 func (c *ProjectsLocationsVmwareAdminClustersGetCall) Do(opts ...googleapi.CallOption) (*VmwareAdminCluster, error) {
11573 gensupport.SetOptions(c.urlParams_, opts...)
11574 res, err := c.doRequest("json")
11575 if res != nil && res.StatusCode == http.StatusNotModified {
11576 if res.Body != nil {
11577 res.Body.Close()
11578 }
11579 return nil, gensupport.WrapError(&googleapi.Error{
11580 Code: res.StatusCode,
11581 Header: res.Header,
11582 })
11583 }
11584 if err != nil {
11585 return nil, err
11586 }
11587 defer googleapi.CloseBody(res)
11588 if err := googleapi.CheckResponse(res); err != nil {
11589 return nil, gensupport.WrapError(err)
11590 }
11591 ret := &VmwareAdminCluster{
11592 ServerResponse: googleapi.ServerResponse{
11593 Header: res.Header,
11594 HTTPStatusCode: res.StatusCode,
11595 },
11596 }
11597 target := &ret
11598 b, err := gensupport.DecodeResponseBytes(target, res)
11599 if err != nil {
11600 return nil, err
11601 }
11602 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.get", "response", internallog.HTTPResponse(res, b))
11603 return ret, nil
11604 }
11605
11606 type ProjectsLocationsVmwareAdminClustersGetIamPolicyCall struct {
11607 s *Service
11608 resource string
11609 urlParams_ gensupport.URLParams
11610 ifNoneMatch_ string
11611 ctx_ context.Context
11612 header_ http.Header
11613 }
11614
11615 // GetIamPolicy: Gets the access control policy for a resource. Returns an
11616 // empty policy if the resource exists and does not have a policy set.
11617 //
11618 // - resource: REQUIRED: The resource for which the policy is being requested.
11619 // See Resource names (https://cloud.google.com/apis/design/resource_names)
11620 // for the appropriate value for this field.
11621 func (r *ProjectsLocationsVmwareAdminClustersService) GetIamPolicy(resource string) *ProjectsLocationsVmwareAdminClustersGetIamPolicyCall {
11622 c := &ProjectsLocationsVmwareAdminClustersGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11623 c.resource = resource
11624 return c
11625 }
11626
11627 // OptionsRequestedPolicyVersion sets the optional parameter
11628 // "options.requestedPolicyVersion": The maximum policy version that will be
11629 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
11630 // an invalid value will be rejected. Requests for policies with any
11631 // conditional role bindings must specify version 3. Policies with no
11632 // conditional role bindings may specify any valid value or leave the field
11633 // unset. The policy in the response might use the policy version that you
11634 // specified, or it might use a lower policy version. For example, if you
11635 // specify version 3, but the policy has no conditional role bindings, the
11636 // response uses version 1. To learn which resources support conditions in
11637 // their IAM policies, see the IAM documentation
11638 // (https://cloud.google.com/iam/help/conditions/resource-policies).
11639 func (c *ProjectsLocationsVmwareAdminClustersGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsVmwareAdminClustersGetIamPolicyCall {
11640 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
11641 return c
11642 }
11643
11644 // Fields allows partial responses to be retrieved. See
11645 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11646 // details.
11647 func (c *ProjectsLocationsVmwareAdminClustersGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareAdminClustersGetIamPolicyCall {
11648 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11649 return c
11650 }
11651
11652 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11653 // object's ETag matches the given value. This is useful for getting updates
11654 // only after the object has changed since the last request.
11655 func (c *ProjectsLocationsVmwareAdminClustersGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsVmwareAdminClustersGetIamPolicyCall {
11656 c.ifNoneMatch_ = entityTag
11657 return c
11658 }
11659
11660 // Context sets the context to be used in this call's Do method.
11661 func (c *ProjectsLocationsVmwareAdminClustersGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsVmwareAdminClustersGetIamPolicyCall {
11662 c.ctx_ = ctx
11663 return c
11664 }
11665
11666 // Header returns a http.Header that can be modified by the caller to add
11667 // headers to the request.
11668 func (c *ProjectsLocationsVmwareAdminClustersGetIamPolicyCall) Header() http.Header {
11669 if c.header_ == nil {
11670 c.header_ = make(http.Header)
11671 }
11672 return c.header_
11673 }
11674
11675 func (c *ProjectsLocationsVmwareAdminClustersGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
11676 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11677 if c.ifNoneMatch_ != "" {
11678 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11679 }
11680 c.urlParams_.Set("alt", alt)
11681 c.urlParams_.Set("prettyPrint", "false")
11682 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
11683 urls += "?" + c.urlParams_.Encode()
11684 req, err := http.NewRequest("GET", urls, nil)
11685 if err != nil {
11686 return nil, err
11687 }
11688 req.Header = reqHeaders
11689 googleapi.Expand(req.URL, map[string]string{
11690 "resource": c.resource,
11691 })
11692 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
11693 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11694 }
11695
11696 // Do executes the "gkeonprem.projects.locations.vmwareAdminClusters.getIamPolicy" call.
11697 // Any non-2xx status code is an error. Response headers are in either
11698 // *Policy.ServerResponse.Header or (if a response was returned at all) in
11699 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11700 // whether the returned error was because http.StatusNotModified was returned.
11701 func (c *ProjectsLocationsVmwareAdminClustersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
11702 gensupport.SetOptions(c.urlParams_, opts...)
11703 res, err := c.doRequest("json")
11704 if res != nil && res.StatusCode == http.StatusNotModified {
11705 if res.Body != nil {
11706 res.Body.Close()
11707 }
11708 return nil, gensupport.WrapError(&googleapi.Error{
11709 Code: res.StatusCode,
11710 Header: res.Header,
11711 })
11712 }
11713 if err != nil {
11714 return nil, err
11715 }
11716 defer googleapi.CloseBody(res)
11717 if err := googleapi.CheckResponse(res); err != nil {
11718 return nil, gensupport.WrapError(err)
11719 }
11720 ret := &Policy{
11721 ServerResponse: googleapi.ServerResponse{
11722 Header: res.Header,
11723 HTTPStatusCode: res.StatusCode,
11724 },
11725 }
11726 target := &ret
11727 b, err := gensupport.DecodeResponseBytes(target, res)
11728 if err != nil {
11729 return nil, err
11730 }
11731 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.getIamPolicy", "response", internallog.HTTPResponse(res, b))
11732 return ret, nil
11733 }
11734
11735 type ProjectsLocationsVmwareAdminClustersListCall struct {
11736 s *Service
11737 parent string
11738 urlParams_ gensupport.URLParams
11739 ifNoneMatch_ string
11740 ctx_ context.Context
11741 header_ http.Header
11742 }
11743
11744 // List: Lists VMware admin clusters in a given project and location.
11745 //
11746 // - parent: The parent of the project and location where the clusters are
11747 // listed in. Format: "projects/{project}/locations/{location}".
11748 func (r *ProjectsLocationsVmwareAdminClustersService) List(parent string) *ProjectsLocationsVmwareAdminClustersListCall {
11749 c := &ProjectsLocationsVmwareAdminClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11750 c.parent = parent
11751 return c
11752 }
11753
11754 // AllowMissing sets the optional parameter "allowMissing": If true, return
11755 // list of Vmware Admin Clusters including the ones that only exists in RMS.
11756 func (c *ProjectsLocationsVmwareAdminClustersListCall) AllowMissing(allowMissing bool) *ProjectsLocationsVmwareAdminClustersListCall {
11757 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
11758 return c
11759 }
11760
11761 // PageSize sets the optional parameter "pageSize": Requested page size. Server
11762 // may return fewer items than requested. If unspecified, at most 50 clusters
11763 // will be returned. The maximum value is 1000; values above 1000 will be
11764 // coerced to 1000.
11765 func (c *ProjectsLocationsVmwareAdminClustersListCall) PageSize(pageSize int64) *ProjectsLocationsVmwareAdminClustersListCall {
11766 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11767 return c
11768 }
11769
11770 // PageToken sets the optional parameter "pageToken": A token identifying a
11771 // page of results the server should return.
11772 func (c *ProjectsLocationsVmwareAdminClustersListCall) PageToken(pageToken string) *ProjectsLocationsVmwareAdminClustersListCall {
11773 c.urlParams_.Set("pageToken", pageToken)
11774 return c
11775 }
11776
11777 // View sets the optional parameter "view": View for VMware admin clusters.
11778 // When `BASIC` is specified, only the admin cluster resource name and
11779 // membership are returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED`
11780 // is the same as `FULL', which returns the complete admin cluster
11781 // configuration details.
11782 //
11783 // Possible values:
11784 //
11785 // "CLUSTER_VIEW_UNSPECIFIED" - If the value is not set, the default `FULL`
11786 //
11787 // view is used.
11788 //
11789 // "BASIC" - Includes basic information of a admin cluster resource including
11790 //
11791 // admin cluster resource name and membership.
11792 //
11793 // "FULL" - Includes the complete configuration for bare metal admin cluster
11794 //
11795 // resource. This is the default value for ListVmwareAdminClustersRequest
11796 // method.
11797 func (c *ProjectsLocationsVmwareAdminClustersListCall) View(view string) *ProjectsLocationsVmwareAdminClustersListCall {
11798 c.urlParams_.Set("view", view)
11799 return c
11800 }
11801
11802 // Fields allows partial responses to be retrieved. See
11803 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11804 // details.
11805 func (c *ProjectsLocationsVmwareAdminClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareAdminClustersListCall {
11806 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11807 return c
11808 }
11809
11810 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11811 // object's ETag matches the given value. This is useful for getting updates
11812 // only after the object has changed since the last request.
11813 func (c *ProjectsLocationsVmwareAdminClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVmwareAdminClustersListCall {
11814 c.ifNoneMatch_ = entityTag
11815 return c
11816 }
11817
11818 // Context sets the context to be used in this call's Do method.
11819 func (c *ProjectsLocationsVmwareAdminClustersListCall) Context(ctx context.Context) *ProjectsLocationsVmwareAdminClustersListCall {
11820 c.ctx_ = ctx
11821 return c
11822 }
11823
11824 // Header returns a http.Header that can be modified by the caller to add
11825 // headers to the request.
11826 func (c *ProjectsLocationsVmwareAdminClustersListCall) Header() http.Header {
11827 if c.header_ == nil {
11828 c.header_ = make(http.Header)
11829 }
11830 return c.header_
11831 }
11832
11833 func (c *ProjectsLocationsVmwareAdminClustersListCall) doRequest(alt string) (*http.Response, error) {
11834 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11835 if c.ifNoneMatch_ != "" {
11836 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11837 }
11838 c.urlParams_.Set("alt", alt)
11839 c.urlParams_.Set("prettyPrint", "false")
11840 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/vmwareAdminClusters")
11841 urls += "?" + c.urlParams_.Encode()
11842 req, err := http.NewRequest("GET", urls, nil)
11843 if err != nil {
11844 return nil, err
11845 }
11846 req.Header = reqHeaders
11847 googleapi.Expand(req.URL, map[string]string{
11848 "parent": c.parent,
11849 })
11850 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.list", "request", internallog.HTTPRequest(req, nil))
11851 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11852 }
11853
11854 // Do executes the "gkeonprem.projects.locations.vmwareAdminClusters.list" call.
11855 // Any non-2xx status code is an error. Response headers are in either
11856 // *ListVmwareAdminClustersResponse.ServerResponse.Header or (if a response was
11857 // returned at all) in error.(*googleapi.Error).Header. Use
11858 // googleapi.IsNotModified to check whether the returned error was because
11859 // http.StatusNotModified was returned.
11860 func (c *ProjectsLocationsVmwareAdminClustersListCall) Do(opts ...googleapi.CallOption) (*ListVmwareAdminClustersResponse, error) {
11861 gensupport.SetOptions(c.urlParams_, opts...)
11862 res, err := c.doRequest("json")
11863 if res != nil && res.StatusCode == http.StatusNotModified {
11864 if res.Body != nil {
11865 res.Body.Close()
11866 }
11867 return nil, gensupport.WrapError(&googleapi.Error{
11868 Code: res.StatusCode,
11869 Header: res.Header,
11870 })
11871 }
11872 if err != nil {
11873 return nil, err
11874 }
11875 defer googleapi.CloseBody(res)
11876 if err := googleapi.CheckResponse(res); err != nil {
11877 return nil, gensupport.WrapError(err)
11878 }
11879 ret := &ListVmwareAdminClustersResponse{
11880 ServerResponse: googleapi.ServerResponse{
11881 Header: res.Header,
11882 HTTPStatusCode: res.StatusCode,
11883 },
11884 }
11885 target := &ret
11886 b, err := gensupport.DecodeResponseBytes(target, res)
11887 if err != nil {
11888 return nil, err
11889 }
11890 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.list", "response", internallog.HTTPResponse(res, b))
11891 return ret, nil
11892 }
11893
11894 // Pages invokes f for each page of results.
11895 // A non-nil error returned from f will halt the iteration.
11896 // The provided context supersedes any context provided to the Context method.
11897 func (c *ProjectsLocationsVmwareAdminClustersListCall) Pages(ctx context.Context, f func(*ListVmwareAdminClustersResponse) error) error {
11898 c.ctx_ = ctx
11899 defer c.PageToken(c.urlParams_.Get("pageToken"))
11900 for {
11901 x, err := c.Do()
11902 if err != nil {
11903 return err
11904 }
11905 if err := f(x); err != nil {
11906 return err
11907 }
11908 if x.NextPageToken == "" {
11909 return nil
11910 }
11911 c.PageToken(x.NextPageToken)
11912 }
11913 }
11914
11915 type ProjectsLocationsVmwareAdminClustersPatchCall struct {
11916 s *Service
11917 name string
11918 vmwareadmincluster *VmwareAdminCluster
11919 urlParams_ gensupport.URLParams
11920 ctx_ context.Context
11921 header_ http.Header
11922 }
11923
11924 // Patch: Updates the parameters of a single VMware admin cluster.
11925 //
11926 // - name: Immutable. The VMware admin cluster resource name.
11927 func (r *ProjectsLocationsVmwareAdminClustersService) Patch(name string, vmwareadmincluster *VmwareAdminCluster) *ProjectsLocationsVmwareAdminClustersPatchCall {
11928 c := &ProjectsLocationsVmwareAdminClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11929 c.name = name
11930 c.vmwareadmincluster = vmwareadmincluster
11931 return c
11932 }
11933
11934 // SkipValidations sets the optional parameter "skipValidations": If set, the
11935 // server-side preflight checks will be skipped.
11936 func (c *ProjectsLocationsVmwareAdminClustersPatchCall) SkipValidations(skipValidations ...string) *ProjectsLocationsVmwareAdminClustersPatchCall {
11937 c.urlParams_.SetMulti("skipValidations", append([]string{}, skipValidations...))
11938 return c
11939 }
11940
11941 // UpdateMask sets the optional parameter "updateMask": Required. Field mask is
11942 // used to specify the fields to be overwritten in the VMwareAdminCluster
11943 // resource by the update. The fields specified in the update_mask are relative
11944 // to the resource, not the full request. A field will be overwritten if it is
11945 // in the mask. If the user does not provide a mask then all populated fields
11946 // in the VmwareAdminCluster message will be updated. Empty fields will be
11947 // ignored unless a field mask is used.
11948 func (c *ProjectsLocationsVmwareAdminClustersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsVmwareAdminClustersPatchCall {
11949 c.urlParams_.Set("updateMask", updateMask)
11950 return c
11951 }
11952
11953 // ValidateOnly sets the optional parameter "validateOnly": Validate the
11954 // request without actually doing any updates.
11955 func (c *ProjectsLocationsVmwareAdminClustersPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsVmwareAdminClustersPatchCall {
11956 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
11957 return c
11958 }
11959
11960 // Fields allows partial responses to be retrieved. See
11961 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11962 // details.
11963 func (c *ProjectsLocationsVmwareAdminClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareAdminClustersPatchCall {
11964 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11965 return c
11966 }
11967
11968 // Context sets the context to be used in this call's Do method.
11969 func (c *ProjectsLocationsVmwareAdminClustersPatchCall) Context(ctx context.Context) *ProjectsLocationsVmwareAdminClustersPatchCall {
11970 c.ctx_ = ctx
11971 return c
11972 }
11973
11974 // Header returns a http.Header that can be modified by the caller to add
11975 // headers to the request.
11976 func (c *ProjectsLocationsVmwareAdminClustersPatchCall) Header() http.Header {
11977 if c.header_ == nil {
11978 c.header_ = make(http.Header)
11979 }
11980 return c.header_
11981 }
11982
11983 func (c *ProjectsLocationsVmwareAdminClustersPatchCall) doRequest(alt string) (*http.Response, error) {
11984 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11985 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.vmwareadmincluster)
11986 if err != nil {
11987 return nil, err
11988 }
11989 c.urlParams_.Set("alt", alt)
11990 c.urlParams_.Set("prettyPrint", "false")
11991 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
11992 urls += "?" + c.urlParams_.Encode()
11993 req, err := http.NewRequest("PATCH", urls, body)
11994 if err != nil {
11995 return nil, err
11996 }
11997 req.Header = reqHeaders
11998 googleapi.Expand(req.URL, map[string]string{
11999 "name": c.name,
12000 })
12001 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
12002 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12003 }
12004
12005 // Do executes the "gkeonprem.projects.locations.vmwareAdminClusters.patch" call.
12006 // Any non-2xx status code is an error. Response headers are in either
12007 // *Operation.ServerResponse.Header or (if a response was returned at all) in
12008 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12009 // whether the returned error was because http.StatusNotModified was returned.
12010 func (c *ProjectsLocationsVmwareAdminClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12011 gensupport.SetOptions(c.urlParams_, opts...)
12012 res, err := c.doRequest("json")
12013 if res != nil && res.StatusCode == http.StatusNotModified {
12014 if res.Body != nil {
12015 res.Body.Close()
12016 }
12017 return nil, gensupport.WrapError(&googleapi.Error{
12018 Code: res.StatusCode,
12019 Header: res.Header,
12020 })
12021 }
12022 if err != nil {
12023 return nil, err
12024 }
12025 defer googleapi.CloseBody(res)
12026 if err := googleapi.CheckResponse(res); err != nil {
12027 return nil, gensupport.WrapError(err)
12028 }
12029 ret := &Operation{
12030 ServerResponse: googleapi.ServerResponse{
12031 Header: res.Header,
12032 HTTPStatusCode: res.StatusCode,
12033 },
12034 }
12035 target := &ret
12036 b, err := gensupport.DecodeResponseBytes(target, res)
12037 if err != nil {
12038 return nil, err
12039 }
12040 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.patch", "response", internallog.HTTPResponse(res, b))
12041 return ret, nil
12042 }
12043
12044 type ProjectsLocationsVmwareAdminClustersSetIamPolicyCall struct {
12045 s *Service
12046 resource string
12047 setiampolicyrequest *SetIamPolicyRequest
12048 urlParams_ gensupport.URLParams
12049 ctx_ context.Context
12050 header_ http.Header
12051 }
12052
12053 // SetIamPolicy: Sets the access control policy on the specified resource.
12054 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
12055 // and `PERMISSION_DENIED` errors.
12056 //
12057 // - resource: REQUIRED: The resource for which the policy is being specified.
12058 // See Resource names (https://cloud.google.com/apis/design/resource_names)
12059 // for the appropriate value for this field.
12060 func (r *ProjectsLocationsVmwareAdminClustersService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsVmwareAdminClustersSetIamPolicyCall {
12061 c := &ProjectsLocationsVmwareAdminClustersSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12062 c.resource = resource
12063 c.setiampolicyrequest = setiampolicyrequest
12064 return c
12065 }
12066
12067 // Fields allows partial responses to be retrieved. See
12068 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12069 // details.
12070 func (c *ProjectsLocationsVmwareAdminClustersSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareAdminClustersSetIamPolicyCall {
12071 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12072 return c
12073 }
12074
12075 // Context sets the context to be used in this call's Do method.
12076 func (c *ProjectsLocationsVmwareAdminClustersSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsVmwareAdminClustersSetIamPolicyCall {
12077 c.ctx_ = ctx
12078 return c
12079 }
12080
12081 // Header returns a http.Header that can be modified by the caller to add
12082 // headers to the request.
12083 func (c *ProjectsLocationsVmwareAdminClustersSetIamPolicyCall) Header() http.Header {
12084 if c.header_ == nil {
12085 c.header_ = make(http.Header)
12086 }
12087 return c.header_
12088 }
12089
12090 func (c *ProjectsLocationsVmwareAdminClustersSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
12091 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12092 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
12093 if err != nil {
12094 return nil, err
12095 }
12096 c.urlParams_.Set("alt", alt)
12097 c.urlParams_.Set("prettyPrint", "false")
12098 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
12099 urls += "?" + c.urlParams_.Encode()
12100 req, err := http.NewRequest("POST", urls, body)
12101 if err != nil {
12102 return nil, err
12103 }
12104 req.Header = reqHeaders
12105 googleapi.Expand(req.URL, map[string]string{
12106 "resource": c.resource,
12107 })
12108 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
12109 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12110 }
12111
12112 // Do executes the "gkeonprem.projects.locations.vmwareAdminClusters.setIamPolicy" call.
12113 // Any non-2xx status code is an error. Response headers are in either
12114 // *Policy.ServerResponse.Header or (if a response was returned at all) in
12115 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12116 // whether the returned error was because http.StatusNotModified was returned.
12117 func (c *ProjectsLocationsVmwareAdminClustersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
12118 gensupport.SetOptions(c.urlParams_, opts...)
12119 res, err := c.doRequest("json")
12120 if res != nil && res.StatusCode == http.StatusNotModified {
12121 if res.Body != nil {
12122 res.Body.Close()
12123 }
12124 return nil, gensupport.WrapError(&googleapi.Error{
12125 Code: res.StatusCode,
12126 Header: res.Header,
12127 })
12128 }
12129 if err != nil {
12130 return nil, err
12131 }
12132 defer googleapi.CloseBody(res)
12133 if err := googleapi.CheckResponse(res); err != nil {
12134 return nil, gensupport.WrapError(err)
12135 }
12136 ret := &Policy{
12137 ServerResponse: googleapi.ServerResponse{
12138 Header: res.Header,
12139 HTTPStatusCode: res.StatusCode,
12140 },
12141 }
12142 target := &ret
12143 b, err := gensupport.DecodeResponseBytes(target, res)
12144 if err != nil {
12145 return nil, err
12146 }
12147 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.setIamPolicy", "response", internallog.HTTPResponse(res, b))
12148 return ret, nil
12149 }
12150
12151 type ProjectsLocationsVmwareAdminClustersTestIamPermissionsCall struct {
12152 s *Service
12153 resource string
12154 testiampermissionsrequest *TestIamPermissionsRequest
12155 urlParams_ gensupport.URLParams
12156 ctx_ context.Context
12157 header_ http.Header
12158 }
12159
12160 // TestIamPermissions: Returns permissions that a caller has on the specified
12161 // resource. If the resource does not exist, this will return an empty set of
12162 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
12163 // used for building permission-aware UIs and command-line tools, not for
12164 // authorization checking. This operation may "fail open" without warning.
12165 //
12166 // - resource: REQUIRED: The resource for which the policy detail is being
12167 // requested. See Resource names
12168 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
12169 // value for this field.
12170 func (r *ProjectsLocationsVmwareAdminClustersService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsVmwareAdminClustersTestIamPermissionsCall {
12171 c := &ProjectsLocationsVmwareAdminClustersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12172 c.resource = resource
12173 c.testiampermissionsrequest = testiampermissionsrequest
12174 return c
12175 }
12176
12177 // Fields allows partial responses to be retrieved. See
12178 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12179 // details.
12180 func (c *ProjectsLocationsVmwareAdminClustersTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareAdminClustersTestIamPermissionsCall {
12181 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12182 return c
12183 }
12184
12185 // Context sets the context to be used in this call's Do method.
12186 func (c *ProjectsLocationsVmwareAdminClustersTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsVmwareAdminClustersTestIamPermissionsCall {
12187 c.ctx_ = ctx
12188 return c
12189 }
12190
12191 // Header returns a http.Header that can be modified by the caller to add
12192 // headers to the request.
12193 func (c *ProjectsLocationsVmwareAdminClustersTestIamPermissionsCall) Header() http.Header {
12194 if c.header_ == nil {
12195 c.header_ = make(http.Header)
12196 }
12197 return c.header_
12198 }
12199
12200 func (c *ProjectsLocationsVmwareAdminClustersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
12201 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12202 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
12203 if err != nil {
12204 return nil, err
12205 }
12206 c.urlParams_.Set("alt", alt)
12207 c.urlParams_.Set("prettyPrint", "false")
12208 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
12209 urls += "?" + c.urlParams_.Encode()
12210 req, err := http.NewRequest("POST", urls, body)
12211 if err != nil {
12212 return nil, err
12213 }
12214 req.Header = reqHeaders
12215 googleapi.Expand(req.URL, map[string]string{
12216 "resource": c.resource,
12217 })
12218 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
12219 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12220 }
12221
12222 // Do executes the "gkeonprem.projects.locations.vmwareAdminClusters.testIamPermissions" call.
12223 // Any non-2xx status code is an error. Response headers are in either
12224 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
12225 // returned at all) in error.(*googleapi.Error).Header. Use
12226 // googleapi.IsNotModified to check whether the returned error was because
12227 // http.StatusNotModified was returned.
12228 func (c *ProjectsLocationsVmwareAdminClustersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
12229 gensupport.SetOptions(c.urlParams_, opts...)
12230 res, err := c.doRequest("json")
12231 if res != nil && res.StatusCode == http.StatusNotModified {
12232 if res.Body != nil {
12233 res.Body.Close()
12234 }
12235 return nil, gensupport.WrapError(&googleapi.Error{
12236 Code: res.StatusCode,
12237 Header: res.Header,
12238 })
12239 }
12240 if err != nil {
12241 return nil, err
12242 }
12243 defer googleapi.CloseBody(res)
12244 if err := googleapi.CheckResponse(res); err != nil {
12245 return nil, gensupport.WrapError(err)
12246 }
12247 ret := &TestIamPermissionsResponse{
12248 ServerResponse: googleapi.ServerResponse{
12249 Header: res.Header,
12250 HTTPStatusCode: res.StatusCode,
12251 },
12252 }
12253 target := &ret
12254 b, err := gensupport.DecodeResponseBytes(target, res)
12255 if err != nil {
12256 return nil, err
12257 }
12258 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.testIamPermissions", "response", internallog.HTTPResponse(res, b))
12259 return ret, nil
12260 }
12261
12262 type ProjectsLocationsVmwareAdminClustersUnenrollCall struct {
12263 s *Service
12264 name string
12265 urlParams_ gensupport.URLParams
12266 ctx_ context.Context
12267 header_ http.Header
12268 }
12269
12270 // Unenroll: Unenrolls an existing VMware admin cluster from the Anthos On-Prem
12271 // API within a given project and location. Unenrollment removes the Cloud
12272 // reference to the cluster without modifying the underlying OnPrem Resources.
12273 // Clusters will continue to run; however, they will no longer be accessible
12274 // through the Anthos On-Prem API or its clients.
12275 //
12276 // - name: Name of the VMware admin cluster to be unenrolled. Format:
12277 // "projects/{project}/locations/{location}/vmwareAdminClusters/{cluster}".
12278 func (r *ProjectsLocationsVmwareAdminClustersService) Unenroll(name string) *ProjectsLocationsVmwareAdminClustersUnenrollCall {
12279 c := &ProjectsLocationsVmwareAdminClustersUnenrollCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12280 c.name = name
12281 return c
12282 }
12283
12284 // AllowMissing sets the optional parameter "allowMissing": If set to true, and
12285 // the VMware admin cluster is not found, the request will succeed but no
12286 // action will be taken on the server and return a completed LRO.
12287 func (c *ProjectsLocationsVmwareAdminClustersUnenrollCall) AllowMissing(allowMissing bool) *ProjectsLocationsVmwareAdminClustersUnenrollCall {
12288 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
12289 return c
12290 }
12291
12292 // Etag sets the optional parameter "etag": The current etag of the VMware
12293 // admin cluster. If an etag is provided and does not match the current etag of
12294 // the cluster, deletion will be blocked and an ABORTED error will be returned.
12295 func (c *ProjectsLocationsVmwareAdminClustersUnenrollCall) Etag(etag string) *ProjectsLocationsVmwareAdminClustersUnenrollCall {
12296 c.urlParams_.Set("etag", etag)
12297 return c
12298 }
12299
12300 // IgnoreErrors sets the optional parameter "ignoreErrors": If set to true, the
12301 // unenrollment of a vmware admin cluster resource will succeed even if errors
12302 // occur during unenrollment. This parameter can be used when you want to
12303 // unenroll admin cluster resource and the on-prem admin cluster is
12304 // disconnected / unreachable. WARNING: Using this parameter when your admin
12305 // cluster still exists may result in a deleted GCP admin cluster but existing
12306 // resourcelink in on-prem admin cluster and membership.
12307 func (c *ProjectsLocationsVmwareAdminClustersUnenrollCall) IgnoreErrors(ignoreErrors bool) *ProjectsLocationsVmwareAdminClustersUnenrollCall {
12308 c.urlParams_.Set("ignoreErrors", fmt.Sprint(ignoreErrors))
12309 return c
12310 }
12311
12312 // ValidateOnly sets the optional parameter "validateOnly": Validate the
12313 // request without actually doing any updates.
12314 func (c *ProjectsLocationsVmwareAdminClustersUnenrollCall) ValidateOnly(validateOnly bool) *ProjectsLocationsVmwareAdminClustersUnenrollCall {
12315 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
12316 return c
12317 }
12318
12319 // Fields allows partial responses to be retrieved. See
12320 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12321 // details.
12322 func (c *ProjectsLocationsVmwareAdminClustersUnenrollCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareAdminClustersUnenrollCall {
12323 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12324 return c
12325 }
12326
12327 // Context sets the context to be used in this call's Do method.
12328 func (c *ProjectsLocationsVmwareAdminClustersUnenrollCall) Context(ctx context.Context) *ProjectsLocationsVmwareAdminClustersUnenrollCall {
12329 c.ctx_ = ctx
12330 return c
12331 }
12332
12333 // Header returns a http.Header that can be modified by the caller to add
12334 // headers to the request.
12335 func (c *ProjectsLocationsVmwareAdminClustersUnenrollCall) Header() http.Header {
12336 if c.header_ == nil {
12337 c.header_ = make(http.Header)
12338 }
12339 return c.header_
12340 }
12341
12342 func (c *ProjectsLocationsVmwareAdminClustersUnenrollCall) doRequest(alt string) (*http.Response, error) {
12343 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12344 c.urlParams_.Set("alt", alt)
12345 c.urlParams_.Set("prettyPrint", "false")
12346 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:unenroll")
12347 urls += "?" + c.urlParams_.Encode()
12348 req, err := http.NewRequest("DELETE", urls, nil)
12349 if err != nil {
12350 return nil, err
12351 }
12352 req.Header = reqHeaders
12353 googleapi.Expand(req.URL, map[string]string{
12354 "name": c.name,
12355 })
12356 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.unenroll", "request", internallog.HTTPRequest(req, nil))
12357 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12358 }
12359
12360 // Do executes the "gkeonprem.projects.locations.vmwareAdminClusters.unenroll" call.
12361 // Any non-2xx status code is an error. Response headers are in either
12362 // *Operation.ServerResponse.Header or (if a response was returned at all) in
12363 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12364 // whether the returned error was because http.StatusNotModified was returned.
12365 func (c *ProjectsLocationsVmwareAdminClustersUnenrollCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12366 gensupport.SetOptions(c.urlParams_, opts...)
12367 res, err := c.doRequest("json")
12368 if res != nil && res.StatusCode == http.StatusNotModified {
12369 if res.Body != nil {
12370 res.Body.Close()
12371 }
12372 return nil, gensupport.WrapError(&googleapi.Error{
12373 Code: res.StatusCode,
12374 Header: res.Header,
12375 })
12376 }
12377 if err != nil {
12378 return nil, err
12379 }
12380 defer googleapi.CloseBody(res)
12381 if err := googleapi.CheckResponse(res); err != nil {
12382 return nil, gensupport.WrapError(err)
12383 }
12384 ret := &Operation{
12385 ServerResponse: googleapi.ServerResponse{
12386 Header: res.Header,
12387 HTTPStatusCode: res.StatusCode,
12388 },
12389 }
12390 target := &ret
12391 b, err := gensupport.DecodeResponseBytes(target, res)
12392 if err != nil {
12393 return nil, err
12394 }
12395 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.unenroll", "response", internallog.HTTPResponse(res, b))
12396 return ret, nil
12397 }
12398
12399 type ProjectsLocationsVmwareAdminClustersOperationsGetCall struct {
12400 s *Service
12401 name string
12402 urlParams_ gensupport.URLParams
12403 ifNoneMatch_ string
12404 ctx_ context.Context
12405 header_ http.Header
12406 }
12407
12408 // Get: Gets the latest state of a long-running operation. Clients can use this
12409 // method to poll the operation result at intervals as recommended by the API
12410 // service.
12411 //
12412 // - name: The name of the operation resource.
12413 func (r *ProjectsLocationsVmwareAdminClustersOperationsService) Get(name string) *ProjectsLocationsVmwareAdminClustersOperationsGetCall {
12414 c := &ProjectsLocationsVmwareAdminClustersOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12415 c.name = name
12416 return c
12417 }
12418
12419 // Fields allows partial responses to be retrieved. See
12420 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12421 // details.
12422 func (c *ProjectsLocationsVmwareAdminClustersOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareAdminClustersOperationsGetCall {
12423 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12424 return c
12425 }
12426
12427 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12428 // object's ETag matches the given value. This is useful for getting updates
12429 // only after the object has changed since the last request.
12430 func (c *ProjectsLocationsVmwareAdminClustersOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVmwareAdminClustersOperationsGetCall {
12431 c.ifNoneMatch_ = entityTag
12432 return c
12433 }
12434
12435 // Context sets the context to be used in this call's Do method.
12436 func (c *ProjectsLocationsVmwareAdminClustersOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsVmwareAdminClustersOperationsGetCall {
12437 c.ctx_ = ctx
12438 return c
12439 }
12440
12441 // Header returns a http.Header that can be modified by the caller to add
12442 // headers to the request.
12443 func (c *ProjectsLocationsVmwareAdminClustersOperationsGetCall) Header() http.Header {
12444 if c.header_ == nil {
12445 c.header_ = make(http.Header)
12446 }
12447 return c.header_
12448 }
12449
12450 func (c *ProjectsLocationsVmwareAdminClustersOperationsGetCall) doRequest(alt string) (*http.Response, error) {
12451 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12452 if c.ifNoneMatch_ != "" {
12453 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12454 }
12455 c.urlParams_.Set("alt", alt)
12456 c.urlParams_.Set("prettyPrint", "false")
12457 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
12458 urls += "?" + c.urlParams_.Encode()
12459 req, err := http.NewRequest("GET", urls, nil)
12460 if err != nil {
12461 return nil, err
12462 }
12463 req.Header = reqHeaders
12464 googleapi.Expand(req.URL, map[string]string{
12465 "name": c.name,
12466 })
12467 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.operations.get", "request", internallog.HTTPRequest(req, nil))
12468 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12469 }
12470
12471 // Do executes the "gkeonprem.projects.locations.vmwareAdminClusters.operations.get" call.
12472 // Any non-2xx status code is an error. Response headers are in either
12473 // *Operation.ServerResponse.Header or (if a response was returned at all) in
12474 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12475 // whether the returned error was because http.StatusNotModified was returned.
12476 func (c *ProjectsLocationsVmwareAdminClustersOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12477 gensupport.SetOptions(c.urlParams_, opts...)
12478 res, err := c.doRequest("json")
12479 if res != nil && res.StatusCode == http.StatusNotModified {
12480 if res.Body != nil {
12481 res.Body.Close()
12482 }
12483 return nil, gensupport.WrapError(&googleapi.Error{
12484 Code: res.StatusCode,
12485 Header: res.Header,
12486 })
12487 }
12488 if err != nil {
12489 return nil, err
12490 }
12491 defer googleapi.CloseBody(res)
12492 if err := googleapi.CheckResponse(res); err != nil {
12493 return nil, gensupport.WrapError(err)
12494 }
12495 ret := &Operation{
12496 ServerResponse: googleapi.ServerResponse{
12497 Header: res.Header,
12498 HTTPStatusCode: res.StatusCode,
12499 },
12500 }
12501 target := &ret
12502 b, err := gensupport.DecodeResponseBytes(target, res)
12503 if err != nil {
12504 return nil, err
12505 }
12506 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.operations.get", "response", internallog.HTTPResponse(res, b))
12507 return ret, nil
12508 }
12509
12510 type ProjectsLocationsVmwareAdminClustersOperationsListCall struct {
12511 s *Service
12512 name string
12513 urlParams_ gensupport.URLParams
12514 ifNoneMatch_ string
12515 ctx_ context.Context
12516 header_ http.Header
12517 }
12518
12519 // List: Lists operations that match the specified filter in the request. If
12520 // the server doesn't support this method, it returns `UNIMPLEMENTED`.
12521 //
12522 // - name: The name of the operation's parent resource.
12523 func (r *ProjectsLocationsVmwareAdminClustersOperationsService) List(name string) *ProjectsLocationsVmwareAdminClustersOperationsListCall {
12524 c := &ProjectsLocationsVmwareAdminClustersOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12525 c.name = name
12526 return c
12527 }
12528
12529 // Filter sets the optional parameter "filter": The standard list filter.
12530 func (c *ProjectsLocationsVmwareAdminClustersOperationsListCall) Filter(filter string) *ProjectsLocationsVmwareAdminClustersOperationsListCall {
12531 c.urlParams_.Set("filter", filter)
12532 return c
12533 }
12534
12535 // PageSize sets the optional parameter "pageSize": The standard list page
12536 // size.
12537 func (c *ProjectsLocationsVmwareAdminClustersOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsVmwareAdminClustersOperationsListCall {
12538 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12539 return c
12540 }
12541
12542 // PageToken sets the optional parameter "pageToken": The standard list page
12543 // token.
12544 func (c *ProjectsLocationsVmwareAdminClustersOperationsListCall) PageToken(pageToken string) *ProjectsLocationsVmwareAdminClustersOperationsListCall {
12545 c.urlParams_.Set("pageToken", pageToken)
12546 return c
12547 }
12548
12549 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess":
12550 // When set to `true`, operations that are reachable are returned as normal,
12551 // and those that are unreachable are returned in the
12552 // ListOperationsResponse.unreachable field. This can only be `true` when
12553 // reading across collections. For example, when `parent` is set to
12554 // "projects/example/locations/-". This field is not supported by default and
12555 // will result in an `UNIMPLEMENTED` error if set unless explicitly documented
12556 // otherwise in service or product specific documentation.
12557 func (c *ProjectsLocationsVmwareAdminClustersOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsVmwareAdminClustersOperationsListCall {
12558 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
12559 return c
12560 }
12561
12562 // Fields allows partial responses to be retrieved. See
12563 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12564 // details.
12565 func (c *ProjectsLocationsVmwareAdminClustersOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareAdminClustersOperationsListCall {
12566 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12567 return c
12568 }
12569
12570 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12571 // object's ETag matches the given value. This is useful for getting updates
12572 // only after the object has changed since the last request.
12573 func (c *ProjectsLocationsVmwareAdminClustersOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVmwareAdminClustersOperationsListCall {
12574 c.ifNoneMatch_ = entityTag
12575 return c
12576 }
12577
12578 // Context sets the context to be used in this call's Do method.
12579 func (c *ProjectsLocationsVmwareAdminClustersOperationsListCall) Context(ctx context.Context) *ProjectsLocationsVmwareAdminClustersOperationsListCall {
12580 c.ctx_ = ctx
12581 return c
12582 }
12583
12584 // Header returns a http.Header that can be modified by the caller to add
12585 // headers to the request.
12586 func (c *ProjectsLocationsVmwareAdminClustersOperationsListCall) Header() http.Header {
12587 if c.header_ == nil {
12588 c.header_ = make(http.Header)
12589 }
12590 return c.header_
12591 }
12592
12593 func (c *ProjectsLocationsVmwareAdminClustersOperationsListCall) doRequest(alt string) (*http.Response, error) {
12594 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12595 if c.ifNoneMatch_ != "" {
12596 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12597 }
12598 c.urlParams_.Set("alt", alt)
12599 c.urlParams_.Set("prettyPrint", "false")
12600 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
12601 urls += "?" + c.urlParams_.Encode()
12602 req, err := http.NewRequest("GET", urls, nil)
12603 if err != nil {
12604 return nil, err
12605 }
12606 req.Header = reqHeaders
12607 googleapi.Expand(req.URL, map[string]string{
12608 "name": c.name,
12609 })
12610 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.operations.list", "request", internallog.HTTPRequest(req, nil))
12611 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12612 }
12613
12614 // Do executes the "gkeonprem.projects.locations.vmwareAdminClusters.operations.list" call.
12615 // Any non-2xx status code is an error. Response headers are in either
12616 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
12617 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12618 // check whether the returned error was because http.StatusNotModified was
12619 // returned.
12620 func (c *ProjectsLocationsVmwareAdminClustersOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
12621 gensupport.SetOptions(c.urlParams_, opts...)
12622 res, err := c.doRequest("json")
12623 if res != nil && res.StatusCode == http.StatusNotModified {
12624 if res.Body != nil {
12625 res.Body.Close()
12626 }
12627 return nil, gensupport.WrapError(&googleapi.Error{
12628 Code: res.StatusCode,
12629 Header: res.Header,
12630 })
12631 }
12632 if err != nil {
12633 return nil, err
12634 }
12635 defer googleapi.CloseBody(res)
12636 if err := googleapi.CheckResponse(res); err != nil {
12637 return nil, gensupport.WrapError(err)
12638 }
12639 ret := &ListOperationsResponse{
12640 ServerResponse: googleapi.ServerResponse{
12641 Header: res.Header,
12642 HTTPStatusCode: res.StatusCode,
12643 },
12644 }
12645 target := &ret
12646 b, err := gensupport.DecodeResponseBytes(target, res)
12647 if err != nil {
12648 return nil, err
12649 }
12650 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareAdminClusters.operations.list", "response", internallog.HTTPResponse(res, b))
12651 return ret, nil
12652 }
12653
12654 // Pages invokes f for each page of results.
12655 // A non-nil error returned from f will halt the iteration.
12656 // The provided context supersedes any context provided to the Context method.
12657 func (c *ProjectsLocationsVmwareAdminClustersOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
12658 c.ctx_ = ctx
12659 defer c.PageToken(c.urlParams_.Get("pageToken"))
12660 for {
12661 x, err := c.Do()
12662 if err != nil {
12663 return err
12664 }
12665 if err := f(x); err != nil {
12666 return err
12667 }
12668 if x.NextPageToken == "" {
12669 return nil
12670 }
12671 c.PageToken(x.NextPageToken)
12672 }
12673 }
12674
12675 type ProjectsLocationsVmwareClustersCreateCall struct {
12676 s *Service
12677 parent string
12678 vmwarecluster *VmwareCluster
12679 urlParams_ gensupport.URLParams
12680 ctx_ context.Context
12681 header_ http.Header
12682 }
12683
12684 // Create: Creates a new VMware user cluster in a given project and location.
12685 //
12686 // - parent: The parent of the project and location where this cluster is
12687 // created in. Format: "projects/{project}/locations/{location}".
12688 func (r *ProjectsLocationsVmwareClustersService) Create(parent string, vmwarecluster *VmwareCluster) *ProjectsLocationsVmwareClustersCreateCall {
12689 c := &ProjectsLocationsVmwareClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12690 c.parent = parent
12691 c.vmwarecluster = vmwarecluster
12692 return c
12693 }
12694
12695 // AllowPreflightFailure sets the optional parameter "allowPreflightFailure":
12696 // If set to true, CLM will force CCFE to persist the cluster resource in RMS
12697 // when the creation fails during standalone preflight checks. In that case the
12698 // subsequent create call will fail with "cluster already exists" error and
12699 // hence a update cluster is required to fix the cluster.
12700 func (c *ProjectsLocationsVmwareClustersCreateCall) AllowPreflightFailure(allowPreflightFailure bool) *ProjectsLocationsVmwareClustersCreateCall {
12701 c.urlParams_.Set("allowPreflightFailure", fmt.Sprint(allowPreflightFailure))
12702 return c
12703 }
12704
12705 // SkipValidations sets the optional parameter "skipValidations": List of
12706 // validations to skip during cluster creation.
12707 func (c *ProjectsLocationsVmwareClustersCreateCall) SkipValidations(skipValidations ...string) *ProjectsLocationsVmwareClustersCreateCall {
12708 c.urlParams_.SetMulti("skipValidations", append([]string{}, skipValidations...))
12709 return c
12710 }
12711
12712 // ValidateOnly sets the optional parameter "validateOnly": Validate the
12713 // request without actually doing any updates.
12714 func (c *ProjectsLocationsVmwareClustersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsVmwareClustersCreateCall {
12715 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
12716 return c
12717 }
12718
12719 // VmwareClusterId sets the optional parameter "vmwareClusterId": User provided
12720 // identifier that is used as part of the resource name; This value must be up
12721 // to 40 characters and follow RFC-1123 (https://tools.ietf.org/html/rfc1123)
12722 // format.
12723 func (c *ProjectsLocationsVmwareClustersCreateCall) VmwareClusterId(vmwareClusterId string) *ProjectsLocationsVmwareClustersCreateCall {
12724 c.urlParams_.Set("vmwareClusterId", vmwareClusterId)
12725 return c
12726 }
12727
12728 // Fields allows partial responses to be retrieved. See
12729 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12730 // details.
12731 func (c *ProjectsLocationsVmwareClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersCreateCall {
12732 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12733 return c
12734 }
12735
12736 // Context sets the context to be used in this call's Do method.
12737 func (c *ProjectsLocationsVmwareClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersCreateCall {
12738 c.ctx_ = ctx
12739 return c
12740 }
12741
12742 // Header returns a http.Header that can be modified by the caller to add
12743 // headers to the request.
12744 func (c *ProjectsLocationsVmwareClustersCreateCall) Header() http.Header {
12745 if c.header_ == nil {
12746 c.header_ = make(http.Header)
12747 }
12748 return c.header_
12749 }
12750
12751 func (c *ProjectsLocationsVmwareClustersCreateCall) doRequest(alt string) (*http.Response, error) {
12752 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12753 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.vmwarecluster)
12754 if err != nil {
12755 return nil, err
12756 }
12757 c.urlParams_.Set("alt", alt)
12758 c.urlParams_.Set("prettyPrint", "false")
12759 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/vmwareClusters")
12760 urls += "?" + c.urlParams_.Encode()
12761 req, err := http.NewRequest("POST", urls, body)
12762 if err != nil {
12763 return nil, err
12764 }
12765 req.Header = reqHeaders
12766 googleapi.Expand(req.URL, map[string]string{
12767 "parent": c.parent,
12768 })
12769 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.create", "request", internallog.HTTPRequest(req, body.Bytes()))
12770 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12771 }
12772
12773 // Do executes the "gkeonprem.projects.locations.vmwareClusters.create" call.
12774 // Any non-2xx status code is an error. Response headers are in either
12775 // *Operation.ServerResponse.Header or (if a response was returned at all) in
12776 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12777 // whether the returned error was because http.StatusNotModified was returned.
12778 func (c *ProjectsLocationsVmwareClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12779 gensupport.SetOptions(c.urlParams_, opts...)
12780 res, err := c.doRequest("json")
12781 if res != nil && res.StatusCode == http.StatusNotModified {
12782 if res.Body != nil {
12783 res.Body.Close()
12784 }
12785 return nil, gensupport.WrapError(&googleapi.Error{
12786 Code: res.StatusCode,
12787 Header: res.Header,
12788 })
12789 }
12790 if err != nil {
12791 return nil, err
12792 }
12793 defer googleapi.CloseBody(res)
12794 if err := googleapi.CheckResponse(res); err != nil {
12795 return nil, gensupport.WrapError(err)
12796 }
12797 ret := &Operation{
12798 ServerResponse: googleapi.ServerResponse{
12799 Header: res.Header,
12800 HTTPStatusCode: res.StatusCode,
12801 },
12802 }
12803 target := &ret
12804 b, err := gensupport.DecodeResponseBytes(target, res)
12805 if err != nil {
12806 return nil, err
12807 }
12808 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.create", "response", internallog.HTTPResponse(res, b))
12809 return ret, nil
12810 }
12811
12812 type ProjectsLocationsVmwareClustersDeleteCall struct {
12813 s *Service
12814 name string
12815 urlParams_ gensupport.URLParams
12816 ctx_ context.Context
12817 header_ http.Header
12818 }
12819
12820 // Delete: Deletes a single VMware Cluster.
12821 //
12822 // - name: Name of the VMware user cluster to be deleted. Format:
12823 // "projects/{project}/locations/{location}/vmwareClusters/{vmware_cluster}".
12824 func (r *ProjectsLocationsVmwareClustersService) Delete(name string) *ProjectsLocationsVmwareClustersDeleteCall {
12825 c := &ProjectsLocationsVmwareClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12826 c.name = name
12827 return c
12828 }
12829
12830 // AllowMissing sets the optional parameter "allowMissing": If set to true, and
12831 // the VMware cluster is not found, the request will succeed but no action will
12832 // be taken on the server and return a completed LRO.
12833 func (c *ProjectsLocationsVmwareClustersDeleteCall) AllowMissing(allowMissing bool) *ProjectsLocationsVmwareClustersDeleteCall {
12834 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
12835 return c
12836 }
12837
12838 // Etag sets the optional parameter "etag": The current etag of the VMware
12839 // cluster. If an etag is provided and does not match the current etag of the
12840 // cluster, deletion will be blocked and an ABORTED error will be returned.
12841 func (c *ProjectsLocationsVmwareClustersDeleteCall) Etag(etag string) *ProjectsLocationsVmwareClustersDeleteCall {
12842 c.urlParams_.Set("etag", etag)
12843 return c
12844 }
12845
12846 // Force sets the optional parameter "force": If set to true, any node pools
12847 // from the cluster will also be deleted.
12848 func (c *ProjectsLocationsVmwareClustersDeleteCall) Force(force bool) *ProjectsLocationsVmwareClustersDeleteCall {
12849 c.urlParams_.Set("force", fmt.Sprint(force))
12850 return c
12851 }
12852
12853 // IgnoreErrors sets the optional parameter "ignoreErrors": If set to true, the
12854 // deletion of a VMware user cluster resource will succeed even if errors occur
12855 // during deletion. This parameter can be used when you want to delete GCP's
12856 // cluster resource and the on-prem admin cluster that hosts your user cluster
12857 // is disconnected / unreachable or deleted. WARNING: Using this parameter when
12858 // your user cluster still exists may result in a deleted GCP user cluster but
12859 // an existing on-prem user cluster.
12860 func (c *ProjectsLocationsVmwareClustersDeleteCall) IgnoreErrors(ignoreErrors bool) *ProjectsLocationsVmwareClustersDeleteCall {
12861 c.urlParams_.Set("ignoreErrors", fmt.Sprint(ignoreErrors))
12862 return c
12863 }
12864
12865 // ValidateOnly sets the optional parameter "validateOnly": Validate the
12866 // request without actually doing any updates.
12867 func (c *ProjectsLocationsVmwareClustersDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsVmwareClustersDeleteCall {
12868 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
12869 return c
12870 }
12871
12872 // Fields allows partial responses to be retrieved. See
12873 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12874 // details.
12875 func (c *ProjectsLocationsVmwareClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersDeleteCall {
12876 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12877 return c
12878 }
12879
12880 // Context sets the context to be used in this call's Do method.
12881 func (c *ProjectsLocationsVmwareClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersDeleteCall {
12882 c.ctx_ = ctx
12883 return c
12884 }
12885
12886 // Header returns a http.Header that can be modified by the caller to add
12887 // headers to the request.
12888 func (c *ProjectsLocationsVmwareClustersDeleteCall) Header() http.Header {
12889 if c.header_ == nil {
12890 c.header_ = make(http.Header)
12891 }
12892 return c.header_
12893 }
12894
12895 func (c *ProjectsLocationsVmwareClustersDeleteCall) doRequest(alt string) (*http.Response, error) {
12896 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12897 c.urlParams_.Set("alt", alt)
12898 c.urlParams_.Set("prettyPrint", "false")
12899 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
12900 urls += "?" + c.urlParams_.Encode()
12901 req, err := http.NewRequest("DELETE", urls, nil)
12902 if err != nil {
12903 return nil, err
12904 }
12905 req.Header = reqHeaders
12906 googleapi.Expand(req.URL, map[string]string{
12907 "name": c.name,
12908 })
12909 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.delete", "request", internallog.HTTPRequest(req, nil))
12910 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12911 }
12912
12913 // Do executes the "gkeonprem.projects.locations.vmwareClusters.delete" call.
12914 // Any non-2xx status code is an error. Response headers are in either
12915 // *Operation.ServerResponse.Header or (if a response was returned at all) in
12916 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12917 // whether the returned error was because http.StatusNotModified was returned.
12918 func (c *ProjectsLocationsVmwareClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12919 gensupport.SetOptions(c.urlParams_, opts...)
12920 res, err := c.doRequest("json")
12921 if res != nil && res.StatusCode == http.StatusNotModified {
12922 if res.Body != nil {
12923 res.Body.Close()
12924 }
12925 return nil, gensupport.WrapError(&googleapi.Error{
12926 Code: res.StatusCode,
12927 Header: res.Header,
12928 })
12929 }
12930 if err != nil {
12931 return nil, err
12932 }
12933 defer googleapi.CloseBody(res)
12934 if err := googleapi.CheckResponse(res); err != nil {
12935 return nil, gensupport.WrapError(err)
12936 }
12937 ret := &Operation{
12938 ServerResponse: googleapi.ServerResponse{
12939 Header: res.Header,
12940 HTTPStatusCode: res.StatusCode,
12941 },
12942 }
12943 target := &ret
12944 b, err := gensupport.DecodeResponseBytes(target, res)
12945 if err != nil {
12946 return nil, err
12947 }
12948 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.delete", "response", internallog.HTTPResponse(res, b))
12949 return ret, nil
12950 }
12951
12952 type ProjectsLocationsVmwareClustersEnrollCall struct {
12953 s *Service
12954 parent string
12955 enrollvmwareclusterrequest *EnrollVmwareClusterRequest
12956 urlParams_ gensupport.URLParams
12957 ctx_ context.Context
12958 header_ http.Header
12959 }
12960
12961 // Enroll: Enrolls an existing VMware user cluster and its node pools to the
12962 // Anthos On-Prem API within a given project and location. Through enrollment,
12963 // an existing cluster will become Anthos On-Prem API managed. The
12964 // corresponding GCP resources will be created and all future modifications to
12965 // the cluster and/or its node pools will be expected to be performed through
12966 // the API.
12967 //
12968 // - parent: The parent of the project and location where the cluster is
12969 // Enrolled in. Format: "projects/{project}/locations/{location}".
12970 func (r *ProjectsLocationsVmwareClustersService) Enroll(parent string, enrollvmwareclusterrequest *EnrollVmwareClusterRequest) *ProjectsLocationsVmwareClustersEnrollCall {
12971 c := &ProjectsLocationsVmwareClustersEnrollCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12972 c.parent = parent
12973 c.enrollvmwareclusterrequest = enrollvmwareclusterrequest
12974 return c
12975 }
12976
12977 // Fields allows partial responses to be retrieved. See
12978 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12979 // details.
12980 func (c *ProjectsLocationsVmwareClustersEnrollCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersEnrollCall {
12981 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12982 return c
12983 }
12984
12985 // Context sets the context to be used in this call's Do method.
12986 func (c *ProjectsLocationsVmwareClustersEnrollCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersEnrollCall {
12987 c.ctx_ = ctx
12988 return c
12989 }
12990
12991 // Header returns a http.Header that can be modified by the caller to add
12992 // headers to the request.
12993 func (c *ProjectsLocationsVmwareClustersEnrollCall) Header() http.Header {
12994 if c.header_ == nil {
12995 c.header_ = make(http.Header)
12996 }
12997 return c.header_
12998 }
12999
13000 func (c *ProjectsLocationsVmwareClustersEnrollCall) doRequest(alt string) (*http.Response, error) {
13001 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13002 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.enrollvmwareclusterrequest)
13003 if err != nil {
13004 return nil, err
13005 }
13006 c.urlParams_.Set("alt", alt)
13007 c.urlParams_.Set("prettyPrint", "false")
13008 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/vmwareClusters:enroll")
13009 urls += "?" + c.urlParams_.Encode()
13010 req, err := http.NewRequest("POST", urls, body)
13011 if err != nil {
13012 return nil, err
13013 }
13014 req.Header = reqHeaders
13015 googleapi.Expand(req.URL, map[string]string{
13016 "parent": c.parent,
13017 })
13018 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.enroll", "request", internallog.HTTPRequest(req, body.Bytes()))
13019 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13020 }
13021
13022 // Do executes the "gkeonprem.projects.locations.vmwareClusters.enroll" call.
13023 // Any non-2xx status code is an error. Response headers are in either
13024 // *Operation.ServerResponse.Header or (if a response was returned at all) in
13025 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13026 // whether the returned error was because http.StatusNotModified was returned.
13027 func (c *ProjectsLocationsVmwareClustersEnrollCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13028 gensupport.SetOptions(c.urlParams_, opts...)
13029 res, err := c.doRequest("json")
13030 if res != nil && res.StatusCode == http.StatusNotModified {
13031 if res.Body != nil {
13032 res.Body.Close()
13033 }
13034 return nil, gensupport.WrapError(&googleapi.Error{
13035 Code: res.StatusCode,
13036 Header: res.Header,
13037 })
13038 }
13039 if err != nil {
13040 return nil, err
13041 }
13042 defer googleapi.CloseBody(res)
13043 if err := googleapi.CheckResponse(res); err != nil {
13044 return nil, gensupport.WrapError(err)
13045 }
13046 ret := &Operation{
13047 ServerResponse: googleapi.ServerResponse{
13048 Header: res.Header,
13049 HTTPStatusCode: res.StatusCode,
13050 },
13051 }
13052 target := &ret
13053 b, err := gensupport.DecodeResponseBytes(target, res)
13054 if err != nil {
13055 return nil, err
13056 }
13057 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.enroll", "response", internallog.HTTPResponse(res, b))
13058 return ret, nil
13059 }
13060
13061 type ProjectsLocationsVmwareClustersGetCall struct {
13062 s *Service
13063 name string
13064 urlParams_ gensupport.URLParams
13065 ifNoneMatch_ string
13066 ctx_ context.Context
13067 header_ http.Header
13068 }
13069
13070 // Get: Gets details of a single VMware Cluster.
13071 //
13072 // - name: Name of the VMware user cluster to be returned. Format:
13073 // "projects/{project}/locations/{location}/vmwareClusters/{vmware_cluster}".
13074 func (r *ProjectsLocationsVmwareClustersService) Get(name string) *ProjectsLocationsVmwareClustersGetCall {
13075 c := &ProjectsLocationsVmwareClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13076 c.name = name
13077 return c
13078 }
13079
13080 // AllowMissing sets the optional parameter "allowMissing": If true, return
13081 // Vmware Cluster including the one that only exists in RMS.
13082 func (c *ProjectsLocationsVmwareClustersGetCall) AllowMissing(allowMissing bool) *ProjectsLocationsVmwareClustersGetCall {
13083 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
13084 return c
13085 }
13086
13087 // View sets the optional parameter "view": View for VMware user cluster. When
13088 // `BASIC` is specified, only the cluster resource name and admin cluster
13089 // membership are returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED`
13090 // is the same as `FULL', which returns the complete cluster configuration
13091 // details.
13092 //
13093 // Possible values:
13094 //
13095 // "CLUSTER_VIEW_UNSPECIFIED" - If the value is not set, the default `FULL`
13096 //
13097 // view is used.
13098 //
13099 // "BASIC" - Includes basic information of a cluster resource including
13100 //
13101 // cluster resource name and admin cluster membership.
13102 //
13103 // "FULL" - Includes the complete configuration for VMware cluster resource.
13104 //
13105 // This is the default value for GetVmwareClusterRequest method.
13106 func (c *ProjectsLocationsVmwareClustersGetCall) View(view string) *ProjectsLocationsVmwareClustersGetCall {
13107 c.urlParams_.Set("view", view)
13108 return c
13109 }
13110
13111 // Fields allows partial responses to be retrieved. See
13112 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13113 // details.
13114 func (c *ProjectsLocationsVmwareClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersGetCall {
13115 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13116 return c
13117 }
13118
13119 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13120 // object's ETag matches the given value. This is useful for getting updates
13121 // only after the object has changed since the last request.
13122 func (c *ProjectsLocationsVmwareClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVmwareClustersGetCall {
13123 c.ifNoneMatch_ = entityTag
13124 return c
13125 }
13126
13127 // Context sets the context to be used in this call's Do method.
13128 func (c *ProjectsLocationsVmwareClustersGetCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersGetCall {
13129 c.ctx_ = ctx
13130 return c
13131 }
13132
13133 // Header returns a http.Header that can be modified by the caller to add
13134 // headers to the request.
13135 func (c *ProjectsLocationsVmwareClustersGetCall) Header() http.Header {
13136 if c.header_ == nil {
13137 c.header_ = make(http.Header)
13138 }
13139 return c.header_
13140 }
13141
13142 func (c *ProjectsLocationsVmwareClustersGetCall) doRequest(alt string) (*http.Response, error) {
13143 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13144 if c.ifNoneMatch_ != "" {
13145 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13146 }
13147 c.urlParams_.Set("alt", alt)
13148 c.urlParams_.Set("prettyPrint", "false")
13149 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
13150 urls += "?" + c.urlParams_.Encode()
13151 req, err := http.NewRequest("GET", urls, nil)
13152 if err != nil {
13153 return nil, err
13154 }
13155 req.Header = reqHeaders
13156 googleapi.Expand(req.URL, map[string]string{
13157 "name": c.name,
13158 })
13159 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.get", "request", internallog.HTTPRequest(req, nil))
13160 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13161 }
13162
13163 // Do executes the "gkeonprem.projects.locations.vmwareClusters.get" call.
13164 // Any non-2xx status code is an error. Response headers are in either
13165 // *VmwareCluster.ServerResponse.Header or (if a response was returned at all)
13166 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13167 // whether the returned error was because http.StatusNotModified was returned.
13168 func (c *ProjectsLocationsVmwareClustersGetCall) Do(opts ...googleapi.CallOption) (*VmwareCluster, error) {
13169 gensupport.SetOptions(c.urlParams_, opts...)
13170 res, err := c.doRequest("json")
13171 if res != nil && res.StatusCode == http.StatusNotModified {
13172 if res.Body != nil {
13173 res.Body.Close()
13174 }
13175 return nil, gensupport.WrapError(&googleapi.Error{
13176 Code: res.StatusCode,
13177 Header: res.Header,
13178 })
13179 }
13180 if err != nil {
13181 return nil, err
13182 }
13183 defer googleapi.CloseBody(res)
13184 if err := googleapi.CheckResponse(res); err != nil {
13185 return nil, gensupport.WrapError(err)
13186 }
13187 ret := &VmwareCluster{
13188 ServerResponse: googleapi.ServerResponse{
13189 Header: res.Header,
13190 HTTPStatusCode: res.StatusCode,
13191 },
13192 }
13193 target := &ret
13194 b, err := gensupport.DecodeResponseBytes(target, res)
13195 if err != nil {
13196 return nil, err
13197 }
13198 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.get", "response", internallog.HTTPResponse(res, b))
13199 return ret, nil
13200 }
13201
13202 type ProjectsLocationsVmwareClustersGetIamPolicyCall struct {
13203 s *Service
13204 resource string
13205 urlParams_ gensupport.URLParams
13206 ifNoneMatch_ string
13207 ctx_ context.Context
13208 header_ http.Header
13209 }
13210
13211 // GetIamPolicy: Gets the access control policy for a resource. Returns an
13212 // empty policy if the resource exists and does not have a policy set.
13213 //
13214 // - resource: REQUIRED: The resource for which the policy is being requested.
13215 // See Resource names (https://cloud.google.com/apis/design/resource_names)
13216 // for the appropriate value for this field.
13217 func (r *ProjectsLocationsVmwareClustersService) GetIamPolicy(resource string) *ProjectsLocationsVmwareClustersGetIamPolicyCall {
13218 c := &ProjectsLocationsVmwareClustersGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13219 c.resource = resource
13220 return c
13221 }
13222
13223 // OptionsRequestedPolicyVersion sets the optional parameter
13224 // "options.requestedPolicyVersion": The maximum policy version that will be
13225 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
13226 // an invalid value will be rejected. Requests for policies with any
13227 // conditional role bindings must specify version 3. Policies with no
13228 // conditional role bindings may specify any valid value or leave the field
13229 // unset. The policy in the response might use the policy version that you
13230 // specified, or it might use a lower policy version. For example, if you
13231 // specify version 3, but the policy has no conditional role bindings, the
13232 // response uses version 1. To learn which resources support conditions in
13233 // their IAM policies, see the IAM documentation
13234 // (https://cloud.google.com/iam/help/conditions/resource-policies).
13235 func (c *ProjectsLocationsVmwareClustersGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsVmwareClustersGetIamPolicyCall {
13236 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
13237 return c
13238 }
13239
13240 // Fields allows partial responses to be retrieved. See
13241 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13242 // details.
13243 func (c *ProjectsLocationsVmwareClustersGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersGetIamPolicyCall {
13244 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13245 return c
13246 }
13247
13248 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13249 // object's ETag matches the given value. This is useful for getting updates
13250 // only after the object has changed since the last request.
13251 func (c *ProjectsLocationsVmwareClustersGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsVmwareClustersGetIamPolicyCall {
13252 c.ifNoneMatch_ = entityTag
13253 return c
13254 }
13255
13256 // Context sets the context to be used in this call's Do method.
13257 func (c *ProjectsLocationsVmwareClustersGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersGetIamPolicyCall {
13258 c.ctx_ = ctx
13259 return c
13260 }
13261
13262 // Header returns a http.Header that can be modified by the caller to add
13263 // headers to the request.
13264 func (c *ProjectsLocationsVmwareClustersGetIamPolicyCall) Header() http.Header {
13265 if c.header_ == nil {
13266 c.header_ = make(http.Header)
13267 }
13268 return c.header_
13269 }
13270
13271 func (c *ProjectsLocationsVmwareClustersGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
13272 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13273 if c.ifNoneMatch_ != "" {
13274 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13275 }
13276 c.urlParams_.Set("alt", alt)
13277 c.urlParams_.Set("prettyPrint", "false")
13278 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
13279 urls += "?" + c.urlParams_.Encode()
13280 req, err := http.NewRequest("GET", urls, nil)
13281 if err != nil {
13282 return nil, err
13283 }
13284 req.Header = reqHeaders
13285 googleapi.Expand(req.URL, map[string]string{
13286 "resource": c.resource,
13287 })
13288 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
13289 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13290 }
13291
13292 // Do executes the "gkeonprem.projects.locations.vmwareClusters.getIamPolicy" call.
13293 // Any non-2xx status code is an error. Response headers are in either
13294 // *Policy.ServerResponse.Header or (if a response was returned at all) in
13295 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13296 // whether the returned error was because http.StatusNotModified was returned.
13297 func (c *ProjectsLocationsVmwareClustersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
13298 gensupport.SetOptions(c.urlParams_, opts...)
13299 res, err := c.doRequest("json")
13300 if res != nil && res.StatusCode == http.StatusNotModified {
13301 if res.Body != nil {
13302 res.Body.Close()
13303 }
13304 return nil, gensupport.WrapError(&googleapi.Error{
13305 Code: res.StatusCode,
13306 Header: res.Header,
13307 })
13308 }
13309 if err != nil {
13310 return nil, err
13311 }
13312 defer googleapi.CloseBody(res)
13313 if err := googleapi.CheckResponse(res); err != nil {
13314 return nil, gensupport.WrapError(err)
13315 }
13316 ret := &Policy{
13317 ServerResponse: googleapi.ServerResponse{
13318 Header: res.Header,
13319 HTTPStatusCode: res.StatusCode,
13320 },
13321 }
13322 target := &ret
13323 b, err := gensupport.DecodeResponseBytes(target, res)
13324 if err != nil {
13325 return nil, err
13326 }
13327 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.getIamPolicy", "response", internallog.HTTPResponse(res, b))
13328 return ret, nil
13329 }
13330
13331 type ProjectsLocationsVmwareClustersListCall struct {
13332 s *Service
13333 parent string
13334 urlParams_ gensupport.URLParams
13335 ifNoneMatch_ string
13336 ctx_ context.Context
13337 header_ http.Header
13338 }
13339
13340 // List: Lists VMware Clusters in a given project and location.
13341 //
13342 // - parent: The parent of the project and location where the clusters are
13343 // listed in. Format: "projects/{project}/locations/{location}".
13344 func (r *ProjectsLocationsVmwareClustersService) List(parent string) *ProjectsLocationsVmwareClustersListCall {
13345 c := &ProjectsLocationsVmwareClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13346 c.parent = parent
13347 return c
13348 }
13349
13350 // AllowMissing sets the optional parameter "allowMissing": If true, return
13351 // list of Vmware Clusters including the ones that only exists in RMS.
13352 func (c *ProjectsLocationsVmwareClustersListCall) AllowMissing(allowMissing bool) *ProjectsLocationsVmwareClustersListCall {
13353 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
13354 return c
13355 }
13356
13357 // Filter sets the optional parameter "filter": A resource filtering expression
13358 // following https://google.aip.dev/160. When non-empty, only resource's whose
13359 // attributes field matches the filter are returned.
13360 func (c *ProjectsLocationsVmwareClustersListCall) Filter(filter string) *ProjectsLocationsVmwareClustersListCall {
13361 c.urlParams_.Set("filter", filter)
13362 return c
13363 }
13364
13365 // PageSize sets the optional parameter "pageSize": Requested page size. Server
13366 // may return fewer items than requested. If unspecified, at most 50 clusters
13367 // will be returned. The maximum value is 1000; values above 1000 will be
13368 // coerced to 1000.
13369 func (c *ProjectsLocationsVmwareClustersListCall) PageSize(pageSize int64) *ProjectsLocationsVmwareClustersListCall {
13370 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13371 return c
13372 }
13373
13374 // PageToken sets the optional parameter "pageToken": A token identifying a
13375 // page of results the server should return.
13376 func (c *ProjectsLocationsVmwareClustersListCall) PageToken(pageToken string) *ProjectsLocationsVmwareClustersListCall {
13377 c.urlParams_.Set("pageToken", pageToken)
13378 return c
13379 }
13380
13381 // View sets the optional parameter "view": View for VMware clusters. When
13382 // `BASIC` is specified, only the cluster resource name and admin cluster
13383 // membership are returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED`
13384 // is the same as `FULL', which returns the complete cluster configuration
13385 // details.
13386 //
13387 // Possible values:
13388 //
13389 // "CLUSTER_VIEW_UNSPECIFIED" - If the value is not set, the default `FULL`
13390 //
13391 // view is used.
13392 //
13393 // "BASIC" - Includes basic information of a cluster resource including
13394 //
13395 // cluster resource name and admin cluster membership.
13396 //
13397 // "FULL" - Includes the complete configuration for VMware cluster resource.
13398 //
13399 // This is the default value for ListVmwareClustersRequest method.
13400 func (c *ProjectsLocationsVmwareClustersListCall) View(view string) *ProjectsLocationsVmwareClustersListCall {
13401 c.urlParams_.Set("view", view)
13402 return c
13403 }
13404
13405 // Fields allows partial responses to be retrieved. See
13406 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13407 // details.
13408 func (c *ProjectsLocationsVmwareClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersListCall {
13409 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13410 return c
13411 }
13412
13413 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13414 // object's ETag matches the given value. This is useful for getting updates
13415 // only after the object has changed since the last request.
13416 func (c *ProjectsLocationsVmwareClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVmwareClustersListCall {
13417 c.ifNoneMatch_ = entityTag
13418 return c
13419 }
13420
13421 // Context sets the context to be used in this call's Do method.
13422 func (c *ProjectsLocationsVmwareClustersListCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersListCall {
13423 c.ctx_ = ctx
13424 return c
13425 }
13426
13427 // Header returns a http.Header that can be modified by the caller to add
13428 // headers to the request.
13429 func (c *ProjectsLocationsVmwareClustersListCall) Header() http.Header {
13430 if c.header_ == nil {
13431 c.header_ = make(http.Header)
13432 }
13433 return c.header_
13434 }
13435
13436 func (c *ProjectsLocationsVmwareClustersListCall) doRequest(alt string) (*http.Response, error) {
13437 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13438 if c.ifNoneMatch_ != "" {
13439 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13440 }
13441 c.urlParams_.Set("alt", alt)
13442 c.urlParams_.Set("prettyPrint", "false")
13443 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/vmwareClusters")
13444 urls += "?" + c.urlParams_.Encode()
13445 req, err := http.NewRequest("GET", urls, nil)
13446 if err != nil {
13447 return nil, err
13448 }
13449 req.Header = reqHeaders
13450 googleapi.Expand(req.URL, map[string]string{
13451 "parent": c.parent,
13452 })
13453 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.list", "request", internallog.HTTPRequest(req, nil))
13454 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13455 }
13456
13457 // Do executes the "gkeonprem.projects.locations.vmwareClusters.list" call.
13458 // Any non-2xx status code is an error. Response headers are in either
13459 // *ListVmwareClustersResponse.ServerResponse.Header or (if a response was
13460 // returned at all) in error.(*googleapi.Error).Header. Use
13461 // googleapi.IsNotModified to check whether the returned error was because
13462 // http.StatusNotModified was returned.
13463 func (c *ProjectsLocationsVmwareClustersListCall) Do(opts ...googleapi.CallOption) (*ListVmwareClustersResponse, error) {
13464 gensupport.SetOptions(c.urlParams_, opts...)
13465 res, err := c.doRequest("json")
13466 if res != nil && res.StatusCode == http.StatusNotModified {
13467 if res.Body != nil {
13468 res.Body.Close()
13469 }
13470 return nil, gensupport.WrapError(&googleapi.Error{
13471 Code: res.StatusCode,
13472 Header: res.Header,
13473 })
13474 }
13475 if err != nil {
13476 return nil, err
13477 }
13478 defer googleapi.CloseBody(res)
13479 if err := googleapi.CheckResponse(res); err != nil {
13480 return nil, gensupport.WrapError(err)
13481 }
13482 ret := &ListVmwareClustersResponse{
13483 ServerResponse: googleapi.ServerResponse{
13484 Header: res.Header,
13485 HTTPStatusCode: res.StatusCode,
13486 },
13487 }
13488 target := &ret
13489 b, err := gensupport.DecodeResponseBytes(target, res)
13490 if err != nil {
13491 return nil, err
13492 }
13493 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.list", "response", internallog.HTTPResponse(res, b))
13494 return ret, nil
13495 }
13496
13497 // Pages invokes f for each page of results.
13498 // A non-nil error returned from f will halt the iteration.
13499 // The provided context supersedes any context provided to the Context method.
13500 func (c *ProjectsLocationsVmwareClustersListCall) Pages(ctx context.Context, f func(*ListVmwareClustersResponse) error) error {
13501 c.ctx_ = ctx
13502 defer c.PageToken(c.urlParams_.Get("pageToken"))
13503 for {
13504 x, err := c.Do()
13505 if err != nil {
13506 return err
13507 }
13508 if err := f(x); err != nil {
13509 return err
13510 }
13511 if x.NextPageToken == "" {
13512 return nil
13513 }
13514 c.PageToken(x.NextPageToken)
13515 }
13516 }
13517
13518 type ProjectsLocationsVmwareClustersPatchCall struct {
13519 s *Service
13520 name string
13521 vmwarecluster *VmwareCluster
13522 urlParams_ gensupport.URLParams
13523 ctx_ context.Context
13524 header_ http.Header
13525 }
13526
13527 // Patch: Updates the parameters of a single VMware cluster.
13528 //
13529 // - name: Immutable. The VMware user cluster resource name.
13530 func (r *ProjectsLocationsVmwareClustersService) Patch(name string, vmwarecluster *VmwareCluster) *ProjectsLocationsVmwareClustersPatchCall {
13531 c := &ProjectsLocationsVmwareClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13532 c.name = name
13533 c.vmwarecluster = vmwarecluster
13534 return c
13535 }
13536
13537 // SkipValidations sets the optional parameter "skipValidations":
13538 func (c *ProjectsLocationsVmwareClustersPatchCall) SkipValidations(skipValidations ...string) *ProjectsLocationsVmwareClustersPatchCall {
13539 c.urlParams_.SetMulti("skipValidations", append([]string{}, skipValidations...))
13540 return c
13541 }
13542
13543 // UpdateMask sets the optional parameter "updateMask": Required. Field mask is
13544 // used to specify the fields to be overwritten in the VMwareCluster resource
13545 // by the update. The fields specified in the update_mask are relative to the
13546 // resource, not the full request. A field will be overwritten if it is in the
13547 // mask. If the user does not provide a mask then all populated fields in the
13548 // VmwareCluster message will be updated. Empty fields will be ignored unless a
13549 // field mask is used.
13550 func (c *ProjectsLocationsVmwareClustersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsVmwareClustersPatchCall {
13551 c.urlParams_.Set("updateMask", updateMask)
13552 return c
13553 }
13554
13555 // ValidateOnly sets the optional parameter "validateOnly": Validate the
13556 // request without actually doing any updates.
13557 func (c *ProjectsLocationsVmwareClustersPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsVmwareClustersPatchCall {
13558 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
13559 return c
13560 }
13561
13562 // Fields allows partial responses to be retrieved. See
13563 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13564 // details.
13565 func (c *ProjectsLocationsVmwareClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersPatchCall {
13566 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13567 return c
13568 }
13569
13570 // Context sets the context to be used in this call's Do method.
13571 func (c *ProjectsLocationsVmwareClustersPatchCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersPatchCall {
13572 c.ctx_ = ctx
13573 return c
13574 }
13575
13576 // Header returns a http.Header that can be modified by the caller to add
13577 // headers to the request.
13578 func (c *ProjectsLocationsVmwareClustersPatchCall) Header() http.Header {
13579 if c.header_ == nil {
13580 c.header_ = make(http.Header)
13581 }
13582 return c.header_
13583 }
13584
13585 func (c *ProjectsLocationsVmwareClustersPatchCall) doRequest(alt string) (*http.Response, error) {
13586 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13587 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.vmwarecluster)
13588 if err != nil {
13589 return nil, err
13590 }
13591 c.urlParams_.Set("alt", alt)
13592 c.urlParams_.Set("prettyPrint", "false")
13593 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
13594 urls += "?" + c.urlParams_.Encode()
13595 req, err := http.NewRequest("PATCH", urls, body)
13596 if err != nil {
13597 return nil, err
13598 }
13599 req.Header = reqHeaders
13600 googleapi.Expand(req.URL, map[string]string{
13601 "name": c.name,
13602 })
13603 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
13604 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13605 }
13606
13607 // Do executes the "gkeonprem.projects.locations.vmwareClusters.patch" call.
13608 // Any non-2xx status code is an error. Response headers are in either
13609 // *Operation.ServerResponse.Header or (if a response was returned at all) in
13610 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13611 // whether the returned error was because http.StatusNotModified was returned.
13612 func (c *ProjectsLocationsVmwareClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13613 gensupport.SetOptions(c.urlParams_, opts...)
13614 res, err := c.doRequest("json")
13615 if res != nil && res.StatusCode == http.StatusNotModified {
13616 if res.Body != nil {
13617 res.Body.Close()
13618 }
13619 return nil, gensupport.WrapError(&googleapi.Error{
13620 Code: res.StatusCode,
13621 Header: res.Header,
13622 })
13623 }
13624 if err != nil {
13625 return nil, err
13626 }
13627 defer googleapi.CloseBody(res)
13628 if err := googleapi.CheckResponse(res); err != nil {
13629 return nil, gensupport.WrapError(err)
13630 }
13631 ret := &Operation{
13632 ServerResponse: googleapi.ServerResponse{
13633 Header: res.Header,
13634 HTTPStatusCode: res.StatusCode,
13635 },
13636 }
13637 target := &ret
13638 b, err := gensupport.DecodeResponseBytes(target, res)
13639 if err != nil {
13640 return nil, err
13641 }
13642 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.patch", "response", internallog.HTTPResponse(res, b))
13643 return ret, nil
13644 }
13645
13646 type ProjectsLocationsVmwareClustersQueryVersionConfigCall struct {
13647 s *Service
13648 parent string
13649 urlParams_ gensupport.URLParams
13650 ctx_ context.Context
13651 header_ http.Header
13652 }
13653
13654 // QueryVersionConfig: Queries the VMware user cluster version config.
13655 //
13656 // - parent: The parent of the project and location to query for version
13657 // config. Format: "projects/{project}/locations/{location}".
13658 func (r *ProjectsLocationsVmwareClustersService) QueryVersionConfig(parent string) *ProjectsLocationsVmwareClustersQueryVersionConfigCall {
13659 c := &ProjectsLocationsVmwareClustersQueryVersionConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13660 c.parent = parent
13661 return c
13662 }
13663
13664 // CreateConfigAdminClusterMembership sets the optional parameter
13665 // "createConfig.adminClusterMembership": The admin cluster membership. This is
13666 // the full resource name of the admin cluster's fleet membership. Format:
13667 // "projects/{project}/locations/{location}/memberships/{membership}"
13668 func (c *ProjectsLocationsVmwareClustersQueryVersionConfigCall) CreateConfigAdminClusterMembership(createConfigAdminClusterMembership string) *ProjectsLocationsVmwareClustersQueryVersionConfigCall {
13669 c.urlParams_.Set("createConfig.adminClusterMembership", createConfigAdminClusterMembership)
13670 return c
13671 }
13672
13673 // CreateConfigAdminClusterName sets the optional parameter
13674 // "createConfig.adminClusterName": The admin cluster resource name. This is
13675 // the full resource name of the admin cluster resource. Format:
13676 // "projects/{project}/locations/{location}/vmwareAdminClusters/{vmware_admin_cl
13677 // uster}"
13678 func (c *ProjectsLocationsVmwareClustersQueryVersionConfigCall) CreateConfigAdminClusterName(createConfigAdminClusterName string) *ProjectsLocationsVmwareClustersQueryVersionConfigCall {
13679 c.urlParams_.Set("createConfig.adminClusterName", createConfigAdminClusterName)
13680 return c
13681 }
13682
13683 // UpgradeConfigClusterName sets the optional parameter
13684 // "upgradeConfig.clusterName": The user cluster resource name. This is the
13685 // full resource name of the user cluster resource. Format:
13686 // "projects/{project}/locations/{location}/vmwareClusters/{vmware_cluster}"
13687 func (c *ProjectsLocationsVmwareClustersQueryVersionConfigCall) UpgradeConfigClusterName(upgradeConfigClusterName string) *ProjectsLocationsVmwareClustersQueryVersionConfigCall {
13688 c.urlParams_.Set("upgradeConfig.clusterName", upgradeConfigClusterName)
13689 return c
13690 }
13691
13692 // Fields allows partial responses to be retrieved. See
13693 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13694 // details.
13695 func (c *ProjectsLocationsVmwareClustersQueryVersionConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersQueryVersionConfigCall {
13696 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13697 return c
13698 }
13699
13700 // Context sets the context to be used in this call's Do method.
13701 func (c *ProjectsLocationsVmwareClustersQueryVersionConfigCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersQueryVersionConfigCall {
13702 c.ctx_ = ctx
13703 return c
13704 }
13705
13706 // Header returns a http.Header that can be modified by the caller to add
13707 // headers to the request.
13708 func (c *ProjectsLocationsVmwareClustersQueryVersionConfigCall) Header() http.Header {
13709 if c.header_ == nil {
13710 c.header_ = make(http.Header)
13711 }
13712 return c.header_
13713 }
13714
13715 func (c *ProjectsLocationsVmwareClustersQueryVersionConfigCall) doRequest(alt string) (*http.Response, error) {
13716 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13717 c.urlParams_.Set("alt", alt)
13718 c.urlParams_.Set("prettyPrint", "false")
13719 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/vmwareClusters:queryVersionConfig")
13720 urls += "?" + c.urlParams_.Encode()
13721 req, err := http.NewRequest("POST", urls, nil)
13722 if err != nil {
13723 return nil, err
13724 }
13725 req.Header = reqHeaders
13726 googleapi.Expand(req.URL, map[string]string{
13727 "parent": c.parent,
13728 })
13729 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.queryVersionConfig", "request", internallog.HTTPRequest(req, nil))
13730 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13731 }
13732
13733 // Do executes the "gkeonprem.projects.locations.vmwareClusters.queryVersionConfig" call.
13734 // Any non-2xx status code is an error. Response headers are in either
13735 // *QueryVmwareVersionConfigResponse.ServerResponse.Header or (if a response
13736 // was returned at all) in error.(*googleapi.Error).Header. Use
13737 // googleapi.IsNotModified to check whether the returned error was because
13738 // http.StatusNotModified was returned.
13739 func (c *ProjectsLocationsVmwareClustersQueryVersionConfigCall) Do(opts ...googleapi.CallOption) (*QueryVmwareVersionConfigResponse, error) {
13740 gensupport.SetOptions(c.urlParams_, opts...)
13741 res, err := c.doRequest("json")
13742 if res != nil && res.StatusCode == http.StatusNotModified {
13743 if res.Body != nil {
13744 res.Body.Close()
13745 }
13746 return nil, gensupport.WrapError(&googleapi.Error{
13747 Code: res.StatusCode,
13748 Header: res.Header,
13749 })
13750 }
13751 if err != nil {
13752 return nil, err
13753 }
13754 defer googleapi.CloseBody(res)
13755 if err := googleapi.CheckResponse(res); err != nil {
13756 return nil, gensupport.WrapError(err)
13757 }
13758 ret := &QueryVmwareVersionConfigResponse{
13759 ServerResponse: googleapi.ServerResponse{
13760 Header: res.Header,
13761 HTTPStatusCode: res.StatusCode,
13762 },
13763 }
13764 target := &ret
13765 b, err := gensupport.DecodeResponseBytes(target, res)
13766 if err != nil {
13767 return nil, err
13768 }
13769 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.queryVersionConfig", "response", internallog.HTTPResponse(res, b))
13770 return ret, nil
13771 }
13772
13773 type ProjectsLocationsVmwareClustersSetIamPolicyCall struct {
13774 s *Service
13775 resource string
13776 setiampolicyrequest *SetIamPolicyRequest
13777 urlParams_ gensupport.URLParams
13778 ctx_ context.Context
13779 header_ http.Header
13780 }
13781
13782 // SetIamPolicy: Sets the access control policy on the specified resource.
13783 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
13784 // and `PERMISSION_DENIED` errors.
13785 //
13786 // - resource: REQUIRED: The resource for which the policy is being specified.
13787 // See Resource names (https://cloud.google.com/apis/design/resource_names)
13788 // for the appropriate value for this field.
13789 func (r *ProjectsLocationsVmwareClustersService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsVmwareClustersSetIamPolicyCall {
13790 c := &ProjectsLocationsVmwareClustersSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13791 c.resource = resource
13792 c.setiampolicyrequest = setiampolicyrequest
13793 return c
13794 }
13795
13796 // Fields allows partial responses to be retrieved. See
13797 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13798 // details.
13799 func (c *ProjectsLocationsVmwareClustersSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersSetIamPolicyCall {
13800 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13801 return c
13802 }
13803
13804 // Context sets the context to be used in this call's Do method.
13805 func (c *ProjectsLocationsVmwareClustersSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersSetIamPolicyCall {
13806 c.ctx_ = ctx
13807 return c
13808 }
13809
13810 // Header returns a http.Header that can be modified by the caller to add
13811 // headers to the request.
13812 func (c *ProjectsLocationsVmwareClustersSetIamPolicyCall) Header() http.Header {
13813 if c.header_ == nil {
13814 c.header_ = make(http.Header)
13815 }
13816 return c.header_
13817 }
13818
13819 func (c *ProjectsLocationsVmwareClustersSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
13820 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13821 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
13822 if err != nil {
13823 return nil, err
13824 }
13825 c.urlParams_.Set("alt", alt)
13826 c.urlParams_.Set("prettyPrint", "false")
13827 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
13828 urls += "?" + c.urlParams_.Encode()
13829 req, err := http.NewRequest("POST", urls, body)
13830 if err != nil {
13831 return nil, err
13832 }
13833 req.Header = reqHeaders
13834 googleapi.Expand(req.URL, map[string]string{
13835 "resource": c.resource,
13836 })
13837 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
13838 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13839 }
13840
13841 // Do executes the "gkeonprem.projects.locations.vmwareClusters.setIamPolicy" call.
13842 // Any non-2xx status code is an error. Response headers are in either
13843 // *Policy.ServerResponse.Header or (if a response was returned at all) in
13844 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13845 // whether the returned error was because http.StatusNotModified was returned.
13846 func (c *ProjectsLocationsVmwareClustersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
13847 gensupport.SetOptions(c.urlParams_, opts...)
13848 res, err := c.doRequest("json")
13849 if res != nil && res.StatusCode == http.StatusNotModified {
13850 if res.Body != nil {
13851 res.Body.Close()
13852 }
13853 return nil, gensupport.WrapError(&googleapi.Error{
13854 Code: res.StatusCode,
13855 Header: res.Header,
13856 })
13857 }
13858 if err != nil {
13859 return nil, err
13860 }
13861 defer googleapi.CloseBody(res)
13862 if err := googleapi.CheckResponse(res); err != nil {
13863 return nil, gensupport.WrapError(err)
13864 }
13865 ret := &Policy{
13866 ServerResponse: googleapi.ServerResponse{
13867 Header: res.Header,
13868 HTTPStatusCode: res.StatusCode,
13869 },
13870 }
13871 target := &ret
13872 b, err := gensupport.DecodeResponseBytes(target, res)
13873 if err != nil {
13874 return nil, err
13875 }
13876 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.setIamPolicy", "response", internallog.HTTPResponse(res, b))
13877 return ret, nil
13878 }
13879
13880 type ProjectsLocationsVmwareClustersTestIamPermissionsCall struct {
13881 s *Service
13882 resource string
13883 testiampermissionsrequest *TestIamPermissionsRequest
13884 urlParams_ gensupport.URLParams
13885 ctx_ context.Context
13886 header_ http.Header
13887 }
13888
13889 // TestIamPermissions: Returns permissions that a caller has on the specified
13890 // resource. If the resource does not exist, this will return an empty set of
13891 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
13892 // used for building permission-aware UIs and command-line tools, not for
13893 // authorization checking. This operation may "fail open" without warning.
13894 //
13895 // - resource: REQUIRED: The resource for which the policy detail is being
13896 // requested. See Resource names
13897 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
13898 // value for this field.
13899 func (r *ProjectsLocationsVmwareClustersService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsVmwareClustersTestIamPermissionsCall {
13900 c := &ProjectsLocationsVmwareClustersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13901 c.resource = resource
13902 c.testiampermissionsrequest = testiampermissionsrequest
13903 return c
13904 }
13905
13906 // Fields allows partial responses to be retrieved. See
13907 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13908 // details.
13909 func (c *ProjectsLocationsVmwareClustersTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersTestIamPermissionsCall {
13910 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13911 return c
13912 }
13913
13914 // Context sets the context to be used in this call's Do method.
13915 func (c *ProjectsLocationsVmwareClustersTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersTestIamPermissionsCall {
13916 c.ctx_ = ctx
13917 return c
13918 }
13919
13920 // Header returns a http.Header that can be modified by the caller to add
13921 // headers to the request.
13922 func (c *ProjectsLocationsVmwareClustersTestIamPermissionsCall) Header() http.Header {
13923 if c.header_ == nil {
13924 c.header_ = make(http.Header)
13925 }
13926 return c.header_
13927 }
13928
13929 func (c *ProjectsLocationsVmwareClustersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
13930 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13931 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
13932 if err != nil {
13933 return nil, err
13934 }
13935 c.urlParams_.Set("alt", alt)
13936 c.urlParams_.Set("prettyPrint", "false")
13937 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
13938 urls += "?" + c.urlParams_.Encode()
13939 req, err := http.NewRequest("POST", urls, body)
13940 if err != nil {
13941 return nil, err
13942 }
13943 req.Header = reqHeaders
13944 googleapi.Expand(req.URL, map[string]string{
13945 "resource": c.resource,
13946 })
13947 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
13948 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13949 }
13950
13951 // Do executes the "gkeonprem.projects.locations.vmwareClusters.testIamPermissions" call.
13952 // Any non-2xx status code is an error. Response headers are in either
13953 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
13954 // returned at all) in error.(*googleapi.Error).Header. Use
13955 // googleapi.IsNotModified to check whether the returned error was because
13956 // http.StatusNotModified was returned.
13957 func (c *ProjectsLocationsVmwareClustersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
13958 gensupport.SetOptions(c.urlParams_, opts...)
13959 res, err := c.doRequest("json")
13960 if res != nil && res.StatusCode == http.StatusNotModified {
13961 if res.Body != nil {
13962 res.Body.Close()
13963 }
13964 return nil, gensupport.WrapError(&googleapi.Error{
13965 Code: res.StatusCode,
13966 Header: res.Header,
13967 })
13968 }
13969 if err != nil {
13970 return nil, err
13971 }
13972 defer googleapi.CloseBody(res)
13973 if err := googleapi.CheckResponse(res); err != nil {
13974 return nil, gensupport.WrapError(err)
13975 }
13976 ret := &TestIamPermissionsResponse{
13977 ServerResponse: googleapi.ServerResponse{
13978 Header: res.Header,
13979 HTTPStatusCode: res.StatusCode,
13980 },
13981 }
13982 target := &ret
13983 b, err := gensupport.DecodeResponseBytes(target, res)
13984 if err != nil {
13985 return nil, err
13986 }
13987 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.testIamPermissions", "response", internallog.HTTPResponse(res, b))
13988 return ret, nil
13989 }
13990
13991 type ProjectsLocationsVmwareClustersUnenrollCall struct {
13992 s *Service
13993 name string
13994 urlParams_ gensupport.URLParams
13995 ctx_ context.Context
13996 header_ http.Header
13997 }
13998
13999 // Unenroll: Unenrolls an existing VMware user cluster and its node pools from
14000 // the Anthos On-Prem API within a given project and location. Unenrollment
14001 // removes the Cloud reference to the cluster without modifying the underlying
14002 // OnPrem Resources. Clusters and node pools will continue to run; however,
14003 // they will no longer be accessible through the Anthos On-Prem API or UI.
14004 //
14005 // - name: Name of the VMware user cluster to be unenrolled. Format:
14006 // "projects/{project}/locations/{location}/vmwareClusters/{vmware_cluster}".
14007 func (r *ProjectsLocationsVmwareClustersService) Unenroll(name string) *ProjectsLocationsVmwareClustersUnenrollCall {
14008 c := &ProjectsLocationsVmwareClustersUnenrollCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14009 c.name = name
14010 return c
14011 }
14012
14013 // AllowMissing sets the optional parameter "allowMissing": If set to true, and
14014 // the VMware cluster is not found, the request will succeed but no action will
14015 // be taken on the server and return a completed LRO.
14016 func (c *ProjectsLocationsVmwareClustersUnenrollCall) AllowMissing(allowMissing bool) *ProjectsLocationsVmwareClustersUnenrollCall {
14017 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
14018 return c
14019 }
14020
14021 // Etag sets the optional parameter "etag": The current etag of the VMware
14022 // Cluster. If an etag is provided and does not match the current etag of the
14023 // cluster, deletion will be blocked and an ABORTED error will be returned.
14024 func (c *ProjectsLocationsVmwareClustersUnenrollCall) Etag(etag string) *ProjectsLocationsVmwareClustersUnenrollCall {
14025 c.urlParams_.Set("etag", etag)
14026 return c
14027 }
14028
14029 // Force sets the optional parameter "force": This is required if the cluster
14030 // has any associated node pools. When set, any child node pools will also be
14031 // unenrolled.
14032 func (c *ProjectsLocationsVmwareClustersUnenrollCall) Force(force bool) *ProjectsLocationsVmwareClustersUnenrollCall {
14033 c.urlParams_.Set("force", fmt.Sprint(force))
14034 return c
14035 }
14036
14037 // ValidateOnly sets the optional parameter "validateOnly": Validate the
14038 // request without actually doing any updates.
14039 func (c *ProjectsLocationsVmwareClustersUnenrollCall) ValidateOnly(validateOnly bool) *ProjectsLocationsVmwareClustersUnenrollCall {
14040 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
14041 return c
14042 }
14043
14044 // Fields allows partial responses to be retrieved. See
14045 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14046 // details.
14047 func (c *ProjectsLocationsVmwareClustersUnenrollCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersUnenrollCall {
14048 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14049 return c
14050 }
14051
14052 // Context sets the context to be used in this call's Do method.
14053 func (c *ProjectsLocationsVmwareClustersUnenrollCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersUnenrollCall {
14054 c.ctx_ = ctx
14055 return c
14056 }
14057
14058 // Header returns a http.Header that can be modified by the caller to add
14059 // headers to the request.
14060 func (c *ProjectsLocationsVmwareClustersUnenrollCall) Header() http.Header {
14061 if c.header_ == nil {
14062 c.header_ = make(http.Header)
14063 }
14064 return c.header_
14065 }
14066
14067 func (c *ProjectsLocationsVmwareClustersUnenrollCall) doRequest(alt string) (*http.Response, error) {
14068 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14069 c.urlParams_.Set("alt", alt)
14070 c.urlParams_.Set("prettyPrint", "false")
14071 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:unenroll")
14072 urls += "?" + c.urlParams_.Encode()
14073 req, err := http.NewRequest("DELETE", urls, nil)
14074 if err != nil {
14075 return nil, err
14076 }
14077 req.Header = reqHeaders
14078 googleapi.Expand(req.URL, map[string]string{
14079 "name": c.name,
14080 })
14081 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.unenroll", "request", internallog.HTTPRequest(req, nil))
14082 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14083 }
14084
14085 // Do executes the "gkeonprem.projects.locations.vmwareClusters.unenroll" call.
14086 // Any non-2xx status code is an error. Response headers are in either
14087 // *Operation.ServerResponse.Header or (if a response was returned at all) in
14088 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14089 // whether the returned error was because http.StatusNotModified was returned.
14090 func (c *ProjectsLocationsVmwareClustersUnenrollCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14091 gensupport.SetOptions(c.urlParams_, opts...)
14092 res, err := c.doRequest("json")
14093 if res != nil && res.StatusCode == http.StatusNotModified {
14094 if res.Body != nil {
14095 res.Body.Close()
14096 }
14097 return nil, gensupport.WrapError(&googleapi.Error{
14098 Code: res.StatusCode,
14099 Header: res.Header,
14100 })
14101 }
14102 if err != nil {
14103 return nil, err
14104 }
14105 defer googleapi.CloseBody(res)
14106 if err := googleapi.CheckResponse(res); err != nil {
14107 return nil, gensupport.WrapError(err)
14108 }
14109 ret := &Operation{
14110 ServerResponse: googleapi.ServerResponse{
14111 Header: res.Header,
14112 HTTPStatusCode: res.StatusCode,
14113 },
14114 }
14115 target := &ret
14116 b, err := gensupport.DecodeResponseBytes(target, res)
14117 if err != nil {
14118 return nil, err
14119 }
14120 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.unenroll", "response", internallog.HTTPResponse(res, b))
14121 return ret, nil
14122 }
14123
14124 type ProjectsLocationsVmwareClustersOperationsGetCall struct {
14125 s *Service
14126 name string
14127 urlParams_ gensupport.URLParams
14128 ifNoneMatch_ string
14129 ctx_ context.Context
14130 header_ http.Header
14131 }
14132
14133 // Get: Gets the latest state of a long-running operation. Clients can use this
14134 // method to poll the operation result at intervals as recommended by the API
14135 // service.
14136 //
14137 // - name: The name of the operation resource.
14138 func (r *ProjectsLocationsVmwareClustersOperationsService) Get(name string) *ProjectsLocationsVmwareClustersOperationsGetCall {
14139 c := &ProjectsLocationsVmwareClustersOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14140 c.name = name
14141 return c
14142 }
14143
14144 // Fields allows partial responses to be retrieved. See
14145 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14146 // details.
14147 func (c *ProjectsLocationsVmwareClustersOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersOperationsGetCall {
14148 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14149 return c
14150 }
14151
14152 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14153 // object's ETag matches the given value. This is useful for getting updates
14154 // only after the object has changed since the last request.
14155 func (c *ProjectsLocationsVmwareClustersOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVmwareClustersOperationsGetCall {
14156 c.ifNoneMatch_ = entityTag
14157 return c
14158 }
14159
14160 // Context sets the context to be used in this call's Do method.
14161 func (c *ProjectsLocationsVmwareClustersOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersOperationsGetCall {
14162 c.ctx_ = ctx
14163 return c
14164 }
14165
14166 // Header returns a http.Header that can be modified by the caller to add
14167 // headers to the request.
14168 func (c *ProjectsLocationsVmwareClustersOperationsGetCall) Header() http.Header {
14169 if c.header_ == nil {
14170 c.header_ = make(http.Header)
14171 }
14172 return c.header_
14173 }
14174
14175 func (c *ProjectsLocationsVmwareClustersOperationsGetCall) doRequest(alt string) (*http.Response, error) {
14176 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14177 if c.ifNoneMatch_ != "" {
14178 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14179 }
14180 c.urlParams_.Set("alt", alt)
14181 c.urlParams_.Set("prettyPrint", "false")
14182 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
14183 urls += "?" + c.urlParams_.Encode()
14184 req, err := http.NewRequest("GET", urls, nil)
14185 if err != nil {
14186 return nil, err
14187 }
14188 req.Header = reqHeaders
14189 googleapi.Expand(req.URL, map[string]string{
14190 "name": c.name,
14191 })
14192 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.operations.get", "request", internallog.HTTPRequest(req, nil))
14193 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14194 }
14195
14196 // Do executes the "gkeonprem.projects.locations.vmwareClusters.operations.get" call.
14197 // Any non-2xx status code is an error. Response headers are in either
14198 // *Operation.ServerResponse.Header or (if a response was returned at all) in
14199 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14200 // whether the returned error was because http.StatusNotModified was returned.
14201 func (c *ProjectsLocationsVmwareClustersOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14202 gensupport.SetOptions(c.urlParams_, opts...)
14203 res, err := c.doRequest("json")
14204 if res != nil && res.StatusCode == http.StatusNotModified {
14205 if res.Body != nil {
14206 res.Body.Close()
14207 }
14208 return nil, gensupport.WrapError(&googleapi.Error{
14209 Code: res.StatusCode,
14210 Header: res.Header,
14211 })
14212 }
14213 if err != nil {
14214 return nil, err
14215 }
14216 defer googleapi.CloseBody(res)
14217 if err := googleapi.CheckResponse(res); err != nil {
14218 return nil, gensupport.WrapError(err)
14219 }
14220 ret := &Operation{
14221 ServerResponse: googleapi.ServerResponse{
14222 Header: res.Header,
14223 HTTPStatusCode: res.StatusCode,
14224 },
14225 }
14226 target := &ret
14227 b, err := gensupport.DecodeResponseBytes(target, res)
14228 if err != nil {
14229 return nil, err
14230 }
14231 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.operations.get", "response", internallog.HTTPResponse(res, b))
14232 return ret, nil
14233 }
14234
14235 type ProjectsLocationsVmwareClustersOperationsListCall struct {
14236 s *Service
14237 name string
14238 urlParams_ gensupport.URLParams
14239 ifNoneMatch_ string
14240 ctx_ context.Context
14241 header_ http.Header
14242 }
14243
14244 // List: Lists operations that match the specified filter in the request. If
14245 // the server doesn't support this method, it returns `UNIMPLEMENTED`.
14246 //
14247 // - name: The name of the operation's parent resource.
14248 func (r *ProjectsLocationsVmwareClustersOperationsService) List(name string) *ProjectsLocationsVmwareClustersOperationsListCall {
14249 c := &ProjectsLocationsVmwareClustersOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14250 c.name = name
14251 return c
14252 }
14253
14254 // Filter sets the optional parameter "filter": The standard list filter.
14255 func (c *ProjectsLocationsVmwareClustersOperationsListCall) Filter(filter string) *ProjectsLocationsVmwareClustersOperationsListCall {
14256 c.urlParams_.Set("filter", filter)
14257 return c
14258 }
14259
14260 // PageSize sets the optional parameter "pageSize": The standard list page
14261 // size.
14262 func (c *ProjectsLocationsVmwareClustersOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsVmwareClustersOperationsListCall {
14263 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14264 return c
14265 }
14266
14267 // PageToken sets the optional parameter "pageToken": The standard list page
14268 // token.
14269 func (c *ProjectsLocationsVmwareClustersOperationsListCall) PageToken(pageToken string) *ProjectsLocationsVmwareClustersOperationsListCall {
14270 c.urlParams_.Set("pageToken", pageToken)
14271 return c
14272 }
14273
14274 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess":
14275 // When set to `true`, operations that are reachable are returned as normal,
14276 // and those that are unreachable are returned in the
14277 // ListOperationsResponse.unreachable field. This can only be `true` when
14278 // reading across collections. For example, when `parent` is set to
14279 // "projects/example/locations/-". This field is not supported by default and
14280 // will result in an `UNIMPLEMENTED` error if set unless explicitly documented
14281 // otherwise in service or product specific documentation.
14282 func (c *ProjectsLocationsVmwareClustersOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsVmwareClustersOperationsListCall {
14283 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
14284 return c
14285 }
14286
14287 // Fields allows partial responses to be retrieved. See
14288 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14289 // details.
14290 func (c *ProjectsLocationsVmwareClustersOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersOperationsListCall {
14291 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14292 return c
14293 }
14294
14295 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14296 // object's ETag matches the given value. This is useful for getting updates
14297 // only after the object has changed since the last request.
14298 func (c *ProjectsLocationsVmwareClustersOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVmwareClustersOperationsListCall {
14299 c.ifNoneMatch_ = entityTag
14300 return c
14301 }
14302
14303 // Context sets the context to be used in this call's Do method.
14304 func (c *ProjectsLocationsVmwareClustersOperationsListCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersOperationsListCall {
14305 c.ctx_ = ctx
14306 return c
14307 }
14308
14309 // Header returns a http.Header that can be modified by the caller to add
14310 // headers to the request.
14311 func (c *ProjectsLocationsVmwareClustersOperationsListCall) Header() http.Header {
14312 if c.header_ == nil {
14313 c.header_ = make(http.Header)
14314 }
14315 return c.header_
14316 }
14317
14318 func (c *ProjectsLocationsVmwareClustersOperationsListCall) doRequest(alt string) (*http.Response, error) {
14319 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14320 if c.ifNoneMatch_ != "" {
14321 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14322 }
14323 c.urlParams_.Set("alt", alt)
14324 c.urlParams_.Set("prettyPrint", "false")
14325 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
14326 urls += "?" + c.urlParams_.Encode()
14327 req, err := http.NewRequest("GET", urls, nil)
14328 if err != nil {
14329 return nil, err
14330 }
14331 req.Header = reqHeaders
14332 googleapi.Expand(req.URL, map[string]string{
14333 "name": c.name,
14334 })
14335 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.operations.list", "request", internallog.HTTPRequest(req, nil))
14336 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14337 }
14338
14339 // Do executes the "gkeonprem.projects.locations.vmwareClusters.operations.list" call.
14340 // Any non-2xx status code is an error. Response headers are in either
14341 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
14342 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14343 // check whether the returned error was because http.StatusNotModified was
14344 // returned.
14345 func (c *ProjectsLocationsVmwareClustersOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
14346 gensupport.SetOptions(c.urlParams_, opts...)
14347 res, err := c.doRequest("json")
14348 if res != nil && res.StatusCode == http.StatusNotModified {
14349 if res.Body != nil {
14350 res.Body.Close()
14351 }
14352 return nil, gensupport.WrapError(&googleapi.Error{
14353 Code: res.StatusCode,
14354 Header: res.Header,
14355 })
14356 }
14357 if err != nil {
14358 return nil, err
14359 }
14360 defer googleapi.CloseBody(res)
14361 if err := googleapi.CheckResponse(res); err != nil {
14362 return nil, gensupport.WrapError(err)
14363 }
14364 ret := &ListOperationsResponse{
14365 ServerResponse: googleapi.ServerResponse{
14366 Header: res.Header,
14367 HTTPStatusCode: res.StatusCode,
14368 },
14369 }
14370 target := &ret
14371 b, err := gensupport.DecodeResponseBytes(target, res)
14372 if err != nil {
14373 return nil, err
14374 }
14375 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.operations.list", "response", internallog.HTTPResponse(res, b))
14376 return ret, nil
14377 }
14378
14379 // Pages invokes f for each page of results.
14380 // A non-nil error returned from f will halt the iteration.
14381 // The provided context supersedes any context provided to the Context method.
14382 func (c *ProjectsLocationsVmwareClustersOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
14383 c.ctx_ = ctx
14384 defer c.PageToken(c.urlParams_.Get("pageToken"))
14385 for {
14386 x, err := c.Do()
14387 if err != nil {
14388 return err
14389 }
14390 if err := f(x); err != nil {
14391 return err
14392 }
14393 if x.NextPageToken == "" {
14394 return nil
14395 }
14396 c.PageToken(x.NextPageToken)
14397 }
14398 }
14399
14400 type ProjectsLocationsVmwareClustersVmwareNodePoolsCreateCall struct {
14401 s *Service
14402 parent string
14403 vmwarenodepool *VmwareNodePool
14404 urlParams_ gensupport.URLParams
14405 ctx_ context.Context
14406 header_ http.Header
14407 }
14408
14409 // Create: Creates a new VMware node pool in a given project, location and
14410 // VMWare cluster.
14411 //
14412 // - parent: The parent resource where this node pool will be created.
14413 // projects/{project}/locations/{location}/vmwareClusters/{cluster}.
14414 func (r *ProjectsLocationsVmwareClustersVmwareNodePoolsService) Create(parent string, vmwarenodepool *VmwareNodePool) *ProjectsLocationsVmwareClustersVmwareNodePoolsCreateCall {
14415 c := &ProjectsLocationsVmwareClustersVmwareNodePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14416 c.parent = parent
14417 c.vmwarenodepool = vmwarenodepool
14418 return c
14419 }
14420
14421 // ValidateOnly sets the optional parameter "validateOnly": If set, only
14422 // validate the request, but do not actually create the node pool.
14423 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsVmwareClustersVmwareNodePoolsCreateCall {
14424 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
14425 return c
14426 }
14427
14428 // VmwareNodePoolId sets the optional parameter "vmwareNodePoolId": The ID to
14429 // use for the node pool, which will become the final component of the node
14430 // pool's resource name. This value must be up to 40 characters and follow
14431 // RFC-1123 (https://tools.ietf.org/html/rfc1123) format. The value must not be
14432 // permitted to be a UUID (or UUID-like: anything matching
14433 // /^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i).
14434 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsCreateCall) VmwareNodePoolId(vmwareNodePoolId string) *ProjectsLocationsVmwareClustersVmwareNodePoolsCreateCall {
14435 c.urlParams_.Set("vmwareNodePoolId", vmwareNodePoolId)
14436 return c
14437 }
14438
14439 // Fields allows partial responses to be retrieved. See
14440 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14441 // details.
14442 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersVmwareNodePoolsCreateCall {
14443 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14444 return c
14445 }
14446
14447 // Context sets the context to be used in this call's Do method.
14448 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsCreateCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersVmwareNodePoolsCreateCall {
14449 c.ctx_ = ctx
14450 return c
14451 }
14452
14453 // Header returns a http.Header that can be modified by the caller to add
14454 // headers to the request.
14455 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsCreateCall) Header() http.Header {
14456 if c.header_ == nil {
14457 c.header_ = make(http.Header)
14458 }
14459 return c.header_
14460 }
14461
14462 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) {
14463 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14464 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.vmwarenodepool)
14465 if err != nil {
14466 return nil, err
14467 }
14468 c.urlParams_.Set("alt", alt)
14469 c.urlParams_.Set("prettyPrint", "false")
14470 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/vmwareNodePools")
14471 urls += "?" + c.urlParams_.Encode()
14472 req, err := http.NewRequest("POST", urls, body)
14473 if err != nil {
14474 return nil, err
14475 }
14476 req.Header = reqHeaders
14477 googleapi.Expand(req.URL, map[string]string{
14478 "parent": c.parent,
14479 })
14480 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.create", "request", internallog.HTTPRequest(req, body.Bytes()))
14481 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14482 }
14483
14484 // Do executes the "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.create" call.
14485 // Any non-2xx status code is an error. Response headers are in either
14486 // *Operation.ServerResponse.Header or (if a response was returned at all) in
14487 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14488 // whether the returned error was because http.StatusNotModified was returned.
14489 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14490 gensupport.SetOptions(c.urlParams_, opts...)
14491 res, err := c.doRequest("json")
14492 if res != nil && res.StatusCode == http.StatusNotModified {
14493 if res.Body != nil {
14494 res.Body.Close()
14495 }
14496 return nil, gensupport.WrapError(&googleapi.Error{
14497 Code: res.StatusCode,
14498 Header: res.Header,
14499 })
14500 }
14501 if err != nil {
14502 return nil, err
14503 }
14504 defer googleapi.CloseBody(res)
14505 if err := googleapi.CheckResponse(res); err != nil {
14506 return nil, gensupport.WrapError(err)
14507 }
14508 ret := &Operation{
14509 ServerResponse: googleapi.ServerResponse{
14510 Header: res.Header,
14511 HTTPStatusCode: res.StatusCode,
14512 },
14513 }
14514 target := &ret
14515 b, err := gensupport.DecodeResponseBytes(target, res)
14516 if err != nil {
14517 return nil, err
14518 }
14519 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.create", "response", internallog.HTTPResponse(res, b))
14520 return ret, nil
14521 }
14522
14523 type ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteCall struct {
14524 s *Service
14525 name string
14526 urlParams_ gensupport.URLParams
14527 ctx_ context.Context
14528 header_ http.Header
14529 }
14530
14531 // Delete: Deletes a single VMware node pool.
14532 //
14533 // - name: The name of the node pool to delete. Format:
14534 // projects/{project}/locations/{location}/vmwareClusters/{cluster}/vmwareNode
14535 // Pools/{nodepool}.
14536 func (r *ProjectsLocationsVmwareClustersVmwareNodePoolsService) Delete(name string) *ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteCall {
14537 c := &ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14538 c.name = name
14539 return c
14540 }
14541
14542 // AllowMissing sets the optional parameter "allowMissing": If set to true, and
14543 // the VMware node pool is not found, the request will succeed but no action
14544 // will be taken on the server and return a completed LRO.
14545 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteCall) AllowMissing(allowMissing bool) *ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteCall {
14546 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
14547 return c
14548 }
14549
14550 // Etag sets the optional parameter "etag": The current etag of the
14551 // VmwareNodePool. If an etag is provided and does not match the current etag
14552 // of the node pool, deletion will be blocked and an ABORTED error will be
14553 // returned.
14554 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteCall) Etag(etag string) *ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteCall {
14555 c.urlParams_.Set("etag", etag)
14556 return c
14557 }
14558
14559 // IgnoreErrors sets the optional parameter "ignoreErrors": If set to true, the
14560 // deletion of a VMware node pool resource will succeed even if errors occur
14561 // during deletion. This parameter can be used when you want to delete GCP's
14562 // node pool resource and you've already deleted the on-prem admin cluster that
14563 // hosted your node pool. WARNING: Using this parameter when your user cluster
14564 // still exists may result in a deleted GCP node pool but an existing on-prem
14565 // node pool.
14566 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteCall) IgnoreErrors(ignoreErrors bool) *ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteCall {
14567 c.urlParams_.Set("ignoreErrors", fmt.Sprint(ignoreErrors))
14568 return c
14569 }
14570
14571 // ValidateOnly sets the optional parameter "validateOnly": If set, only
14572 // validate the request, but do not actually delete the node pool.
14573 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteCall {
14574 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
14575 return c
14576 }
14577
14578 // Fields allows partial responses to be retrieved. See
14579 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14580 // details.
14581 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteCall {
14582 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14583 return c
14584 }
14585
14586 // Context sets the context to be used in this call's Do method.
14587 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteCall {
14588 c.ctx_ = ctx
14589 return c
14590 }
14591
14592 // Header returns a http.Header that can be modified by the caller to add
14593 // headers to the request.
14594 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteCall) Header() http.Header {
14595 if c.header_ == nil {
14596 c.header_ = make(http.Header)
14597 }
14598 return c.header_
14599 }
14600
14601 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
14602 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14603 c.urlParams_.Set("alt", alt)
14604 c.urlParams_.Set("prettyPrint", "false")
14605 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
14606 urls += "?" + c.urlParams_.Encode()
14607 req, err := http.NewRequest("DELETE", urls, nil)
14608 if err != nil {
14609 return nil, err
14610 }
14611 req.Header = reqHeaders
14612 googleapi.Expand(req.URL, map[string]string{
14613 "name": c.name,
14614 })
14615 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.delete", "request", internallog.HTTPRequest(req, nil))
14616 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14617 }
14618
14619 // Do executes the "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.delete" call.
14620 // Any non-2xx status code is an error. Response headers are in either
14621 // *Operation.ServerResponse.Header or (if a response was returned at all) in
14622 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14623 // whether the returned error was because http.StatusNotModified was returned.
14624 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14625 gensupport.SetOptions(c.urlParams_, opts...)
14626 res, err := c.doRequest("json")
14627 if res != nil && res.StatusCode == http.StatusNotModified {
14628 if res.Body != nil {
14629 res.Body.Close()
14630 }
14631 return nil, gensupport.WrapError(&googleapi.Error{
14632 Code: res.StatusCode,
14633 Header: res.Header,
14634 })
14635 }
14636 if err != nil {
14637 return nil, err
14638 }
14639 defer googleapi.CloseBody(res)
14640 if err := googleapi.CheckResponse(res); err != nil {
14641 return nil, gensupport.WrapError(err)
14642 }
14643 ret := &Operation{
14644 ServerResponse: googleapi.ServerResponse{
14645 Header: res.Header,
14646 HTTPStatusCode: res.StatusCode,
14647 },
14648 }
14649 target := &ret
14650 b, err := gensupport.DecodeResponseBytes(target, res)
14651 if err != nil {
14652 return nil, err
14653 }
14654 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.delete", "response", internallog.HTTPResponse(res, b))
14655 return ret, nil
14656 }
14657
14658 type ProjectsLocationsVmwareClustersVmwareNodePoolsEnrollCall struct {
14659 s *Service
14660 parent string
14661 enrollvmwarenodepoolrequest *EnrollVmwareNodePoolRequest
14662 urlParams_ gensupport.URLParams
14663 ctx_ context.Context
14664 header_ http.Header
14665 }
14666
14667 // Enroll: Enrolls a VMware node pool to Anthos On-Prem API
14668 //
14669 // - parent: The parent resource where the node pool is enrolled in.
14670 func (r *ProjectsLocationsVmwareClustersVmwareNodePoolsService) Enroll(parent string, enrollvmwarenodepoolrequest *EnrollVmwareNodePoolRequest) *ProjectsLocationsVmwareClustersVmwareNodePoolsEnrollCall {
14671 c := &ProjectsLocationsVmwareClustersVmwareNodePoolsEnrollCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14672 c.parent = parent
14673 c.enrollvmwarenodepoolrequest = enrollvmwarenodepoolrequest
14674 return c
14675 }
14676
14677 // Fields allows partial responses to be retrieved. See
14678 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14679 // details.
14680 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsEnrollCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersVmwareNodePoolsEnrollCall {
14681 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14682 return c
14683 }
14684
14685 // Context sets the context to be used in this call's Do method.
14686 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsEnrollCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersVmwareNodePoolsEnrollCall {
14687 c.ctx_ = ctx
14688 return c
14689 }
14690
14691 // Header returns a http.Header that can be modified by the caller to add
14692 // headers to the request.
14693 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsEnrollCall) Header() http.Header {
14694 if c.header_ == nil {
14695 c.header_ = make(http.Header)
14696 }
14697 return c.header_
14698 }
14699
14700 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsEnrollCall) doRequest(alt string) (*http.Response, error) {
14701 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14702 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.enrollvmwarenodepoolrequest)
14703 if err != nil {
14704 return nil, err
14705 }
14706 c.urlParams_.Set("alt", alt)
14707 c.urlParams_.Set("prettyPrint", "false")
14708 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/vmwareNodePools:enroll")
14709 urls += "?" + c.urlParams_.Encode()
14710 req, err := http.NewRequest("POST", urls, body)
14711 if err != nil {
14712 return nil, err
14713 }
14714 req.Header = reqHeaders
14715 googleapi.Expand(req.URL, map[string]string{
14716 "parent": c.parent,
14717 })
14718 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.enroll", "request", internallog.HTTPRequest(req, body.Bytes()))
14719 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14720 }
14721
14722 // Do executes the "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.enroll" call.
14723 // Any non-2xx status code is an error. Response headers are in either
14724 // *Operation.ServerResponse.Header or (if a response was returned at all) in
14725 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14726 // whether the returned error was because http.StatusNotModified was returned.
14727 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsEnrollCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14728 gensupport.SetOptions(c.urlParams_, opts...)
14729 res, err := c.doRequest("json")
14730 if res != nil && res.StatusCode == http.StatusNotModified {
14731 if res.Body != nil {
14732 res.Body.Close()
14733 }
14734 return nil, gensupport.WrapError(&googleapi.Error{
14735 Code: res.StatusCode,
14736 Header: res.Header,
14737 })
14738 }
14739 if err != nil {
14740 return nil, err
14741 }
14742 defer googleapi.CloseBody(res)
14743 if err := googleapi.CheckResponse(res); err != nil {
14744 return nil, gensupport.WrapError(err)
14745 }
14746 ret := &Operation{
14747 ServerResponse: googleapi.ServerResponse{
14748 Header: res.Header,
14749 HTTPStatusCode: res.StatusCode,
14750 },
14751 }
14752 target := &ret
14753 b, err := gensupport.DecodeResponseBytes(target, res)
14754 if err != nil {
14755 return nil, err
14756 }
14757 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.enroll", "response", internallog.HTTPResponse(res, b))
14758 return ret, nil
14759 }
14760
14761 type ProjectsLocationsVmwareClustersVmwareNodePoolsGetCall struct {
14762 s *Service
14763 name string
14764 urlParams_ gensupport.URLParams
14765 ifNoneMatch_ string
14766 ctx_ context.Context
14767 header_ http.Header
14768 }
14769
14770 // Get: Gets details of a single VMware node pool.
14771 //
14772 // - name: The name of the node pool to retrieve.
14773 // projects/{project}/locations/{location}/vmwareClusters/{cluster}/vmwareNode
14774 // Pools/{nodepool}.
14775 func (r *ProjectsLocationsVmwareClustersVmwareNodePoolsService) Get(name string) *ProjectsLocationsVmwareClustersVmwareNodePoolsGetCall {
14776 c := &ProjectsLocationsVmwareClustersVmwareNodePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14777 c.name = name
14778 return c
14779 }
14780
14781 // View sets the optional parameter "view": View for VMware node pool. When
14782 // `BASIC` is specified, only the node pool resource name is returned. The
14783 // default/unset value `NODE_POOL_VIEW_UNSPECIFIED` is the same as `FULL',
14784 // which returns the complete node pool configuration details.
14785 //
14786 // Possible values:
14787 //
14788 // "NODE_POOL_VIEW_UNSPECIFIED" - If the value is not set, the default `FULL`
14789 //
14790 // view is used.
14791 //
14792 // "BASIC" - Includes basic information of a node pool resource including
14793 //
14794 // node pool resource name.
14795 //
14796 // "FULL" - Includes the complete configuration for VMware node pool
14797 //
14798 // resource. This is the default value for GetVmwareNodePoolRequest method.
14799 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsGetCall) View(view string) *ProjectsLocationsVmwareClustersVmwareNodePoolsGetCall {
14800 c.urlParams_.Set("view", view)
14801 return c
14802 }
14803
14804 // Fields allows partial responses to be retrieved. See
14805 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14806 // details.
14807 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersVmwareNodePoolsGetCall {
14808 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14809 return c
14810 }
14811
14812 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14813 // object's ETag matches the given value. This is useful for getting updates
14814 // only after the object has changed since the last request.
14815 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVmwareClustersVmwareNodePoolsGetCall {
14816 c.ifNoneMatch_ = entityTag
14817 return c
14818 }
14819
14820 // Context sets the context to be used in this call's Do method.
14821 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsGetCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersVmwareNodePoolsGetCall {
14822 c.ctx_ = ctx
14823 return c
14824 }
14825
14826 // Header returns a http.Header that can be modified by the caller to add
14827 // headers to the request.
14828 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsGetCall) Header() http.Header {
14829 if c.header_ == nil {
14830 c.header_ = make(http.Header)
14831 }
14832 return c.header_
14833 }
14834
14835 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsGetCall) doRequest(alt string) (*http.Response, error) {
14836 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14837 if c.ifNoneMatch_ != "" {
14838 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14839 }
14840 c.urlParams_.Set("alt", alt)
14841 c.urlParams_.Set("prettyPrint", "false")
14842 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
14843 urls += "?" + c.urlParams_.Encode()
14844 req, err := http.NewRequest("GET", urls, nil)
14845 if err != nil {
14846 return nil, err
14847 }
14848 req.Header = reqHeaders
14849 googleapi.Expand(req.URL, map[string]string{
14850 "name": c.name,
14851 })
14852 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.get", "request", internallog.HTTPRequest(req, nil))
14853 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14854 }
14855
14856 // Do executes the "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.get" call.
14857 // Any non-2xx status code is an error. Response headers are in either
14858 // *VmwareNodePool.ServerResponse.Header or (if a response was returned at all)
14859 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14860 // whether the returned error was because http.StatusNotModified was returned.
14861 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsGetCall) Do(opts ...googleapi.CallOption) (*VmwareNodePool, error) {
14862 gensupport.SetOptions(c.urlParams_, opts...)
14863 res, err := c.doRequest("json")
14864 if res != nil && res.StatusCode == http.StatusNotModified {
14865 if res.Body != nil {
14866 res.Body.Close()
14867 }
14868 return nil, gensupport.WrapError(&googleapi.Error{
14869 Code: res.StatusCode,
14870 Header: res.Header,
14871 })
14872 }
14873 if err != nil {
14874 return nil, err
14875 }
14876 defer googleapi.CloseBody(res)
14877 if err := googleapi.CheckResponse(res); err != nil {
14878 return nil, gensupport.WrapError(err)
14879 }
14880 ret := &VmwareNodePool{
14881 ServerResponse: googleapi.ServerResponse{
14882 Header: res.Header,
14883 HTTPStatusCode: res.StatusCode,
14884 },
14885 }
14886 target := &ret
14887 b, err := gensupport.DecodeResponseBytes(target, res)
14888 if err != nil {
14889 return nil, err
14890 }
14891 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.get", "response", internallog.HTTPResponse(res, b))
14892 return ret, nil
14893 }
14894
14895 type ProjectsLocationsVmwareClustersVmwareNodePoolsGetIamPolicyCall struct {
14896 s *Service
14897 resource string
14898 urlParams_ gensupport.URLParams
14899 ifNoneMatch_ string
14900 ctx_ context.Context
14901 header_ http.Header
14902 }
14903
14904 // GetIamPolicy: Gets the access control policy for a resource. Returns an
14905 // empty policy if the resource exists and does not have a policy set.
14906 //
14907 // - resource: REQUIRED: The resource for which the policy is being requested.
14908 // See Resource names (https://cloud.google.com/apis/design/resource_names)
14909 // for the appropriate value for this field.
14910 func (r *ProjectsLocationsVmwareClustersVmwareNodePoolsService) GetIamPolicy(resource string) *ProjectsLocationsVmwareClustersVmwareNodePoolsGetIamPolicyCall {
14911 c := &ProjectsLocationsVmwareClustersVmwareNodePoolsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14912 c.resource = resource
14913 return c
14914 }
14915
14916 // OptionsRequestedPolicyVersion sets the optional parameter
14917 // "options.requestedPolicyVersion": The maximum policy version that will be
14918 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
14919 // an invalid value will be rejected. Requests for policies with any
14920 // conditional role bindings must specify version 3. Policies with no
14921 // conditional role bindings may specify any valid value or leave the field
14922 // unset. The policy in the response might use the policy version that you
14923 // specified, or it might use a lower policy version. For example, if you
14924 // specify version 3, but the policy has no conditional role bindings, the
14925 // response uses version 1. To learn which resources support conditions in
14926 // their IAM policies, see the IAM documentation
14927 // (https://cloud.google.com/iam/help/conditions/resource-policies).
14928 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsVmwareClustersVmwareNodePoolsGetIamPolicyCall {
14929 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
14930 return c
14931 }
14932
14933 // Fields allows partial responses to be retrieved. See
14934 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14935 // details.
14936 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersVmwareNodePoolsGetIamPolicyCall {
14937 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14938 return c
14939 }
14940
14941 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14942 // object's ETag matches the given value. This is useful for getting updates
14943 // only after the object has changed since the last request.
14944 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsVmwareClustersVmwareNodePoolsGetIamPolicyCall {
14945 c.ifNoneMatch_ = entityTag
14946 return c
14947 }
14948
14949 // Context sets the context to be used in this call's Do method.
14950 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersVmwareNodePoolsGetIamPolicyCall {
14951 c.ctx_ = ctx
14952 return c
14953 }
14954
14955 // Header returns a http.Header that can be modified by the caller to add
14956 // headers to the request.
14957 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsGetIamPolicyCall) Header() http.Header {
14958 if c.header_ == nil {
14959 c.header_ = make(http.Header)
14960 }
14961 return c.header_
14962 }
14963
14964 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
14965 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14966 if c.ifNoneMatch_ != "" {
14967 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14968 }
14969 c.urlParams_.Set("alt", alt)
14970 c.urlParams_.Set("prettyPrint", "false")
14971 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
14972 urls += "?" + c.urlParams_.Encode()
14973 req, err := http.NewRequest("GET", urls, nil)
14974 if err != nil {
14975 return nil, err
14976 }
14977 req.Header = reqHeaders
14978 googleapi.Expand(req.URL, map[string]string{
14979 "resource": c.resource,
14980 })
14981 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
14982 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14983 }
14984
14985 // Do executes the "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.getIamPolicy" call.
14986 // Any non-2xx status code is an error. Response headers are in either
14987 // *Policy.ServerResponse.Header or (if a response was returned at all) in
14988 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14989 // whether the returned error was because http.StatusNotModified was returned.
14990 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
14991 gensupport.SetOptions(c.urlParams_, opts...)
14992 res, err := c.doRequest("json")
14993 if res != nil && res.StatusCode == http.StatusNotModified {
14994 if res.Body != nil {
14995 res.Body.Close()
14996 }
14997 return nil, gensupport.WrapError(&googleapi.Error{
14998 Code: res.StatusCode,
14999 Header: res.Header,
15000 })
15001 }
15002 if err != nil {
15003 return nil, err
15004 }
15005 defer googleapi.CloseBody(res)
15006 if err := googleapi.CheckResponse(res); err != nil {
15007 return nil, gensupport.WrapError(err)
15008 }
15009 ret := &Policy{
15010 ServerResponse: googleapi.ServerResponse{
15011 Header: res.Header,
15012 HTTPStatusCode: res.StatusCode,
15013 },
15014 }
15015 target := &ret
15016 b, err := gensupport.DecodeResponseBytes(target, res)
15017 if err != nil {
15018 return nil, err
15019 }
15020 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.getIamPolicy", "response", internallog.HTTPResponse(res, b))
15021 return ret, nil
15022 }
15023
15024 type ProjectsLocationsVmwareClustersVmwareNodePoolsListCall struct {
15025 s *Service
15026 parent string
15027 urlParams_ gensupport.URLParams
15028 ifNoneMatch_ string
15029 ctx_ context.Context
15030 header_ http.Header
15031 }
15032
15033 // List: Lists VMware node pools in a given project, location and VMWare
15034 // cluster.
15035 //
15036 // - parent: The parent, which owns this collection of node pools. Format:
15037 // projects/{project}/locations/{location}/vmwareClusters/{vmwareCluster}.
15038 func (r *ProjectsLocationsVmwareClustersVmwareNodePoolsService) List(parent string) *ProjectsLocationsVmwareClustersVmwareNodePoolsListCall {
15039 c := &ProjectsLocationsVmwareClustersVmwareNodePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15040 c.parent = parent
15041 return c
15042 }
15043
15044 // PageSize sets the optional parameter "pageSize": The maximum number of node
15045 // pools to return. The service may return fewer than this value. If
15046 // unspecified, at most 50 node pools will be returned. The maximum value is
15047 // 1000; values above 1000 will be coerced to 1000.
15048 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsListCall) PageSize(pageSize int64) *ProjectsLocationsVmwareClustersVmwareNodePoolsListCall {
15049 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15050 return c
15051 }
15052
15053 // PageToken sets the optional parameter "pageToken": A page token, received
15054 // from a previous `ListVmwareNodePools` call. Provide this to retrieve the
15055 // subsequent page. When paginating, all other parameters provided to
15056 // `ListVmwareNodePools` must match the call that provided the page token.
15057 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsListCall) PageToken(pageToken string) *ProjectsLocationsVmwareClustersVmwareNodePoolsListCall {
15058 c.urlParams_.Set("pageToken", pageToken)
15059 return c
15060 }
15061
15062 // View sets the optional parameter "view": View for VMware node pools. When
15063 // `BASIC` is specified, only the node pool resource name is returned. The
15064 // default/unset value `NODE_POOL_VIEW_UNSPECIFIED` is the same as `FULL',
15065 // which returns the complete node pool configuration details.
15066 //
15067 // Possible values:
15068 //
15069 // "NODE_POOL_VIEW_UNSPECIFIED" - If the value is not set, the default `FULL`
15070 //
15071 // view is used.
15072 //
15073 // "BASIC" - Includes basic information of a node pool resource including
15074 //
15075 // node pool resource name.
15076 //
15077 // "FULL" - Includes the complete configuration for VMware node pool
15078 //
15079 // resource. This is the default value for ListVmwareNodePoolsRequest method.
15080 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsListCall) View(view string) *ProjectsLocationsVmwareClustersVmwareNodePoolsListCall {
15081 c.urlParams_.Set("view", view)
15082 return c
15083 }
15084
15085 // Fields allows partial responses to be retrieved. See
15086 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15087 // details.
15088 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersVmwareNodePoolsListCall {
15089 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15090 return c
15091 }
15092
15093 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15094 // object's ETag matches the given value. This is useful for getting updates
15095 // only after the object has changed since the last request.
15096 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVmwareClustersVmwareNodePoolsListCall {
15097 c.ifNoneMatch_ = entityTag
15098 return c
15099 }
15100
15101 // Context sets the context to be used in this call's Do method.
15102 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsListCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersVmwareNodePoolsListCall {
15103 c.ctx_ = ctx
15104 return c
15105 }
15106
15107 // Header returns a http.Header that can be modified by the caller to add
15108 // headers to the request.
15109 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsListCall) Header() http.Header {
15110 if c.header_ == nil {
15111 c.header_ = make(http.Header)
15112 }
15113 return c.header_
15114 }
15115
15116 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsListCall) doRequest(alt string) (*http.Response, error) {
15117 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15118 if c.ifNoneMatch_ != "" {
15119 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15120 }
15121 c.urlParams_.Set("alt", alt)
15122 c.urlParams_.Set("prettyPrint", "false")
15123 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/vmwareNodePools")
15124 urls += "?" + c.urlParams_.Encode()
15125 req, err := http.NewRequest("GET", urls, nil)
15126 if err != nil {
15127 return nil, err
15128 }
15129 req.Header = reqHeaders
15130 googleapi.Expand(req.URL, map[string]string{
15131 "parent": c.parent,
15132 })
15133 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.list", "request", internallog.HTTPRequest(req, nil))
15134 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15135 }
15136
15137 // Do executes the "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.list" call.
15138 // Any non-2xx status code is an error. Response headers are in either
15139 // *ListVmwareNodePoolsResponse.ServerResponse.Header or (if a response was
15140 // returned at all) in error.(*googleapi.Error).Header. Use
15141 // googleapi.IsNotModified to check whether the returned error was because
15142 // http.StatusNotModified was returned.
15143 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsListCall) Do(opts ...googleapi.CallOption) (*ListVmwareNodePoolsResponse, error) {
15144 gensupport.SetOptions(c.urlParams_, opts...)
15145 res, err := c.doRequest("json")
15146 if res != nil && res.StatusCode == http.StatusNotModified {
15147 if res.Body != nil {
15148 res.Body.Close()
15149 }
15150 return nil, gensupport.WrapError(&googleapi.Error{
15151 Code: res.StatusCode,
15152 Header: res.Header,
15153 })
15154 }
15155 if err != nil {
15156 return nil, err
15157 }
15158 defer googleapi.CloseBody(res)
15159 if err := googleapi.CheckResponse(res); err != nil {
15160 return nil, gensupport.WrapError(err)
15161 }
15162 ret := &ListVmwareNodePoolsResponse{
15163 ServerResponse: googleapi.ServerResponse{
15164 Header: res.Header,
15165 HTTPStatusCode: res.StatusCode,
15166 },
15167 }
15168 target := &ret
15169 b, err := gensupport.DecodeResponseBytes(target, res)
15170 if err != nil {
15171 return nil, err
15172 }
15173 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.list", "response", internallog.HTTPResponse(res, b))
15174 return ret, nil
15175 }
15176
15177 // Pages invokes f for each page of results.
15178 // A non-nil error returned from f will halt the iteration.
15179 // The provided context supersedes any context provided to the Context method.
15180 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsListCall) Pages(ctx context.Context, f func(*ListVmwareNodePoolsResponse) error) error {
15181 c.ctx_ = ctx
15182 defer c.PageToken(c.urlParams_.Get("pageToken"))
15183 for {
15184 x, err := c.Do()
15185 if err != nil {
15186 return err
15187 }
15188 if err := f(x); err != nil {
15189 return err
15190 }
15191 if x.NextPageToken == "" {
15192 return nil
15193 }
15194 c.PageToken(x.NextPageToken)
15195 }
15196 }
15197
15198 type ProjectsLocationsVmwareClustersVmwareNodePoolsPatchCall struct {
15199 s *Service
15200 name string
15201 vmwarenodepool *VmwareNodePool
15202 urlParams_ gensupport.URLParams
15203 ctx_ context.Context
15204 header_ http.Header
15205 }
15206
15207 // Patch: Updates the parameters of a single VMware node pool.
15208 //
15209 // - name: Immutable. The resource name of this node pool.
15210 func (r *ProjectsLocationsVmwareClustersVmwareNodePoolsService) Patch(name string, vmwarenodepool *VmwareNodePool) *ProjectsLocationsVmwareClustersVmwareNodePoolsPatchCall {
15211 c := &ProjectsLocationsVmwareClustersVmwareNodePoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15212 c.name = name
15213 c.vmwarenodepool = vmwarenodepool
15214 return c
15215 }
15216
15217 // UpdateMask sets the optional parameter "updateMask": Required. Field mask is
15218 // used to specify the fields to be overwritten in the VMwareNodePool resource
15219 // by the update. The fields specified in the update_mask are relative to the
15220 // resource, not the full request. A field will be overwritten if it is in the
15221 // mask. If the user does not provide a mask then all populated fields in the
15222 // VMwareNodePool message will be updated. Empty fields will be ignored unless
15223 // a field mask is used.
15224 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsVmwareClustersVmwareNodePoolsPatchCall {
15225 c.urlParams_.Set("updateMask", updateMask)
15226 return c
15227 }
15228
15229 // ValidateOnly sets the optional parameter "validateOnly": Validate the
15230 // request without actually doing any updates.
15231 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsVmwareClustersVmwareNodePoolsPatchCall {
15232 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
15233 return c
15234 }
15235
15236 // Fields allows partial responses to be retrieved. See
15237 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15238 // details.
15239 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersVmwareNodePoolsPatchCall {
15240 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15241 return c
15242 }
15243
15244 // Context sets the context to be used in this call's Do method.
15245 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsPatchCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersVmwareNodePoolsPatchCall {
15246 c.ctx_ = ctx
15247 return c
15248 }
15249
15250 // Header returns a http.Header that can be modified by the caller to add
15251 // headers to the request.
15252 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsPatchCall) Header() http.Header {
15253 if c.header_ == nil {
15254 c.header_ = make(http.Header)
15255 }
15256 return c.header_
15257 }
15258
15259 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsPatchCall) doRequest(alt string) (*http.Response, error) {
15260 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15261 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.vmwarenodepool)
15262 if err != nil {
15263 return nil, err
15264 }
15265 c.urlParams_.Set("alt", alt)
15266 c.urlParams_.Set("prettyPrint", "false")
15267 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
15268 urls += "?" + c.urlParams_.Encode()
15269 req, err := http.NewRequest("PATCH", urls, body)
15270 if err != nil {
15271 return nil, err
15272 }
15273 req.Header = reqHeaders
15274 googleapi.Expand(req.URL, map[string]string{
15275 "name": c.name,
15276 })
15277 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
15278 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15279 }
15280
15281 // Do executes the "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.patch" call.
15282 // Any non-2xx status code is an error. Response headers are in either
15283 // *Operation.ServerResponse.Header or (if a response was returned at all) in
15284 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15285 // whether the returned error was because http.StatusNotModified was returned.
15286 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15287 gensupport.SetOptions(c.urlParams_, opts...)
15288 res, err := c.doRequest("json")
15289 if res != nil && res.StatusCode == http.StatusNotModified {
15290 if res.Body != nil {
15291 res.Body.Close()
15292 }
15293 return nil, gensupport.WrapError(&googleapi.Error{
15294 Code: res.StatusCode,
15295 Header: res.Header,
15296 })
15297 }
15298 if err != nil {
15299 return nil, err
15300 }
15301 defer googleapi.CloseBody(res)
15302 if err := googleapi.CheckResponse(res); err != nil {
15303 return nil, gensupport.WrapError(err)
15304 }
15305 ret := &Operation{
15306 ServerResponse: googleapi.ServerResponse{
15307 Header: res.Header,
15308 HTTPStatusCode: res.StatusCode,
15309 },
15310 }
15311 target := &ret
15312 b, err := gensupport.DecodeResponseBytes(target, res)
15313 if err != nil {
15314 return nil, err
15315 }
15316 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.patch", "response", internallog.HTTPResponse(res, b))
15317 return ret, nil
15318 }
15319
15320 type ProjectsLocationsVmwareClustersVmwareNodePoolsSetIamPolicyCall struct {
15321 s *Service
15322 resource string
15323 setiampolicyrequest *SetIamPolicyRequest
15324 urlParams_ gensupport.URLParams
15325 ctx_ context.Context
15326 header_ http.Header
15327 }
15328
15329 // SetIamPolicy: Sets the access control policy on the specified resource.
15330 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
15331 // and `PERMISSION_DENIED` errors.
15332 //
15333 // - resource: REQUIRED: The resource for which the policy is being specified.
15334 // See Resource names (https://cloud.google.com/apis/design/resource_names)
15335 // for the appropriate value for this field.
15336 func (r *ProjectsLocationsVmwareClustersVmwareNodePoolsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsVmwareClustersVmwareNodePoolsSetIamPolicyCall {
15337 c := &ProjectsLocationsVmwareClustersVmwareNodePoolsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15338 c.resource = resource
15339 c.setiampolicyrequest = setiampolicyrequest
15340 return c
15341 }
15342
15343 // Fields allows partial responses to be retrieved. See
15344 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15345 // details.
15346 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersVmwareNodePoolsSetIamPolicyCall {
15347 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15348 return c
15349 }
15350
15351 // Context sets the context to be used in this call's Do method.
15352 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersVmwareNodePoolsSetIamPolicyCall {
15353 c.ctx_ = ctx
15354 return c
15355 }
15356
15357 // Header returns a http.Header that can be modified by the caller to add
15358 // headers to the request.
15359 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsSetIamPolicyCall) Header() http.Header {
15360 if c.header_ == nil {
15361 c.header_ = make(http.Header)
15362 }
15363 return c.header_
15364 }
15365
15366 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
15367 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15368 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
15369 if err != nil {
15370 return nil, err
15371 }
15372 c.urlParams_.Set("alt", alt)
15373 c.urlParams_.Set("prettyPrint", "false")
15374 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
15375 urls += "?" + c.urlParams_.Encode()
15376 req, err := http.NewRequest("POST", urls, body)
15377 if err != nil {
15378 return nil, err
15379 }
15380 req.Header = reqHeaders
15381 googleapi.Expand(req.URL, map[string]string{
15382 "resource": c.resource,
15383 })
15384 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
15385 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15386 }
15387
15388 // Do executes the "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.setIamPolicy" call.
15389 // Any non-2xx status code is an error. Response headers are in either
15390 // *Policy.ServerResponse.Header or (if a response was returned at all) in
15391 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15392 // whether the returned error was because http.StatusNotModified was returned.
15393 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
15394 gensupport.SetOptions(c.urlParams_, opts...)
15395 res, err := c.doRequest("json")
15396 if res != nil && res.StatusCode == http.StatusNotModified {
15397 if res.Body != nil {
15398 res.Body.Close()
15399 }
15400 return nil, gensupport.WrapError(&googleapi.Error{
15401 Code: res.StatusCode,
15402 Header: res.Header,
15403 })
15404 }
15405 if err != nil {
15406 return nil, err
15407 }
15408 defer googleapi.CloseBody(res)
15409 if err := googleapi.CheckResponse(res); err != nil {
15410 return nil, gensupport.WrapError(err)
15411 }
15412 ret := &Policy{
15413 ServerResponse: googleapi.ServerResponse{
15414 Header: res.Header,
15415 HTTPStatusCode: res.StatusCode,
15416 },
15417 }
15418 target := &ret
15419 b, err := gensupport.DecodeResponseBytes(target, res)
15420 if err != nil {
15421 return nil, err
15422 }
15423 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.setIamPolicy", "response", internallog.HTTPResponse(res, b))
15424 return ret, nil
15425 }
15426
15427 type ProjectsLocationsVmwareClustersVmwareNodePoolsTestIamPermissionsCall struct {
15428 s *Service
15429 resource string
15430 testiampermissionsrequest *TestIamPermissionsRequest
15431 urlParams_ gensupport.URLParams
15432 ctx_ context.Context
15433 header_ http.Header
15434 }
15435
15436 // TestIamPermissions: Returns permissions that a caller has on the specified
15437 // resource. If the resource does not exist, this will return an empty set of
15438 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
15439 // used for building permission-aware UIs and command-line tools, not for
15440 // authorization checking. This operation may "fail open" without warning.
15441 //
15442 // - resource: REQUIRED: The resource for which the policy detail is being
15443 // requested. See Resource names
15444 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
15445 // value for this field.
15446 func (r *ProjectsLocationsVmwareClustersVmwareNodePoolsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsVmwareClustersVmwareNodePoolsTestIamPermissionsCall {
15447 c := &ProjectsLocationsVmwareClustersVmwareNodePoolsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15448 c.resource = resource
15449 c.testiampermissionsrequest = testiampermissionsrequest
15450 return c
15451 }
15452
15453 // Fields allows partial responses to be retrieved. See
15454 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15455 // details.
15456 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersVmwareNodePoolsTestIamPermissionsCall {
15457 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15458 return c
15459 }
15460
15461 // Context sets the context to be used in this call's Do method.
15462 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersVmwareNodePoolsTestIamPermissionsCall {
15463 c.ctx_ = ctx
15464 return c
15465 }
15466
15467 // Header returns a http.Header that can be modified by the caller to add
15468 // headers to the request.
15469 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsTestIamPermissionsCall) Header() http.Header {
15470 if c.header_ == nil {
15471 c.header_ = make(http.Header)
15472 }
15473 return c.header_
15474 }
15475
15476 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
15477 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15478 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
15479 if err != nil {
15480 return nil, err
15481 }
15482 c.urlParams_.Set("alt", alt)
15483 c.urlParams_.Set("prettyPrint", "false")
15484 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
15485 urls += "?" + c.urlParams_.Encode()
15486 req, err := http.NewRequest("POST", urls, body)
15487 if err != nil {
15488 return nil, err
15489 }
15490 req.Header = reqHeaders
15491 googleapi.Expand(req.URL, map[string]string{
15492 "resource": c.resource,
15493 })
15494 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
15495 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15496 }
15497
15498 // Do executes the "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.testIamPermissions" call.
15499 // Any non-2xx status code is an error. Response headers are in either
15500 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
15501 // returned at all) in error.(*googleapi.Error).Header. Use
15502 // googleapi.IsNotModified to check whether the returned error was because
15503 // http.StatusNotModified was returned.
15504 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
15505 gensupport.SetOptions(c.urlParams_, opts...)
15506 res, err := c.doRequest("json")
15507 if res != nil && res.StatusCode == http.StatusNotModified {
15508 if res.Body != nil {
15509 res.Body.Close()
15510 }
15511 return nil, gensupport.WrapError(&googleapi.Error{
15512 Code: res.StatusCode,
15513 Header: res.Header,
15514 })
15515 }
15516 if err != nil {
15517 return nil, err
15518 }
15519 defer googleapi.CloseBody(res)
15520 if err := googleapi.CheckResponse(res); err != nil {
15521 return nil, gensupport.WrapError(err)
15522 }
15523 ret := &TestIamPermissionsResponse{
15524 ServerResponse: googleapi.ServerResponse{
15525 Header: res.Header,
15526 HTTPStatusCode: res.StatusCode,
15527 },
15528 }
15529 target := &ret
15530 b, err := gensupport.DecodeResponseBytes(target, res)
15531 if err != nil {
15532 return nil, err
15533 }
15534 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.testIamPermissions", "response", internallog.HTTPResponse(res, b))
15535 return ret, nil
15536 }
15537
15538 type ProjectsLocationsVmwareClustersVmwareNodePoolsUnenrollCall struct {
15539 s *Service
15540 name string
15541 urlParams_ gensupport.URLParams
15542 ctx_ context.Context
15543 header_ http.Header
15544 }
15545
15546 // Unenroll: Unenrolls a VMware node pool to Anthos On-Prem API
15547 //
15548 // - name: The name of the node pool to unenroll. Format:
15549 // projects/{project}/locations/{location}/vmwareClusters/{cluster}/vmwareNode
15550 // Pools/{nodepool}.
15551 func (r *ProjectsLocationsVmwareClustersVmwareNodePoolsService) Unenroll(name string) *ProjectsLocationsVmwareClustersVmwareNodePoolsUnenrollCall {
15552 c := &ProjectsLocationsVmwareClustersVmwareNodePoolsUnenrollCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15553 c.name = name
15554 return c
15555 }
15556
15557 // AllowMissing sets the optional parameter "allowMissing": If set to true, and
15558 // the VMware node pool is not found, the request will succeed but no action
15559 // will be taken on the server and return a completed LRO.
15560 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsUnenrollCall) AllowMissing(allowMissing bool) *ProjectsLocationsVmwareClustersVmwareNodePoolsUnenrollCall {
15561 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
15562 return c
15563 }
15564
15565 // Etag sets the optional parameter "etag": The current etag of the VMware node
15566 // pool. If an etag is provided and does not match the current etag of node
15567 // pool, deletion will be blocked and an ABORTED error will be returned.
15568 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsUnenrollCall) Etag(etag string) *ProjectsLocationsVmwareClustersVmwareNodePoolsUnenrollCall {
15569 c.urlParams_.Set("etag", etag)
15570 return c
15571 }
15572
15573 // ValidateOnly sets the optional parameter "validateOnly": If set, only
15574 // validate the request, but do not actually unenroll the node pool.
15575 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsUnenrollCall) ValidateOnly(validateOnly bool) *ProjectsLocationsVmwareClustersVmwareNodePoolsUnenrollCall {
15576 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
15577 return c
15578 }
15579
15580 // Fields allows partial responses to be retrieved. See
15581 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15582 // details.
15583 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsUnenrollCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersVmwareNodePoolsUnenrollCall {
15584 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15585 return c
15586 }
15587
15588 // Context sets the context to be used in this call's Do method.
15589 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsUnenrollCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersVmwareNodePoolsUnenrollCall {
15590 c.ctx_ = ctx
15591 return c
15592 }
15593
15594 // Header returns a http.Header that can be modified by the caller to add
15595 // headers to the request.
15596 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsUnenrollCall) Header() http.Header {
15597 if c.header_ == nil {
15598 c.header_ = make(http.Header)
15599 }
15600 return c.header_
15601 }
15602
15603 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsUnenrollCall) doRequest(alt string) (*http.Response, error) {
15604 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15605 c.urlParams_.Set("alt", alt)
15606 c.urlParams_.Set("prettyPrint", "false")
15607 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:unenroll")
15608 urls += "?" + c.urlParams_.Encode()
15609 req, err := http.NewRequest("DELETE", urls, nil)
15610 if err != nil {
15611 return nil, err
15612 }
15613 req.Header = reqHeaders
15614 googleapi.Expand(req.URL, map[string]string{
15615 "name": c.name,
15616 })
15617 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.unenroll", "request", internallog.HTTPRequest(req, nil))
15618 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15619 }
15620
15621 // Do executes the "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.unenroll" call.
15622 // Any non-2xx status code is an error. Response headers are in either
15623 // *Operation.ServerResponse.Header or (if a response was returned at all) in
15624 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15625 // whether the returned error was because http.StatusNotModified was returned.
15626 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsUnenrollCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15627 gensupport.SetOptions(c.urlParams_, opts...)
15628 res, err := c.doRequest("json")
15629 if res != nil && res.StatusCode == http.StatusNotModified {
15630 if res.Body != nil {
15631 res.Body.Close()
15632 }
15633 return nil, gensupport.WrapError(&googleapi.Error{
15634 Code: res.StatusCode,
15635 Header: res.Header,
15636 })
15637 }
15638 if err != nil {
15639 return nil, err
15640 }
15641 defer googleapi.CloseBody(res)
15642 if err := googleapi.CheckResponse(res); err != nil {
15643 return nil, gensupport.WrapError(err)
15644 }
15645 ret := &Operation{
15646 ServerResponse: googleapi.ServerResponse{
15647 Header: res.Header,
15648 HTTPStatusCode: res.StatusCode,
15649 },
15650 }
15651 target := &ret
15652 b, err := gensupport.DecodeResponseBytes(target, res)
15653 if err != nil {
15654 return nil, err
15655 }
15656 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.unenroll", "response", internallog.HTTPResponse(res, b))
15657 return ret, nil
15658 }
15659
15660 type ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsGetCall struct {
15661 s *Service
15662 name string
15663 urlParams_ gensupport.URLParams
15664 ifNoneMatch_ string
15665 ctx_ context.Context
15666 header_ http.Header
15667 }
15668
15669 // Get: Gets the latest state of a long-running operation. Clients can use this
15670 // method to poll the operation result at intervals as recommended by the API
15671 // service.
15672 //
15673 // - name: The name of the operation resource.
15674 func (r *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsService) Get(name string) *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsGetCall {
15675 c := &ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15676 c.name = name
15677 return c
15678 }
15679
15680 // Fields allows partial responses to be retrieved. See
15681 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15682 // details.
15683 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsGetCall {
15684 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15685 return c
15686 }
15687
15688 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15689 // object's ETag matches the given value. This is useful for getting updates
15690 // only after the object has changed since the last request.
15691 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsGetCall {
15692 c.ifNoneMatch_ = entityTag
15693 return c
15694 }
15695
15696 // Context sets the context to be used in this call's Do method.
15697 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsGetCall {
15698 c.ctx_ = ctx
15699 return c
15700 }
15701
15702 // Header returns a http.Header that can be modified by the caller to add
15703 // headers to the request.
15704 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsGetCall) Header() http.Header {
15705 if c.header_ == nil {
15706 c.header_ = make(http.Header)
15707 }
15708 return c.header_
15709 }
15710
15711 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
15712 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15713 if c.ifNoneMatch_ != "" {
15714 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15715 }
15716 c.urlParams_.Set("alt", alt)
15717 c.urlParams_.Set("prettyPrint", "false")
15718 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
15719 urls += "?" + c.urlParams_.Encode()
15720 req, err := http.NewRequest("GET", urls, nil)
15721 if err != nil {
15722 return nil, err
15723 }
15724 req.Header = reqHeaders
15725 googleapi.Expand(req.URL, map[string]string{
15726 "name": c.name,
15727 })
15728 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.operations.get", "request", internallog.HTTPRequest(req, nil))
15729 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15730 }
15731
15732 // Do executes the "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.operations.get" call.
15733 // Any non-2xx status code is an error. Response headers are in either
15734 // *Operation.ServerResponse.Header or (if a response was returned at all) in
15735 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15736 // whether the returned error was because http.StatusNotModified was returned.
15737 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15738 gensupport.SetOptions(c.urlParams_, opts...)
15739 res, err := c.doRequest("json")
15740 if res != nil && res.StatusCode == http.StatusNotModified {
15741 if res.Body != nil {
15742 res.Body.Close()
15743 }
15744 return nil, gensupport.WrapError(&googleapi.Error{
15745 Code: res.StatusCode,
15746 Header: res.Header,
15747 })
15748 }
15749 if err != nil {
15750 return nil, err
15751 }
15752 defer googleapi.CloseBody(res)
15753 if err := googleapi.CheckResponse(res); err != nil {
15754 return nil, gensupport.WrapError(err)
15755 }
15756 ret := &Operation{
15757 ServerResponse: googleapi.ServerResponse{
15758 Header: res.Header,
15759 HTTPStatusCode: res.StatusCode,
15760 },
15761 }
15762 target := &ret
15763 b, err := gensupport.DecodeResponseBytes(target, res)
15764 if err != nil {
15765 return nil, err
15766 }
15767 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.operations.get", "response", internallog.HTTPResponse(res, b))
15768 return ret, nil
15769 }
15770
15771 type ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall struct {
15772 s *Service
15773 name string
15774 urlParams_ gensupport.URLParams
15775 ifNoneMatch_ string
15776 ctx_ context.Context
15777 header_ http.Header
15778 }
15779
15780 // List: Lists operations that match the specified filter in the request. If
15781 // the server doesn't support this method, it returns `UNIMPLEMENTED`.
15782 //
15783 // - name: The name of the operation's parent resource.
15784 func (r *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsService) List(name string) *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall {
15785 c := &ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15786 c.name = name
15787 return c
15788 }
15789
15790 // Filter sets the optional parameter "filter": The standard list filter.
15791 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall) Filter(filter string) *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall {
15792 c.urlParams_.Set("filter", filter)
15793 return c
15794 }
15795
15796 // PageSize sets the optional parameter "pageSize": The standard list page
15797 // size.
15798 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall {
15799 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15800 return c
15801 }
15802
15803 // PageToken sets the optional parameter "pageToken": The standard list page
15804 // token.
15805 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall {
15806 c.urlParams_.Set("pageToken", pageToken)
15807 return c
15808 }
15809
15810 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess":
15811 // When set to `true`, operations that are reachable are returned as normal,
15812 // and those that are unreachable are returned in the
15813 // ListOperationsResponse.unreachable field. This can only be `true` when
15814 // reading across collections. For example, when `parent` is set to
15815 // "projects/example/locations/-". This field is not supported by default and
15816 // will result in an `UNIMPLEMENTED` error if set unless explicitly documented
15817 // otherwise in service or product specific documentation.
15818 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall {
15819 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
15820 return c
15821 }
15822
15823 // Fields allows partial responses to be retrieved. See
15824 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15825 // details.
15826 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall {
15827 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15828 return c
15829 }
15830
15831 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15832 // object's ETag matches the given value. This is useful for getting updates
15833 // only after the object has changed since the last request.
15834 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall {
15835 c.ifNoneMatch_ = entityTag
15836 return c
15837 }
15838
15839 // Context sets the context to be used in this call's Do method.
15840 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall {
15841 c.ctx_ = ctx
15842 return c
15843 }
15844
15845 // Header returns a http.Header that can be modified by the caller to add
15846 // headers to the request.
15847 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall) Header() http.Header {
15848 if c.header_ == nil {
15849 c.header_ = make(http.Header)
15850 }
15851 return c.header_
15852 }
15853
15854 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall) doRequest(alt string) (*http.Response, error) {
15855 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15856 if c.ifNoneMatch_ != "" {
15857 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15858 }
15859 c.urlParams_.Set("alt", alt)
15860 c.urlParams_.Set("prettyPrint", "false")
15861 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
15862 urls += "?" + c.urlParams_.Encode()
15863 req, err := http.NewRequest("GET", urls, nil)
15864 if err != nil {
15865 return nil, err
15866 }
15867 req.Header = reqHeaders
15868 googleapi.Expand(req.URL, map[string]string{
15869 "name": c.name,
15870 })
15871 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.operations.list", "request", internallog.HTTPRequest(req, nil))
15872 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15873 }
15874
15875 // Do executes the "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.operations.list" call.
15876 // Any non-2xx status code is an error. Response headers are in either
15877 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
15878 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
15879 // check whether the returned error was because http.StatusNotModified was
15880 // returned.
15881 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
15882 gensupport.SetOptions(c.urlParams_, opts...)
15883 res, err := c.doRequest("json")
15884 if res != nil && res.StatusCode == http.StatusNotModified {
15885 if res.Body != nil {
15886 res.Body.Close()
15887 }
15888 return nil, gensupport.WrapError(&googleapi.Error{
15889 Code: res.StatusCode,
15890 Header: res.Header,
15891 })
15892 }
15893 if err != nil {
15894 return nil, err
15895 }
15896 defer googleapi.CloseBody(res)
15897 if err := googleapi.CheckResponse(res); err != nil {
15898 return nil, gensupport.WrapError(err)
15899 }
15900 ret := &ListOperationsResponse{
15901 ServerResponse: googleapi.ServerResponse{
15902 Header: res.Header,
15903 HTTPStatusCode: res.StatusCode,
15904 },
15905 }
15906 target := &ret
15907 b, err := gensupport.DecodeResponseBytes(target, res)
15908 if err != nil {
15909 return nil, err
15910 }
15911 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkeonprem.projects.locations.vmwareClusters.vmwareNodePools.operations.list", "response", internallog.HTTPResponse(res, b))
15912 return ret, nil
15913 }
15914
15915 // Pages invokes f for each page of results.
15916 // A non-nil error returned from f will halt the iteration.
15917 // The provided context supersedes any context provided to the Context method.
15918 func (c *ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
15919 c.ctx_ = ctx
15920 defer c.PageToken(c.urlParams_.Get("pageToken"))
15921 for {
15922 x, err := c.Do()
15923 if err != nil {
15924 return err
15925 }
15926 if err := f(x); err != nil {
15927 return err
15928 }
15929 if x.NextPageToken == "" {
15930 return nil
15931 }
15932 c.PageToken(x.NextPageToken)
15933 }
15934 }