Debian Codegraph @

gkehub/v1beta/gkehub-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 gkehub provides access to the GKE Hub API.
8 //
9 // For product documentation, see: https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster
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/gkehub/v1beta"
27 // ...
28 // ctx := context.Background()
29 // gkehubService, err := gkehub.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 // gkehubService, err := gkehub.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 // gkehubService, err := gkehub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
49 //
50 // See [google.golang.org/api/option.ClientOption] for details on options.
51 package gkehub // import "google.golang.org/api/gkehub/v1beta"
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 = "gkehub:v1beta"
93 const apiName = "gkehub"
94 const apiVersion = "v1beta"
95 const basePath = "https://gkehub.googleapis.com/"
96 const basePathTemplate = "https://gkehub.UNIVERSE_DOMAIN/"
97 const mtlsBasePath = "https://gkehub.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.Organizations = NewOrganizationsService(s)
123 s.Projects = NewProjectsService(s)
124 if endpoint != "" {
125 s.BasePath = endpoint
126 }
127 return s, nil
128 }
129
130 // New creates a new Service. It uses the provided http.Client for requests.
131 //
132 // Deprecated: please use NewService instead.
133 // To provide a custom HTTP client, use option.WithHTTPClient.
134 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
135 func New(client *http.Client) (*Service, error) {
136 if client == nil {
137 return nil, errors.New("client is nil")
138 }
139 return NewService(context.TODO(), option.WithHTTPClient(client))
140 }
141
142 type Service struct {
143 client *http.Client
144 logger *slog.Logger
145 BasePath string // API endpoint base URL
146 UserAgent string // optional additional User-Agent fragment
147
148 Organizations *OrganizationsService
149
150 Projects *ProjectsService
151 }
152
153 func (s *Service) userAgent() string {
154 if s.UserAgent == "" {
155 return googleapi.UserAgent
156 }
157 return googleapi.UserAgent + " " + s.UserAgent
158 }
159
160 func NewOrganizationsService(s *Service) *OrganizationsService {
161 rs := &OrganizationsService{s: s}
162 rs.Locations = NewOrganizationsLocationsService(s)
163 return rs
164 }
165
166 type OrganizationsService struct {
167 s *Service
168
169 Locations *OrganizationsLocationsService
170 }
171
172 func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService {
173 rs := &OrganizationsLocationsService{s: s}
174 rs.Fleets = NewOrganizationsLocationsFleetsService(s)
175 return rs
176 }
177
178 type OrganizationsLocationsService struct {
179 s *Service
180
181 Fleets *OrganizationsLocationsFleetsService
182 }
183
184 func NewOrganizationsLocationsFleetsService(s *Service) *OrganizationsLocationsFleetsService {
185 rs := &OrganizationsLocationsFleetsService{s: s}
186 return rs
187 }
188
189 type OrganizationsLocationsFleetsService struct {
190 s *Service
191 }
192
193 func NewProjectsService(s *Service) *ProjectsService {
194 rs := &ProjectsService{s: s}
195 rs.Locations = NewProjectsLocationsService(s)
196 return rs
197 }
198
199 type ProjectsService struct {
200 s *Service
201
202 Locations *ProjectsLocationsService
203 }
204
205 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
206 rs := &ProjectsLocationsService{s: s}
207 rs.Features = NewProjectsLocationsFeaturesService(s)
208 rs.Fleets = NewProjectsLocationsFleetsService(s)
209 rs.Memberships = NewProjectsLocationsMembershipsService(s)
210 rs.Operations = NewProjectsLocationsOperationsService(s)
211 rs.RolloutSequences = NewProjectsLocationsRolloutSequencesService(s)
212 rs.Rollouts = NewProjectsLocationsRolloutsService(s)
213 rs.Scopes = NewProjectsLocationsScopesService(s)
214 return rs
215 }
216
217 type ProjectsLocationsService struct {
218 s *Service
219
220 Features *ProjectsLocationsFeaturesService
221
222 Fleets *ProjectsLocationsFleetsService
223
224 Memberships *ProjectsLocationsMembershipsService
225
226 Operations *ProjectsLocationsOperationsService
227
228 RolloutSequences *ProjectsLocationsRolloutSequencesService
229
230 Rollouts *ProjectsLocationsRolloutsService
231
232 Scopes *ProjectsLocationsScopesService
233 }
234
235 func NewProjectsLocationsFeaturesService(s *Service) *ProjectsLocationsFeaturesService {
236 rs := &ProjectsLocationsFeaturesService{s: s}
237 return rs
238 }
239
240 type ProjectsLocationsFeaturesService struct {
241 s *Service
242 }
243
244 func NewProjectsLocationsFleetsService(s *Service) *ProjectsLocationsFleetsService {
245 rs := &ProjectsLocationsFleetsService{s: s}
246 return rs
247 }
248
249 type ProjectsLocationsFleetsService struct {
250 s *Service
251 }
252
253 func NewProjectsLocationsMembershipsService(s *Service) *ProjectsLocationsMembershipsService {
254 rs := &ProjectsLocationsMembershipsService{s: s}
255 rs.Bindings = NewProjectsLocationsMembershipsBindingsService(s)
256 rs.Rbacrolebindings = NewProjectsLocationsMembershipsRbacrolebindingsService(s)
257 return rs
258 }
259
260 type ProjectsLocationsMembershipsService struct {
261 s *Service
262
263 Bindings *ProjectsLocationsMembershipsBindingsService
264
265 Rbacrolebindings *ProjectsLocationsMembershipsRbacrolebindingsService
266 }
267
268 func NewProjectsLocationsMembershipsBindingsService(s *Service) *ProjectsLocationsMembershipsBindingsService {
269 rs := &ProjectsLocationsMembershipsBindingsService{s: s}
270 return rs
271 }
272
273 type ProjectsLocationsMembershipsBindingsService struct {
274 s *Service
275 }
276
277 func NewProjectsLocationsMembershipsRbacrolebindingsService(s *Service) *ProjectsLocationsMembershipsRbacrolebindingsService {
278 rs := &ProjectsLocationsMembershipsRbacrolebindingsService{s: s}
279 return rs
280 }
281
282 type ProjectsLocationsMembershipsRbacrolebindingsService struct {
283 s *Service
284 }
285
286 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
287 rs := &ProjectsLocationsOperationsService{s: s}
288 return rs
289 }
290
291 type ProjectsLocationsOperationsService struct {
292 s *Service
293 }
294
295 func NewProjectsLocationsRolloutSequencesService(s *Service) *ProjectsLocationsRolloutSequencesService {
296 rs := &ProjectsLocationsRolloutSequencesService{s: s}
297 return rs
298 }
299
300 type ProjectsLocationsRolloutSequencesService struct {
301 s *Service
302 }
303
304 func NewProjectsLocationsRolloutsService(s *Service) *ProjectsLocationsRolloutsService {
305 rs := &ProjectsLocationsRolloutsService{s: s}
306 return rs
307 }
308
309 type ProjectsLocationsRolloutsService struct {
310 s *Service
311 }
312
313 func NewProjectsLocationsScopesService(s *Service) *ProjectsLocationsScopesService {
314 rs := &ProjectsLocationsScopesService{s: s}
315 rs.Namespaces = NewProjectsLocationsScopesNamespacesService(s)
316 rs.Rbacrolebindings = NewProjectsLocationsScopesRbacrolebindingsService(s)
317 return rs
318 }
319
320 type ProjectsLocationsScopesService struct {
321 s *Service
322
323 Namespaces *ProjectsLocationsScopesNamespacesService
324
325 Rbacrolebindings *ProjectsLocationsScopesRbacrolebindingsService
326 }
327
328 func NewProjectsLocationsScopesNamespacesService(s *Service) *ProjectsLocationsScopesNamespacesService {
329 rs := &ProjectsLocationsScopesNamespacesService{s: s}
330 return rs
331 }
332
333 type ProjectsLocationsScopesNamespacesService struct {
334 s *Service
335 }
336
337 func NewProjectsLocationsScopesRbacrolebindingsService(s *Service) *ProjectsLocationsScopesRbacrolebindingsService {
338 rs := &ProjectsLocationsScopesRbacrolebindingsService{s: s}
339 return rs
340 }
341
342 type ProjectsLocationsScopesRbacrolebindingsService struct {
343 s *Service
344 }
345
346 // AppDevExperienceFeatureSpec: Spec for App Dev Experience Feature.
347 type AppDevExperienceFeatureSpec struct {
348 }
349
350 // AppDevExperienceFeatureState: State for App Dev Exp Feature.
351 type AppDevExperienceFeatureState struct {
352 // NetworkingInstallSucceeded: Status of subcomponent that detects configured
353 // Service Mesh resources.
354 NetworkingInstallSucceeded *Status `json:"networkingInstallSucceeded,omitempty"`
355 // ForceSendFields is a list of field names (e.g. "NetworkingInstallSucceeded")
356 // to unconditionally include in API requests. By default, fields with empty or
357 // default values are omitted from API requests. See
358 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
359 // details.
360 ForceSendFields []string `json:"-"`
361 // NullFields is a list of field names (e.g. "NetworkingInstallSucceeded") to
362 // include in API requests with the JSON null value. By default, fields with
363 // empty values are omitted from API requests. See
364 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
365 NullFields []string `json:"-"`
366 }
367
368 func (s AppDevExperienceFeatureState) MarshalJSON() ([]byte, error) {
369 type NoMethod AppDevExperienceFeatureState
370 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
371 }
372
373 // ApplianceCluster: ApplianceCluster contains information specific to GDC Edge
374 // Appliance Clusters.
375 type ApplianceCluster struct {
376 // ResourceLink: Immutable. Self-link of the Google Cloud resource for the
377 // Appliance Cluster. For example:
378 // //transferappliance.googleapis.com/projects/my-project/locations/us-west1-a/a
379 // ppliances/my-appliance
380 ResourceLink string `json:"resourceLink,omitempty"`
381 // ForceSendFields is a list of field names (e.g. "ResourceLink") to
382 // unconditionally include in API requests. By default, fields with empty or
383 // default values are omitted from API requests. See
384 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
385 // details.
386 ForceSendFields []string `json:"-"`
387 // NullFields is a list of field names (e.g. "ResourceLink") to include in API
388 // requests with the JSON null value. By default, fields with empty values are
389 // omitted from API requests. See
390 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
391 NullFields []string `json:"-"`
392 }
393
394 func (s ApplianceCluster) MarshalJSON() ([]byte, error) {
395 type NoMethod ApplianceCluster
396 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
397 }
398
399 // AuditConfig: Specifies the audit configuration for a service. The
400 // configuration determines which permission types are logged, and what
401 // identities, if any, are exempted from logging. An AuditConfig must have one
402 // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
403 // and a specific service, the union of the two AuditConfigs is used for that
404 // service: the log_types specified in each AuditConfig are enabled, and the
405 // exempted_members in each AuditLogConfig are exempted. Example Policy with
406 // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
407 // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
408 // "user:[email protected]" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
409 // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
410 // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
411 // "DATA_WRITE", "exempted_members": [ "user:[email protected]" ] } ] } ] } For
412 // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
413 // logging. It also exempts `[email protected]` from DATA_READ logging, and
414 // `[email protected]` from DATA_WRITE logging.
415 type AuditConfig struct {
416 // AuditLogConfigs: The configuration for logging of each type of permission.
417 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
418 // Service: Specifies a service that will be enabled for audit logging. For
419 // example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
420 // is a special value that covers all services.
421 Service string `json:"service,omitempty"`
422 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
423 // unconditionally include in API requests. By default, fields with empty or
424 // default values are omitted from API requests. See
425 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
426 // details.
427 ForceSendFields []string `json:"-"`
428 // NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
429 // API requests with the JSON null value. By default, fields with empty values
430 // are omitted from API requests. See
431 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
432 NullFields []string `json:"-"`
433 }
434
435 func (s AuditConfig) MarshalJSON() ([]byte, error) {
436 type NoMethod AuditConfig
437 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
438 }
439
440 // AuditLogConfig: Provides the configuration for logging a type of
441 // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
442 // "exempted_members": [ "user:[email protected]" ] }, { "log_type":
443 // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
444 // exempting [email protected] from DATA_READ logging.
445 type AuditLogConfig struct {
446 // ExemptedMembers: Specifies the identities that do not cause logging for this
447 // type of permission. Follows the same format of Binding.members.
448 ExemptedMembers []string `json:"exemptedMembers,omitempty"`
449 // LogType: The log type that this config enables.
450 //
451 // Possible values:
452 // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
453 // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
454 // "DATA_WRITE" - Data writes. Example: CloudSQL Users create
455 // "DATA_READ" - Data reads. Example: CloudSQL Users list
456 LogType string `json:"logType,omitempty"`
457 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
458 // unconditionally include in API requests. By default, fields with empty or
459 // default values are omitted from API requests. See
460 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
461 // details.
462 ForceSendFields []string `json:"-"`
463 // NullFields is a list of field names (e.g. "ExemptedMembers") to include in
464 // API requests with the JSON null value. By default, fields with empty values
465 // are omitted from API requests. See
466 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
467 NullFields []string `json:"-"`
468 }
469
470 func (s AuditLogConfig) MarshalJSON() ([]byte, error) {
471 type NoMethod AuditLogConfig
472 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
473 }
474
475 // Authority: Authority encodes how Google will recognize identities from this
476 // Membership. See the workload identity documentation for more details:
477 // https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity
478 type Authority struct {
479 // IdentityProvider: Output only. An identity provider that reflects the
480 // `issuer` in the workload identity pool.
481 IdentityProvider string `json:"identityProvider,omitempty"`
482 // Issuer: Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start
483 // with `https://` and be a valid URL with length <2000 characters, it must use
484 // `location` rather than `zone` for GKE clusters. If set, then Google will
485 // allow valid OIDC tokens from this issuer to authenticate within the
486 // workload_identity_pool. OIDC discovery will be performed on this URI to
487 // validate tokens from the issuer. Clearing `issuer` disables Workload
488 // Identity. `issuer` cannot be directly modified; it must be cleared (and
489 // Workload Identity disabled) before using a new issuer (and re-enabling
490 // Workload Identity).
491 Issuer string `json:"issuer,omitempty"`
492 // OidcJwks: Optional. OIDC verification keys for this Membership in JWKS
493 // format (RFC 7517). When this field is set, OIDC discovery will NOT be
494 // performed on `issuer`, and instead OIDC tokens will be validated using this
495 // field.
496 OidcJwks string `json:"oidcJwks,omitempty"`
497 // ScopeTenancyIdentityProvider: Optional. Output only. The identity provider
498 // for the scope-tenancy workload identity pool.
499 ScopeTenancyIdentityProvider string `json:"scopeTenancyIdentityProvider,omitempty"`
500 // ScopeTenancyWorkloadIdentityPool: Optional. Output only. The name of the
501 // scope-tenancy workload identity pool. This pool is set in the fleet-level
502 // feature.
503 ScopeTenancyWorkloadIdentityPool string `json:"scopeTenancyWorkloadIdentityPool,omitempty"`
504 // WorkloadIdentityPool: Output only. The name of the workload identity pool in
505 // which `issuer` will be recognized. There is a single Workload Identity Pool
506 // per Hub that is shared between all Memberships that belong to that Hub. For
507 // a Hub hosted in {PROJECT_ID}, the workload pool format is
508 // `{PROJECT_ID}.hub.id.goog`, although this is subject to change in newer
509 // versions of this API.
510 WorkloadIdentityPool string `json:"workloadIdentityPool,omitempty"`
511 // ForceSendFields is a list of field names (e.g. "IdentityProvider") to
512 // unconditionally include in API requests. By default, fields with empty or
513 // default values are omitted from API requests. See
514 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
515 // details.
516 ForceSendFields []string `json:"-"`
517 // NullFields is a list of field names (e.g. "IdentityProvider") to include in
518 // API requests with the JSON null value. By default, fields with empty values
519 // are omitted from API requests. See
520 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
521 NullFields []string `json:"-"`
522 }
523
524 func (s Authority) MarshalJSON() ([]byte, error) {
525 type NoMethod Authority
526 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
527 }
528
529 // BinaryAuthorizationConfig: BinaryAuthorizationConfig defines the fleet level
530 // configuration of binary authorization feature.
531 type BinaryAuthorizationConfig struct {
532 // EvaluationMode: Optional. Mode of operation for binauthz policy evaluation.
533 //
534 // Possible values:
535 // "EVALUATION_MODE_UNSPECIFIED" - Default value
536 // "DISABLED" - Disable BinaryAuthorization
537 // "POLICY_BINDINGS" - Use Binary Authorization with the policies specified
538 // in policy_bindings.
539 EvaluationMode string `json:"evaluationMode,omitempty"`
540 // PolicyBindings: Optional. Binauthz policies that apply to this cluster.
541 PolicyBindings []*PolicyBinding `json:"policyBindings,omitempty"`
542 // ForceSendFields is a list of field names (e.g. "EvaluationMode") to
543 // unconditionally include in API requests. By default, fields with empty or
544 // default values are omitted from API requests. See
545 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
546 // details.
547 ForceSendFields []string `json:"-"`
548 // NullFields is a list of field names (e.g. "EvaluationMode") to include in
549 // API requests with the JSON null value. By default, fields with empty values
550 // are omitted from API requests. See
551 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
552 NullFields []string `json:"-"`
553 }
554
555 func (s BinaryAuthorizationConfig) MarshalJSON() ([]byte, error) {
556 type NoMethod BinaryAuthorizationConfig
557 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
558 }
559
560 // Binding: Associates `members`, or principals, with a `role`.
561 type Binding struct {
562 // Condition: The condition that is associated with this binding. If the
563 // condition evaluates to `true`, then this binding applies to the current
564 // request. If the condition evaluates to `false`, then this binding does not
565 // apply to the current request. However, a different role binding might grant
566 // the same role to one or more of the principals in this binding. To learn
567 // which resources support conditions in their IAM policies, see the IAM
568 // documentation
569 // (https://cloud.google.com/iam/help/conditions/resource-policies).
570 Condition *Expr `json:"condition,omitempty"`
571 // Members: Specifies the principals requesting access for a Google Cloud
572 // resource. `members` can have the following values: * `allUsers`: A special
573 // identifier that represents anyone who is on the internet; with or without a
574 // Google account. * `allAuthenticatedUsers`: A special identifier that
575 // represents anyone who is authenticated with a Google account or a service
576 // account. Does not include identities that come from external identity
577 // providers (IdPs) through identity federation. * `user:{emailid}`: An email
578 // address that represents a specific Google account. For example,
579 // `[email protected]` . * `serviceAccount:{emailid}`: An email address that
580 // represents a Google service account. For example,
581 // `[email protected]`. *
582 // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
583 // identifier for a Kubernetes service account
584 // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
585 // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
586 // `group:{emailid}`: An email address that represents a Google group. For
587 // example, `[email protected]`. * `domain:{domain}`: The G Suite domain
588 // (primary) that represents all the users of that domain. For example,
589 // `google.com` or `example.com`. *
590 // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
591 // ject/{subject_attribute_value}`: A single identity in a workforce identity
592 // pool. *
593 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
594 // group/{group_id}`: All workforce identities in a group. *
595 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
596 // attribute.{attribute_name}/{attribute_value}`: All workforce identities with
597 // a specific attribute value. *
598 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
599 // *`: All identities in a workforce identity pool. *
600 // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
601 // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
602 // identity in a workload identity pool. *
603 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
604 // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
605 // group. *
606 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
607 // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
608 // `: All identities in a workload identity pool with a certain attribute. *
609 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
610 // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
611 // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
612 // unique identifier) representing a user that has been recently deleted. For
613 // example, `[email protected]?uid=123456789012345678901`. If the user is
614 // recovered, this value reverts to `user:{emailid}` and the recovered user
615 // retains the role in the binding. *
616 // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
617 // unique identifier) representing a service account that has been recently
618 // deleted. For example,
619 // `[email protected]?uid=123456789012345678901`. If the
620 // service account is undeleted, this value reverts to
621 // `serviceAccount:{emailid}` and the undeleted service account retains the
622 // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
623 // address (plus unique identifier) representing a Google group that has been
624 // recently deleted. For example,
625 // `[email protected]?uid=123456789012345678901`. If the group is recovered,
626 // this value reverts to `group:{emailid}` and the recovered group retains the
627 // role in the binding. *
628 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
629 // _id}/subject/{subject_attribute_value}`: Deleted single identity in a
630 // workforce identity pool. For example,
631 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
632 // ol-id/subject/my-subject-attribute-value`.
633 Members []string `json:"members,omitempty"`
634 // Role: Role that is assigned to the list of `members`, or principals. For
635 // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
636 // of the IAM roles and permissions, see the IAM documentation
637 // (https://cloud.google.com/iam/docs/roles-overview). For a list of the
638 // available pre-defined roles, see here
639 // (https://cloud.google.com/iam/docs/understanding-roles).
640 Role string `json:"role,omitempty"`
641 // ForceSendFields is a list of field names (e.g. "Condition") 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. "Condition") to include in API
648 // requests with the JSON null value. By default, fields with empty values are
649 // 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 Binding) MarshalJSON() ([]byte, error) {
655 type NoMethod Binding
656 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
657 }
658
659 // CancelOperationRequest: The request message for Operations.CancelOperation.
660 type CancelOperationRequest struct {
661 }
662
663 // ClusterSelector: Selector for clusters.
664 type ClusterSelector struct {
665 // LabelSelector: Required. A valid CEL (Common Expression Language) expression
666 // which evaluates `resource.labels`.
667 LabelSelector string `json:"labelSelector,omitempty"`
668 // ForceSendFields is a list of field names (e.g. "LabelSelector") to
669 // unconditionally include in API requests. By default, fields with empty or
670 // default values are omitted from API requests. See
671 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
672 // details.
673 ForceSendFields []string `json:"-"`
674 // NullFields is a list of field names (e.g. "LabelSelector") to include in API
675 // requests with the JSON null value. By default, fields with empty values are
676 // omitted from API requests. See
677 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
678 NullFields []string `json:"-"`
679 }
680
681 func (s ClusterSelector) MarshalJSON() ([]byte, error) {
682 type NoMethod ClusterSelector
683 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
684 }
685
686 // ClusterUpgradeFleetSpec: **ClusterUpgrade**: The configuration for the
687 // fleet-level ClusterUpgrade feature.
688 type ClusterUpgradeFleetSpec struct {
689 // GkeUpgradeOverrides: Allow users to override some properties of each GKE
690 // upgrade.
691 GkeUpgradeOverrides []*ClusterUpgradeGKEUpgradeOverride `json:"gkeUpgradeOverrides,omitempty"`
692 // PostConditions: Required. Post conditions to evaluate to mark an upgrade
693 // COMPLETE. Required.
694 PostConditions *ClusterUpgradePostConditions `json:"postConditions,omitempty"`
695 // UpstreamFleets: This fleet consumes upgrades that have COMPLETE status code
696 // in the upstream fleets. See UpgradeStatus.Code for code definitions. The
697 // fleet name should be either fleet project number or id. This is defined as
698 // repeated for future proof reasons. Initial implementation will enforce at
699 // most one upstream fleet.
700 UpstreamFleets []string `json:"upstreamFleets,omitempty"`
701 // ForceSendFields is a list of field names (e.g. "GkeUpgradeOverrides") to
702 // unconditionally include in API requests. By default, fields with empty or
703 // default values are omitted from API requests. See
704 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
705 // details.
706 ForceSendFields []string `json:"-"`
707 // NullFields is a list of field names (e.g. "GkeUpgradeOverrides") to include
708 // in API requests with the JSON null value. By default, fields with empty
709 // values are omitted from API requests. See
710 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
711 NullFields []string `json:"-"`
712 }
713
714 func (s ClusterUpgradeFleetSpec) MarshalJSON() ([]byte, error) {
715 type NoMethod ClusterUpgradeFleetSpec
716 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
717 }
718
719 // ClusterUpgradeFleetState: **ClusterUpgrade**: The state for the fleet-level
720 // ClusterUpgrade feature.
721 type ClusterUpgradeFleetState struct {
722 // DownstreamFleets: This fleets whose upstream_fleets contain the current
723 // fleet. The fleet name should be either fleet project number or id.
724 DownstreamFleets []string `json:"downstreamFleets,omitempty"`
725 // GkeState: Feature state for GKE clusters.
726 GkeState *ClusterUpgradeGKEUpgradeFeatureState `json:"gkeState,omitempty"`
727 // Ignored: A list of memberships ignored by the feature. For example, manually
728 // upgraded clusters can be ignored if they are newer than the default versions
729 // of its release channel. The membership resource is in the format:
730 // `projects/{p}/locations/{l}/membership/{m}`.
731 Ignored map[string]ClusterUpgradeIgnoredMembership `json:"ignored,omitempty"`
732 // ForceSendFields is a list of field names (e.g. "DownstreamFleets") to
733 // unconditionally include in API requests. By default, fields with empty or
734 // default values are omitted from API requests. See
735 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
736 // details.
737 ForceSendFields []string `json:"-"`
738 // NullFields is a list of field names (e.g. "DownstreamFleets") to include in
739 // API requests with the JSON null value. By default, fields with empty values
740 // are omitted from API requests. See
741 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
742 NullFields []string `json:"-"`
743 }
744
745 func (s ClusterUpgradeFleetState) MarshalJSON() ([]byte, error) {
746 type NoMethod ClusterUpgradeFleetState
747 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
748 }
749
750 // ClusterUpgradeGKEUpgrade: GKEUpgrade represents a GKE provided upgrade,
751 // e.g., control plane upgrade.
752 type ClusterUpgradeGKEUpgrade struct {
753 // Name: Name of the upgrade, e.g., "k8s_control_plane". It should be a valid
754 // upgrade name. It must not exceet 99 characters.
755 Name string `json:"name,omitempty"`
756 // Version: Version of the upgrade, e.g., "1.22.1-gke.100". It should be a
757 // valid version. It must not exceet 99 characters.
758 Version string `json:"version,omitempty"`
759 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
760 // include in API requests. By default, fields with empty or default values are
761 // omitted from API requests. See
762 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
763 // details.
764 ForceSendFields []string `json:"-"`
765 // NullFields is a list of field names (e.g. "Name") to include in API requests
766 // with the JSON null value. By default, fields with empty values are omitted
767 // from API requests. See
768 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
769 NullFields []string `json:"-"`
770 }
771
772 func (s ClusterUpgradeGKEUpgrade) MarshalJSON() ([]byte, error) {
773 type NoMethod ClusterUpgradeGKEUpgrade
774 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
775 }
776
777 // ClusterUpgradeGKEUpgradeFeatureCondition: GKEUpgradeFeatureCondition
778 // describes the condition of the feature for GKE clusters at a certain point
779 // of time.
780 type ClusterUpgradeGKEUpgradeFeatureCondition struct {
781 // Reason: Reason why the feature is in this status.
782 Reason string `json:"reason,omitempty"`
783 // Status: Status of the condition, one of True, False, Unknown.
784 Status string `json:"status,omitempty"`
785 // Type: Type of the condition, for example, "ready".
786 Type string `json:"type,omitempty"`
787 // UpdateTime: Last timestamp the condition was updated.
788 UpdateTime string `json:"updateTime,omitempty"`
789 // ForceSendFields is a list of field names (e.g. "Reason") to unconditionally
790 // include in API requests. By default, fields with empty or default values are
791 // omitted from API requests. See
792 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
793 // details.
794 ForceSendFields []string `json:"-"`
795 // NullFields is a list of field names (e.g. "Reason") to include in API
796 // requests with the JSON null value. By default, fields with empty values are
797 // omitted from API requests. See
798 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
799 NullFields []string `json:"-"`
800 }
801
802 func (s ClusterUpgradeGKEUpgradeFeatureCondition) MarshalJSON() ([]byte, error) {
803 type NoMethod ClusterUpgradeGKEUpgradeFeatureCondition
804 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
805 }
806
807 // ClusterUpgradeGKEUpgradeFeatureState: GKEUpgradeFeatureState contains
808 // feature states for GKE clusters in the scope.
809 type ClusterUpgradeGKEUpgradeFeatureState struct {
810 // Conditions: Current conditions of the feature.
811 Conditions []*ClusterUpgradeGKEUpgradeFeatureCondition `json:"conditions,omitempty"`
812 // UpgradeState: Upgrade state. It will eventually replace `state`.
813 UpgradeState []*ClusterUpgradeGKEUpgradeState `json:"upgradeState,omitempty"`
814 // ForceSendFields is a list of field names (e.g. "Conditions") to
815 // unconditionally include in API requests. By default, fields with empty or
816 // default values are omitted from API requests. See
817 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
818 // details.
819 ForceSendFields []string `json:"-"`
820 // NullFields is a list of field names (e.g. "Conditions") to include in API
821 // requests with the JSON null value. By default, fields with empty values are
822 // omitted from API requests. See
823 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
824 NullFields []string `json:"-"`
825 }
826
827 func (s ClusterUpgradeGKEUpgradeFeatureState) MarshalJSON() ([]byte, error) {
828 type NoMethod ClusterUpgradeGKEUpgradeFeatureState
829 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
830 }
831
832 // ClusterUpgradeGKEUpgradeOverride: Properties of a GKE upgrade that can be
833 // overridden by the user. For example, a user can skip soaking by overriding
834 // the soaking to 0.
835 type ClusterUpgradeGKEUpgradeOverride struct {
836 // PostConditions: Required. Post conditions to override for the specified
837 // upgrade (name + version). Required.
838 PostConditions *ClusterUpgradePostConditions `json:"postConditions,omitempty"`
839 // Upgrade: Required. Which upgrade to override. Required.
840 Upgrade *ClusterUpgradeGKEUpgrade `json:"upgrade,omitempty"`
841 // ForceSendFields is a list of field names (e.g. "PostConditions") to
842 // unconditionally include in API requests. By default, fields with empty or
843 // default values are omitted from API requests. See
844 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
845 // details.
846 ForceSendFields []string `json:"-"`
847 // NullFields is a list of field names (e.g. "PostConditions") to include in
848 // API requests with the JSON null value. By default, fields with empty values
849 // are omitted from API requests. See
850 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
851 NullFields []string `json:"-"`
852 }
853
854 func (s ClusterUpgradeGKEUpgradeOverride) MarshalJSON() ([]byte, error) {
855 type NoMethod ClusterUpgradeGKEUpgradeOverride
856 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
857 }
858
859 // ClusterUpgradeGKEUpgradeState: GKEUpgradeState is a GKEUpgrade and its state
860 // at the scope and fleet level.
861 type ClusterUpgradeGKEUpgradeState struct {
862 // Stats: Number of GKE clusters in each status code.
863 Stats map[string]string `json:"stats,omitempty"`
864 // Status: Status of the upgrade.
865 Status *ClusterUpgradeUpgradeStatus `json:"status,omitempty"`
866 // Upgrade: Which upgrade to track the state.
867 Upgrade *ClusterUpgradeGKEUpgrade `json:"upgrade,omitempty"`
868 // ForceSendFields is a list of field names (e.g. "Stats") to unconditionally
869 // include in API requests. By default, fields with empty or default values are
870 // omitted from API requests. See
871 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
872 // details.
873 ForceSendFields []string `json:"-"`
874 // NullFields is a list of field names (e.g. "Stats") to include in API
875 // requests with the JSON null value. By default, fields with empty values are
876 // omitted from API requests. See
877 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
878 NullFields []string `json:"-"`
879 }
880
881 func (s ClusterUpgradeGKEUpgradeState) MarshalJSON() ([]byte, error) {
882 type NoMethod ClusterUpgradeGKEUpgradeState
883 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
884 }
885
886 // ClusterUpgradeIgnoredMembership: IgnoredMembership represents a membership
887 // ignored by the feature. A membership can be ignored because it was manually
888 // upgraded to a newer version than RC default.
889 type ClusterUpgradeIgnoredMembership struct {
890 // IgnoredTime: Time when the membership was first set to ignored.
891 IgnoredTime string `json:"ignoredTime,omitempty"`
892 // Reason: Reason why the membership is ignored.
893 Reason string `json:"reason,omitempty"`
894 // ForceSendFields is a list of field names (e.g. "IgnoredTime") to
895 // unconditionally include in API requests. By default, fields with empty or
896 // default values are omitted from API requests. See
897 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
898 // details.
899 ForceSendFields []string `json:"-"`
900 // NullFields is a list of field names (e.g. "IgnoredTime") to include in API
901 // requests with the JSON null value. By default, fields with empty values are
902 // omitted from API requests. See
903 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
904 NullFields []string `json:"-"`
905 }
906
907 func (s ClusterUpgradeIgnoredMembership) MarshalJSON() ([]byte, error) {
908 type NoMethod ClusterUpgradeIgnoredMembership
909 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
910 }
911
912 // ClusterUpgradeMembershipGKEUpgradeState: ScopeGKEUpgradeState is a
913 // GKEUpgrade and its state per-membership.
914 type ClusterUpgradeMembershipGKEUpgradeState struct {
915 // Status: Status of the upgrade.
916 Status *ClusterUpgradeUpgradeStatus `json:"status,omitempty"`
917 // Upgrade: Which upgrade to track the state.
918 Upgrade *ClusterUpgradeGKEUpgrade `json:"upgrade,omitempty"`
919 // ForceSendFields is a list of field names (e.g. "Status") to unconditionally
920 // include in API requests. By default, fields with empty or default values are
921 // omitted from API requests. See
922 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
923 // details.
924 ForceSendFields []string `json:"-"`
925 // NullFields is a list of field names (e.g. "Status") to include in API
926 // requests with the JSON null value. By default, fields with empty values are
927 // omitted from API requests. See
928 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
929 NullFields []string `json:"-"`
930 }
931
932 func (s ClusterUpgradeMembershipGKEUpgradeState) MarshalJSON() ([]byte, error) {
933 type NoMethod ClusterUpgradeMembershipGKEUpgradeState
934 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
935 }
936
937 // ClusterUpgradeMembershipState: Per-membership state for this feature.
938 type ClusterUpgradeMembershipState struct {
939 // Ignored: Whether this membership is ignored by the feature. For example,
940 // manually upgraded clusters can be ignored if they are newer than the default
941 // versions of its release channel.
942 Ignored *ClusterUpgradeIgnoredMembership `json:"ignored,omitempty"`
943 // Upgrades: Actual upgrade state against desired.
944 Upgrades []*ClusterUpgradeMembershipGKEUpgradeState `json:"upgrades,omitempty"`
945 // ForceSendFields is a list of field names (e.g. "Ignored") to unconditionally
946 // include in API requests. By default, fields with empty or default values are
947 // omitted from API requests. See
948 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
949 // details.
950 ForceSendFields []string `json:"-"`
951 // NullFields is a list of field names (e.g. "Ignored") to include in API
952 // requests with the JSON null value. By default, fields with empty values are
953 // omitted from API requests. See
954 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
955 NullFields []string `json:"-"`
956 }
957
958 func (s ClusterUpgradeMembershipState) MarshalJSON() ([]byte, error) {
959 type NoMethod ClusterUpgradeMembershipState
960 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
961 }
962
963 // ClusterUpgradePostConditions: Post conditional checks after an upgrade has
964 // been applied on all eligible clusters.
965 type ClusterUpgradePostConditions struct {
966 // Soaking: Required. Amount of time to "soak" after a rollout has been
967 // finished before marking it COMPLETE. Cannot exceed 30 days. Required.
968 Soaking string `json:"soaking,omitempty"`
969 // ForceSendFields is a list of field names (e.g. "Soaking") to unconditionally
970 // include in API requests. By default, fields with empty or default values are
971 // omitted from API requests. See
972 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
973 // details.
974 ForceSendFields []string `json:"-"`
975 // NullFields is a list of field names (e.g. "Soaking") to include in API
976 // requests with the JSON null value. By default, fields with empty values are
977 // omitted from API requests. See
978 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
979 NullFields []string `json:"-"`
980 }
981
982 func (s ClusterUpgradePostConditions) MarshalJSON() ([]byte, error) {
983 type NoMethod ClusterUpgradePostConditions
984 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
985 }
986
987 // ClusterUpgradeUpgradeStatus: UpgradeStatus provides status information for
988 // each upgrade.
989 type ClusterUpgradeUpgradeStatus struct {
990 // Code: Status code of the upgrade.
991 //
992 // Possible values:
993 // "CODE_UNSPECIFIED" - Required by https://linter.aip.dev/126/unspecified.
994 // "INELIGIBLE" - The upgrade is ineligible. At the scope level, this means
995 // the upgrade is ineligible for all the clusters in the scope.
996 // "PENDING" - The upgrade is pending. At the scope level, this means the
997 // upgrade is pending for all the clusters in the scope.
998 // "IN_PROGRESS" - The upgrade is in progress. At the scope level, this means
999 // the upgrade is in progress for at least one cluster in the scope.
1000 // "SOAKING" - The upgrade has finished and is soaking until the soaking time
1001 // is up. At the scope level, this means at least one cluster is in soaking
1002 // while the rest are either soaking or complete.
1003 // "FORCED_SOAKING" - A cluster will be forced to enter soaking if an upgrade
1004 // doesn't finish within a certain limit, despite it's actual status.
1005 // "COMPLETE" - The upgrade has passed all post conditions (soaking). At the
1006 // scope level, this means all eligible clusters are in COMPLETE status.
1007 Code string `json:"code,omitempty"`
1008 // Reason: Reason for this status.
1009 Reason string `json:"reason,omitempty"`
1010 // UpdateTime: Last timestamp the status was updated.
1011 UpdateTime string `json:"updateTime,omitempty"`
1012 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
1013 // include in API requests. By default, fields with empty or default values are
1014 // omitted from API requests. See
1015 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1016 // details.
1017 ForceSendFields []string `json:"-"`
1018 // NullFields is a list of field names (e.g. "Code") to include in API requests
1019 // with the JSON null value. By default, fields with empty values are omitted
1020 // from API requests. See
1021 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1022 NullFields []string `json:"-"`
1023 }
1024
1025 func (s ClusterUpgradeUpgradeStatus) MarshalJSON() ([]byte, error) {
1026 type NoMethod ClusterUpgradeUpgradeStatus
1027 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1028 }
1029
1030 // CommonFeatureSpec: CommonFeatureSpec contains Fleet-wide configuration
1031 // information
1032 type CommonFeatureSpec struct {
1033 // Appdevexperience: Appdevexperience specific spec.
1034 Appdevexperience *AppDevExperienceFeatureSpec `json:"appdevexperience,omitempty"`
1035 // Clusterupgrade: ClusterUpgrade (fleet-based) feature spec.
1036 Clusterupgrade *ClusterUpgradeFleetSpec `json:"clusterupgrade,omitempty"`
1037 // Dataplanev2: DataplaneV2 feature spec.
1038 Dataplanev2 *DataplaneV2FeatureSpec `json:"dataplanev2,omitempty"`
1039 // Fleetobservability: FleetObservability feature spec.
1040 Fleetobservability *FleetObservabilityFeatureSpec `json:"fleetobservability,omitempty"`
1041 // Multiclusteringress: Multicluster Ingress-specific spec.
1042 Multiclusteringress *MultiClusterIngressFeatureSpec `json:"multiclusteringress,omitempty"`
1043 // Rbacrolebindingactuation: RBAC Role Binding Actuation feature spec
1044 Rbacrolebindingactuation *RBACRoleBindingActuationFeatureSpec `json:"rbacrolebindingactuation,omitempty"`
1045 // Workloadidentity: Workload Identity feature spec.
1046 Workloadidentity *WorkloadIdentityFeatureSpec `json:"workloadidentity,omitempty"`
1047 // ForceSendFields is a list of field names (e.g. "Appdevexperience") to
1048 // unconditionally include in API requests. By default, fields with empty or
1049 // default values are omitted from API requests. See
1050 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1051 // details.
1052 ForceSendFields []string `json:"-"`
1053 // NullFields is a list of field names (e.g. "Appdevexperience") to include in
1054 // API requests with the JSON null value. By default, fields with empty values
1055 // are omitted from API requests. See
1056 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1057 NullFields []string `json:"-"`
1058 }
1059
1060 func (s CommonFeatureSpec) MarshalJSON() ([]byte, error) {
1061 type NoMethod CommonFeatureSpec
1062 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1063 }
1064
1065 // CommonFeatureState: CommonFeatureState contains Fleet-wide Feature status
1066 // information.
1067 type CommonFeatureState struct {
1068 // Appdevexperience: Appdevexperience specific state.
1069 Appdevexperience *AppDevExperienceFeatureState `json:"appdevexperience,omitempty"`
1070 // Clusterupgrade: ClusterUpgrade fleet-level state.
1071 Clusterupgrade *ClusterUpgradeFleetState `json:"clusterupgrade,omitempty"`
1072 // Fleetobservability: FleetObservability feature state.
1073 Fleetobservability *FleetObservabilityFeatureState `json:"fleetobservability,omitempty"`
1074 // Rbacrolebindingactuation: RBAC Role Binding Actuation feature state
1075 Rbacrolebindingactuation *RBACRoleBindingActuationFeatureState `json:"rbacrolebindingactuation,omitempty"`
1076 // State: Output only. The "running state" of the Feature in this Fleet.
1077 State *FeatureState `json:"state,omitempty"`
1078 // Workloadidentity: WorkloadIdentity fleet-level state.
1079 Workloadidentity *WorkloadIdentityFeatureState `json:"workloadidentity,omitempty"`
1080 // ForceSendFields is a list of field names (e.g. "Appdevexperience") to
1081 // unconditionally include in API requests. By default, fields with empty or
1082 // default values are omitted from API requests. See
1083 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1084 // details.
1085 ForceSendFields []string `json:"-"`
1086 // NullFields is a list of field names (e.g. "Appdevexperience") to include in
1087 // API requests with the JSON null value. By default, fields with empty values
1088 // are omitted from API requests. See
1089 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1090 NullFields []string `json:"-"`
1091 }
1092
1093 func (s CommonFeatureState) MarshalJSON() ([]byte, error) {
1094 type NoMethod CommonFeatureState
1095 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1096 }
1097
1098 // CommonFleetDefaultMemberConfigSpec: CommonFleetDefaultMemberConfigSpec
1099 // contains default configuration information for memberships of a fleet
1100 type CommonFleetDefaultMemberConfigSpec struct {
1101 // Configmanagement: Config Management-specific spec.
1102 Configmanagement *ConfigManagementMembershipSpec `json:"configmanagement,omitempty"`
1103 // Identityservice: Identity Service-specific spec.
1104 Identityservice *IdentityServiceMembershipSpec `json:"identityservice,omitempty"`
1105 // Mesh: Anthos Service Mesh-specific spec
1106 Mesh *ServiceMeshMembershipSpec `json:"mesh,omitempty"`
1107 // Policycontroller: Policy Controller spec.
1108 Policycontroller *PolicyControllerMembershipSpec `json:"policycontroller,omitempty"`
1109 // ForceSendFields is a list of field names (e.g. "Configmanagement") to
1110 // unconditionally include in API requests. By default, fields with empty or
1111 // default values are omitted from API requests. See
1112 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1113 // details.
1114 ForceSendFields []string `json:"-"`
1115 // NullFields is a list of field names (e.g. "Configmanagement") to include in
1116 // API requests with the JSON null value. By default, fields with empty values
1117 // are omitted from API requests. See
1118 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1119 NullFields []string `json:"-"`
1120 }
1121
1122 func (s CommonFleetDefaultMemberConfigSpec) MarshalJSON() ([]byte, error) {
1123 type NoMethod CommonFleetDefaultMemberConfigSpec
1124 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1125 }
1126
1127 // CompliancePostureConfig: Deprecated: Compliance Posture is no longer
1128 // supported. For more details, see
1129 // https://cloud.google.com/kubernetes-engine/docs/deprecations/posture-management-deprecation.
1130 // CompliancePostureConfig defines the settings needed to enable/disable
1131 // features for the Compliance Posture.
1132 type CompliancePostureConfig struct {
1133 // ComplianceStandards: List of enabled compliance standards.
1134 ComplianceStandards []*ComplianceStandard `json:"complianceStandards,omitempty"`
1135 // Mode: Defines the enablement mode for Compliance Posture.
1136 //
1137 // Possible values:
1138 // "MODE_UNSPECIFIED" - Default value not specified.
1139 // "DISABLED" - Disables Compliance Posture features on the cluster.
1140 // "ENABLED" - Enables Compliance Posture features on the cluster.
1141 Mode string `json:"mode,omitempty"`
1142 // ForceSendFields is a list of field names (e.g. "ComplianceStandards") to
1143 // unconditionally include in API requests. By default, fields with empty or
1144 // default values are omitted from API requests. See
1145 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1146 // details.
1147 ForceSendFields []string `json:"-"`
1148 // NullFields is a list of field names (e.g. "ComplianceStandards") to include
1149 // in API requests with the JSON null value. By default, fields with empty
1150 // values are omitted from API requests. See
1151 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1152 NullFields []string `json:"-"`
1153 }
1154
1155 func (s CompliancePostureConfig) MarshalJSON() ([]byte, error) {
1156 type NoMethod CompliancePostureConfig
1157 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1158 }
1159
1160 type ComplianceStandard struct {
1161 // Standard: Name of the compliance standard.
1162 Standard string `json:"standard,omitempty"`
1163 // ForceSendFields is a list of field names (e.g. "Standard") to
1164 // unconditionally include in API requests. By default, fields with empty or
1165 // default values are omitted from API requests. See
1166 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1167 // details.
1168 ForceSendFields []string `json:"-"`
1169 // NullFields is a list of field names (e.g. "Standard") to include in API
1170 // requests with the JSON null value. By default, fields with empty values are
1171 // omitted from API requests. See
1172 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1173 NullFields []string `json:"-"`
1174 }
1175
1176 func (s ComplianceStandard) MarshalJSON() ([]byte, error) {
1177 type NoMethod ComplianceStandard
1178 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1179 }
1180
1181 // ConfigManagementBinauthzConfig: Configuration for Binauthz
1182 type ConfigManagementBinauthzConfig struct {
1183 // Enabled: Whether binauthz is enabled in this cluster.
1184 Enabled bool `json:"enabled,omitempty"`
1185 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
1186 // include in API requests. By default, fields with empty or default values are
1187 // omitted from API requests. See
1188 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1189 // details.
1190 ForceSendFields []string `json:"-"`
1191 // NullFields is a list of field names (e.g. "Enabled") to include in API
1192 // requests with the JSON null value. By default, fields with empty values are
1193 // omitted from API requests. See
1194 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1195 NullFields []string `json:"-"`
1196 }
1197
1198 func (s ConfigManagementBinauthzConfig) MarshalJSON() ([]byte, error) {
1199 type NoMethod ConfigManagementBinauthzConfig
1200 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1201 }
1202
1203 // ConfigManagementBinauthzState: State for Binauthz
1204 type ConfigManagementBinauthzState struct {
1205 // Version: The version of binauthz that is installed.
1206 Version *ConfigManagementBinauthzVersion `json:"version,omitempty"`
1207 // Webhook: The state of the binauthz webhook.
1208 //
1209 // Possible values:
1210 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1211 // "NOT_INSTALLED" - Deployment is not installed
1212 // "INSTALLED" - Deployment is installed
1213 // "ERROR" - Deployment was attempted to be installed, but has errors
1214 // "PENDING" - Deployment is installing or terminating
1215 Webhook string `json:"webhook,omitempty"`
1216 // ForceSendFields is a list of field names (e.g. "Version") to unconditionally
1217 // include in API requests. By default, fields with empty or default values are
1218 // omitted from API requests. See
1219 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1220 // details.
1221 ForceSendFields []string `json:"-"`
1222 // NullFields is a list of field names (e.g. "Version") to include in API
1223 // requests with the JSON null value. By default, fields with empty values are
1224 // omitted from API requests. See
1225 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1226 NullFields []string `json:"-"`
1227 }
1228
1229 func (s ConfigManagementBinauthzState) MarshalJSON() ([]byte, error) {
1230 type NoMethod ConfigManagementBinauthzState
1231 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1232 }
1233
1234 // ConfigManagementBinauthzVersion: The version of binauthz.
1235 type ConfigManagementBinauthzVersion struct {
1236 // WebhookVersion: The version of the binauthz webhook.
1237 WebhookVersion string `json:"webhookVersion,omitempty"`
1238 // ForceSendFields is a list of field names (e.g. "WebhookVersion") to
1239 // unconditionally include in API requests. By default, fields with empty or
1240 // default values are omitted from API requests. See
1241 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1242 // details.
1243 ForceSendFields []string `json:"-"`
1244 // NullFields is a list of field names (e.g. "WebhookVersion") to include in
1245 // API requests with the JSON null value. By default, fields with empty values
1246 // are omitted from API requests. See
1247 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1248 NullFields []string `json:"-"`
1249 }
1250
1251 func (s ConfigManagementBinauthzVersion) MarshalJSON() ([]byte, error) {
1252 type NoMethod ConfigManagementBinauthzVersion
1253 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1254 }
1255
1256 // ConfigManagementConfigSync: Configuration for Config Sync
1257 type ConfigManagementConfigSync struct {
1258 // DeploymentOverrides: Optional. Configuration for deployment overrides.
1259 // Applies only to Config Sync deployments with containers that are not a root
1260 // or namespace reconciler: `reconciler-manager`, `otel-collector`,
1261 // `resource-group-controller-manager`, `admission-webhook`. To override a root
1262 // or namespace reconciler, use the rootsync or reposync fields at
1263 // https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rootsync-reposync-fields#override-resources
1264 // instead.
1265 DeploymentOverrides []*ConfigManagementDeploymentOverride `json:"deploymentOverrides,omitempty"`
1266 // Enabled: Optional. Enables the installation of Config Sync. If set to true,
1267 // the Feature will manage Config Sync resources, and apply the other
1268 // ConfigSync fields if they exist. If set to false, the Feature will ignore
1269 // all other ConfigSync fields and delete the Config Sync resources. If
1270 // omitted, ConfigSync is considered enabled if the git or oci field is
1271 // present.
1272 Enabled bool `json:"enabled,omitempty"`
1273 // Git: Optional. Git repo configuration for the cluster.
1274 Git *ConfigManagementGitConfig `json:"git,omitempty"`
1275 // MetricsGcpServiceAccountEmail: Optional. The Email of the Google Cloud
1276 // Service Account (GSA) used for exporting Config Sync metrics to Cloud
1277 // Monitoring and Cloud Monarch when Workload Identity is enabled. The GSA
1278 // should have the Monitoring Metric Writer (roles/monitoring.metricWriter) IAM
1279 // role. The Kubernetes ServiceAccount `default` in the namespace
1280 // `config-management-monitoring` should be bound to the GSA. Deprecated: If
1281 // Workload Identity Federation for GKE is enabled, Google Cloud Service
1282 // Account is no longer needed for exporting Config Sync metrics:
1283 // https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/how-to/monitor-config-sync-cloud-monitoring#custom-monitoring.
1284 MetricsGcpServiceAccountEmail string `json:"metricsGcpServiceAccountEmail,omitempty"`
1285 // Oci: Optional. OCI repo configuration for the cluster
1286 Oci *ConfigManagementOciConfig `json:"oci,omitempty"`
1287 // PreventDrift: Optional. Set to true to enable the Config Sync admission
1288 // webhook to prevent drifts. If set to false, disables the Config Sync
1289 // admission webhook and does not prevent drifts. Defaults to false. See
1290 // https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/how-to/prevent-config-drift
1291 // for details.
1292 PreventDrift bool `json:"preventDrift,omitempty"`
1293 // SourceFormat: Optional. Specifies whether the Config Sync repo is in
1294 // `hierarchical` or `unstructured` mode. Defaults to `hierarchical`. See
1295 // https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/concepts/configs#organize-configs
1296 // for an explanation.
1297 SourceFormat string `json:"sourceFormat,omitempty"`
1298 // StopSyncing: Optional. Set to true to stop syncing configs for a single
1299 // cluster. Default to false.
1300 StopSyncing bool `json:"stopSyncing,omitempty"`
1301 // ForceSendFields is a list of field names (e.g. "DeploymentOverrides") to
1302 // unconditionally include in API requests. By default, fields with empty or
1303 // default values are omitted from API requests. See
1304 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1305 // details.
1306 ForceSendFields []string `json:"-"`
1307 // NullFields is a list of field names (e.g. "DeploymentOverrides") to include
1308 // in API requests with the JSON null value. By default, fields with empty
1309 // values are omitted from API requests. See
1310 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1311 NullFields []string `json:"-"`
1312 }
1313
1314 func (s ConfigManagementConfigSync) MarshalJSON() ([]byte, error) {
1315 type NoMethod ConfigManagementConfigSync
1316 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1317 }
1318
1319 // ConfigManagementConfigSyncDeploymentState: The state of ConfigSync's
1320 // deployment on a cluster
1321 type ConfigManagementConfigSyncDeploymentState struct {
1322 // AdmissionWebhook: Deployment state of admission-webhook
1323 //
1324 // Possible values:
1325 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1326 // "NOT_INSTALLED" - Deployment is not installed
1327 // "INSTALLED" - Deployment is installed
1328 // "ERROR" - Deployment was attempted to be installed, but has errors
1329 // "PENDING" - Deployment is installing or terminating
1330 AdmissionWebhook string `json:"admissionWebhook,omitempty"`
1331 // GitSync: Deployment state of the git-sync pod
1332 //
1333 // Possible values:
1334 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1335 // "NOT_INSTALLED" - Deployment is not installed
1336 // "INSTALLED" - Deployment is installed
1337 // "ERROR" - Deployment was attempted to be installed, but has errors
1338 // "PENDING" - Deployment is installing or terminating
1339 GitSync string `json:"gitSync,omitempty"`
1340 // Importer: Deployment state of the importer pod
1341 //
1342 // Possible values:
1343 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1344 // "NOT_INSTALLED" - Deployment is not installed
1345 // "INSTALLED" - Deployment is installed
1346 // "ERROR" - Deployment was attempted to be installed, but has errors
1347 // "PENDING" - Deployment is installing or terminating
1348 Importer string `json:"importer,omitempty"`
1349 // Monitor: Deployment state of the monitor pod
1350 //
1351 // Possible values:
1352 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1353 // "NOT_INSTALLED" - Deployment is not installed
1354 // "INSTALLED" - Deployment is installed
1355 // "ERROR" - Deployment was attempted to be installed, but has errors
1356 // "PENDING" - Deployment is installing or terminating
1357 Monitor string `json:"monitor,omitempty"`
1358 // OtelCollector: Deployment state of otel-collector
1359 //
1360 // Possible values:
1361 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1362 // "NOT_INSTALLED" - Deployment is not installed
1363 // "INSTALLED" - Deployment is installed
1364 // "ERROR" - Deployment was attempted to be installed, but has errors
1365 // "PENDING" - Deployment is installing or terminating
1366 OtelCollector string `json:"otelCollector,omitempty"`
1367 // ReconcilerManager: Deployment state of reconciler-manager pod
1368 //
1369 // Possible values:
1370 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1371 // "NOT_INSTALLED" - Deployment is not installed
1372 // "INSTALLED" - Deployment is installed
1373 // "ERROR" - Deployment was attempted to be installed, but has errors
1374 // "PENDING" - Deployment is installing or terminating
1375 ReconcilerManager string `json:"reconcilerManager,omitempty"`
1376 // ResourceGroupControllerManager: Deployment state of
1377 // resource-group-controller-manager
1378 //
1379 // Possible values:
1380 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1381 // "NOT_INSTALLED" - Deployment is not installed
1382 // "INSTALLED" - Deployment is installed
1383 // "ERROR" - Deployment was attempted to be installed, but has errors
1384 // "PENDING" - Deployment is installing or terminating
1385 ResourceGroupControllerManager string `json:"resourceGroupControllerManager,omitempty"`
1386 // RootReconciler: Deployment state of root-reconciler
1387 //
1388 // Possible values:
1389 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1390 // "NOT_INSTALLED" - Deployment is not installed
1391 // "INSTALLED" - Deployment is installed
1392 // "ERROR" - Deployment was attempted to be installed, but has errors
1393 // "PENDING" - Deployment is installing or terminating
1394 RootReconciler string `json:"rootReconciler,omitempty"`
1395 // Syncer: Deployment state of the syncer pod
1396 //
1397 // Possible values:
1398 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1399 // "NOT_INSTALLED" - Deployment is not installed
1400 // "INSTALLED" - Deployment is installed
1401 // "ERROR" - Deployment was attempted to be installed, but has errors
1402 // "PENDING" - Deployment is installing or terminating
1403 Syncer string `json:"syncer,omitempty"`
1404 // ForceSendFields is a list of field names (e.g. "AdmissionWebhook") to
1405 // unconditionally include in API requests. By default, fields with empty or
1406 // default values are omitted from API requests. See
1407 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1408 // details.
1409 ForceSendFields []string `json:"-"`
1410 // NullFields is a list of field names (e.g. "AdmissionWebhook") to include in
1411 // API requests with the JSON null value. By default, fields with empty values
1412 // are omitted from API requests. See
1413 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1414 NullFields []string `json:"-"`
1415 }
1416
1417 func (s ConfigManagementConfigSyncDeploymentState) MarshalJSON() ([]byte, error) {
1418 type NoMethod ConfigManagementConfigSyncDeploymentState
1419 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1420 }
1421
1422 // ConfigManagementConfigSyncError: Errors pertaining to the installation of
1423 // Config Sync
1424 type ConfigManagementConfigSyncError struct {
1425 // ErrorMessage: A string representing the user facing error message
1426 ErrorMessage string `json:"errorMessage,omitempty"`
1427 // ForceSendFields is a list of field names (e.g. "ErrorMessage") to
1428 // unconditionally include in API requests. By default, fields with empty or
1429 // default values are omitted from API requests. See
1430 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1431 // details.
1432 ForceSendFields []string `json:"-"`
1433 // NullFields is a list of field names (e.g. "ErrorMessage") to include in API
1434 // requests with the JSON null value. By default, fields with empty values are
1435 // omitted from API requests. See
1436 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1437 NullFields []string `json:"-"`
1438 }
1439
1440 func (s ConfigManagementConfigSyncError) MarshalJSON() ([]byte, error) {
1441 type NoMethod ConfigManagementConfigSyncError
1442 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1443 }
1444
1445 // ConfigManagementConfigSyncState: State information for ConfigSync
1446 type ConfigManagementConfigSyncState struct {
1447 // ClusterLevelStopSyncingState: Output only. Whether syncing resources to the
1448 // cluster is stopped at the cluster level.
1449 //
1450 // Possible values:
1451 // "STOP_SYNCING_STATE_UNSPECIFIED" - State cannot be determined
1452 // "NOT_STOPPED" - Syncing resources to the cluster is not stopped at the
1453 // cluster level.
1454 // "PENDING" - Some reconcilers stop syncing resources to the cluster, while
1455 // others are still syncing.
1456 // "STOPPED" - Syncing resources to the cluster is stopped at the cluster
1457 // level.
1458 ClusterLevelStopSyncingState string `json:"clusterLevelStopSyncingState,omitempty"`
1459 // CrCount: Output only. The number of RootSync and RepoSync CRs in the
1460 // cluster.
1461 CrCount int64 `json:"crCount,omitempty"`
1462 // DeploymentState: Output only. Information about the deployment of
1463 // ConfigSync, including the version of the various Pods deployed
1464 DeploymentState *ConfigManagementConfigSyncDeploymentState `json:"deploymentState,omitempty"`
1465 // Errors: Output only. Errors pertaining to the installation of Config Sync.
1466 Errors []*ConfigManagementConfigSyncError `json:"errors,omitempty"`
1467 // ReposyncCrd: Output only. The state of the Reposync CRD
1468 //
1469 // Possible values:
1470 // "CRD_STATE_UNSPECIFIED" - CRD's state cannot be determined
1471 // "NOT_INSTALLED" - CRD is not installed
1472 // "INSTALLED" - CRD is installed
1473 // "TERMINATING" - CRD is terminating (i.e., it has been deleted and is
1474 // cleaning up)
1475 // "INSTALLING" - CRD is installing
1476 ReposyncCrd string `json:"reposyncCrd,omitempty"`
1477 // RootsyncCrd: Output only. The state of the RootSync CRD
1478 //
1479 // Possible values:
1480 // "CRD_STATE_UNSPECIFIED" - CRD's state cannot be determined
1481 // "NOT_INSTALLED" - CRD is not installed
1482 // "INSTALLED" - CRD is installed
1483 // "TERMINATING" - CRD is terminating (i.e., it has been deleted and is
1484 // cleaning up)
1485 // "INSTALLING" - CRD is installing
1486 RootsyncCrd string `json:"rootsyncCrd,omitempty"`
1487 // State: Output only. The state of CS This field summarizes the other fields
1488 // in this message.
1489 //
1490 // Possible values:
1491 // "STATE_UNSPECIFIED" - CS's state cannot be determined.
1492 // "CONFIG_SYNC_NOT_INSTALLED" - CS is not installed.
1493 // "CONFIG_SYNC_INSTALLED" - The expected CS version is installed
1494 // successfully.
1495 // "CONFIG_SYNC_ERROR" - CS encounters errors.
1496 // "CONFIG_SYNC_PENDING" - CS is installing or terminating.
1497 State string `json:"state,omitempty"`
1498 // SyncState: Output only. The state of ConfigSync's process to sync configs to
1499 // a cluster
1500 SyncState *ConfigManagementSyncState `json:"syncState,omitempty"`
1501 // Version: Output only. The version of ConfigSync deployed
1502 Version *ConfigManagementConfigSyncVersion `json:"version,omitempty"`
1503 // ForceSendFields is a list of field names (e.g.
1504 // "ClusterLevelStopSyncingState") to unconditionally include in API requests.
1505 // By default, fields with empty or default values are omitted from API
1506 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
1507 // for more details.
1508 ForceSendFields []string `json:"-"`
1509 // NullFields is a list of field names (e.g. "ClusterLevelStopSyncingState") to
1510 // include in API requests with the JSON null value. By default, fields with
1511 // empty values are omitted from API requests. See
1512 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1513 NullFields []string `json:"-"`
1514 }
1515
1516 func (s ConfigManagementConfigSyncState) MarshalJSON() ([]byte, error) {
1517 type NoMethod ConfigManagementConfigSyncState
1518 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1519 }
1520
1521 // ConfigManagementConfigSyncVersion: Specific versioning information
1522 // pertaining to ConfigSync's Pods
1523 type ConfigManagementConfigSyncVersion struct {
1524 // AdmissionWebhook: Version of the deployed admission-webhook pod
1525 AdmissionWebhook string `json:"admissionWebhook,omitempty"`
1526 // GitSync: Version of the deployed git-sync pod
1527 GitSync string `json:"gitSync,omitempty"`
1528 // Importer: Version of the deployed importer pod
1529 Importer string `json:"importer,omitempty"`
1530 // Monitor: Version of the deployed monitor pod
1531 Monitor string `json:"monitor,omitempty"`
1532 // OtelCollector: Version of the deployed otel-collector pod
1533 OtelCollector string `json:"otelCollector,omitempty"`
1534 // ReconcilerManager: Version of the deployed reconciler-manager pod
1535 ReconcilerManager string `json:"reconcilerManager,omitempty"`
1536 // ResourceGroupControllerManager: Version of the deployed
1537 // resource-group-controller-manager pod
1538 ResourceGroupControllerManager string `json:"resourceGroupControllerManager,omitempty"`
1539 // RootReconciler: Version of the deployed reconciler container in
1540 // root-reconciler pod
1541 RootReconciler string `json:"rootReconciler,omitempty"`
1542 // Syncer: Version of the deployed syncer pod
1543 Syncer string `json:"syncer,omitempty"`
1544 // ForceSendFields is a list of field names (e.g. "AdmissionWebhook") to
1545 // unconditionally include in API requests. By default, fields with empty or
1546 // default values are omitted from API requests. See
1547 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1548 // details.
1549 ForceSendFields []string `json:"-"`
1550 // NullFields is a list of field names (e.g. "AdmissionWebhook") to include in
1551 // API requests with the JSON null value. By default, fields with empty values
1552 // are omitted from API requests. See
1553 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1554 NullFields []string `json:"-"`
1555 }
1556
1557 func (s ConfigManagementConfigSyncVersion) MarshalJSON() ([]byte, error) {
1558 type NoMethod ConfigManagementConfigSyncVersion
1559 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1560 }
1561
1562 // ConfigManagementContainerOverride: Configuration for a container override.
1563 type ConfigManagementContainerOverride struct {
1564 // ContainerName: Required. The name of the container.
1565 ContainerName string `json:"containerName,omitempty"`
1566 // CpuLimit: Optional. The cpu limit of the container. Use the following CPU
1567 // resource units:
1568 // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.
1569 CpuLimit string `json:"cpuLimit,omitempty"`
1570 // CpuRequest: Optional. The cpu request of the container. Use the following
1571 // CPU resource units:
1572 // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.
1573 CpuRequest string `json:"cpuRequest,omitempty"`
1574 // MemoryLimit: Optional. The memory limit of the container. Use the following
1575 // memory resource units:
1576 // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory.
1577 MemoryLimit string `json:"memoryLimit,omitempty"`
1578 // MemoryRequest: Optional. The memory request of the container. Use the
1579 // following memory resource units:
1580 // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory.
1581 MemoryRequest string `json:"memoryRequest,omitempty"`
1582 // ForceSendFields is a list of field names (e.g. "ContainerName") to
1583 // unconditionally include in API requests. By default, fields with empty or
1584 // default values are omitted from API requests. See
1585 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1586 // details.
1587 ForceSendFields []string `json:"-"`
1588 // NullFields is a list of field names (e.g. "ContainerName") to include in API
1589 // requests with the JSON null value. By default, fields with empty values are
1590 // omitted from API requests. See
1591 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1592 NullFields []string `json:"-"`
1593 }
1594
1595 func (s ConfigManagementContainerOverride) MarshalJSON() ([]byte, error) {
1596 type NoMethod ConfigManagementContainerOverride
1597 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1598 }
1599
1600 // ConfigManagementDeploymentOverride: Configuration for a deployment override.
1601 type ConfigManagementDeploymentOverride struct {
1602 // Containers: Optional. The containers of the deployment resource to be
1603 // overridden.
1604 Containers []*ConfigManagementContainerOverride `json:"containers,omitempty"`
1605 // DeploymentName: Required. The name of the deployment resource to be
1606 // overridden.
1607 DeploymentName string `json:"deploymentName,omitempty"`
1608 // DeploymentNamespace: Required. The namespace of the deployment resource to
1609 // be overridden.
1610 DeploymentNamespace string `json:"deploymentNamespace,omitempty"`
1611 // ForceSendFields is a list of field names (e.g. "Containers") to
1612 // unconditionally include in API requests. By default, fields with empty or
1613 // default values are omitted from API requests. See
1614 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1615 // details.
1616 ForceSendFields []string `json:"-"`
1617 // NullFields is a list of field names (e.g. "Containers") to include in API
1618 // requests with the JSON null value. By default, fields with empty values are
1619 // omitted from API requests. See
1620 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1621 NullFields []string `json:"-"`
1622 }
1623
1624 func (s ConfigManagementDeploymentOverride) MarshalJSON() ([]byte, error) {
1625 type NoMethod ConfigManagementDeploymentOverride
1626 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1627 }
1628
1629 // ConfigManagementErrorResource: Model for a config file in the git repo with
1630 // an associated Sync error
1631 type ConfigManagementErrorResource struct {
1632 // ResourceGvk: Group/version/kind of the resource that is causing an error
1633 ResourceGvk *ConfigManagementGroupVersionKind `json:"resourceGvk,omitempty"`
1634 // ResourceName: Metadata name of the resource that is causing an error
1635 ResourceName string `json:"resourceName,omitempty"`
1636 // ResourceNamespace: Namespace of the resource that is causing an error
1637 ResourceNamespace string `json:"resourceNamespace,omitempty"`
1638 // SourcePath: Path in the git repo of the erroneous config
1639 SourcePath string `json:"sourcePath,omitempty"`
1640 // ForceSendFields is a list of field names (e.g. "ResourceGvk") to
1641 // unconditionally include in API requests. By default, fields with empty or
1642 // default values are omitted from API requests. See
1643 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1644 // details.
1645 ForceSendFields []string `json:"-"`
1646 // NullFields is a list of field names (e.g. "ResourceGvk") to include in API
1647 // requests with the JSON null value. By default, fields with empty values are
1648 // omitted from API requests. See
1649 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1650 NullFields []string `json:"-"`
1651 }
1652
1653 func (s ConfigManagementErrorResource) MarshalJSON() ([]byte, error) {
1654 type NoMethod ConfigManagementErrorResource
1655 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1656 }
1657
1658 // ConfigManagementGatekeeperDeploymentState: State of Policy Controller
1659 // installation.
1660 type ConfigManagementGatekeeperDeploymentState struct {
1661 // GatekeeperAudit: Status of gatekeeper-audit deployment.
1662 //
1663 // Possible values:
1664 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1665 // "NOT_INSTALLED" - Deployment is not installed
1666 // "INSTALLED" - Deployment is installed
1667 // "ERROR" - Deployment was attempted to be installed, but has errors
1668 // "PENDING" - Deployment is installing or terminating
1669 GatekeeperAudit string `json:"gatekeeperAudit,omitempty"`
1670 // GatekeeperControllerManagerState: Status of gatekeeper-controller-manager
1671 // pod.
1672 //
1673 // Possible values:
1674 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1675 // "NOT_INSTALLED" - Deployment is not installed
1676 // "INSTALLED" - Deployment is installed
1677 // "ERROR" - Deployment was attempted to be installed, but has errors
1678 // "PENDING" - Deployment is installing or terminating
1679 GatekeeperControllerManagerState string `json:"gatekeeperControllerManagerState,omitempty"`
1680 // GatekeeperMutation: Status of the pod serving the mutation webhook.
1681 //
1682 // Possible values:
1683 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1684 // "NOT_INSTALLED" - Deployment is not installed
1685 // "INSTALLED" - Deployment is installed
1686 // "ERROR" - Deployment was attempted to be installed, but has errors
1687 // "PENDING" - Deployment is installing or terminating
1688 GatekeeperMutation string `json:"gatekeeperMutation,omitempty"`
1689 // ForceSendFields is a list of field names (e.g. "GatekeeperAudit") to
1690 // unconditionally include in API requests. By default, fields with empty or
1691 // default values are omitted from API requests. See
1692 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1693 // details.
1694 ForceSendFields []string `json:"-"`
1695 // NullFields is a list of field names (e.g. "GatekeeperAudit") to include in
1696 // API requests with the JSON null value. By default, fields with empty values
1697 // are omitted from API requests. See
1698 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1699 NullFields []string `json:"-"`
1700 }
1701
1702 func (s ConfigManagementGatekeeperDeploymentState) MarshalJSON() ([]byte, error) {
1703 type NoMethod ConfigManagementGatekeeperDeploymentState
1704 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1705 }
1706
1707 // ConfigManagementGitConfig: Git repo configuration for a single cluster.
1708 type ConfigManagementGitConfig struct {
1709 // GcpServiceAccountEmail: Optional. The Google Cloud Service Account Email
1710 // used for auth when secret_type is `gcpserviceaccount`.
1711 GcpServiceAccountEmail string `json:"gcpServiceAccountEmail,omitempty"`
1712 // HttpsProxy: Optional. URL for the HTTPS proxy to be used when communicating
1713 // with the Git repo. Only specify when secret_type is `cookiefile`, `token`,
1714 // or `none`.
1715 HttpsProxy string `json:"httpsProxy,omitempty"`
1716 // PolicyDir: Optional. The path within the Git repository that represents the
1717 // top level of the repo to sync. Default: the root directory of the
1718 // repository.
1719 PolicyDir string `json:"policyDir,omitempty"`
1720 // SecretType: Required. Type of secret configured for access to the Git repo.
1721 // Must be one of `ssh`, `cookiefile`, `gcenode`, `token`, `gcpserviceaccount`,
1722 // `githubapp` or `none`. The validation of this is case-sensitive.
1723 SecretType string `json:"secretType,omitempty"`
1724 // SyncBranch: Optional. The branch of the repository to sync from. Default:
1725 // master.
1726 SyncBranch string `json:"syncBranch,omitempty"`
1727 // SyncRepo: Required. The URL of the Git repository to use as the source of
1728 // truth.
1729 SyncRepo string `json:"syncRepo,omitempty"`
1730 // SyncRev: Optional. Git revision (tag or hash) to check out. Default HEAD.
1731 SyncRev string `json:"syncRev,omitempty"`
1732 // SyncWaitSecs: Optional. Period in seconds between consecutive syncs.
1733 // Default: 15.
1734 SyncWaitSecs int64 `json:"syncWaitSecs,omitempty,string"`
1735 // ForceSendFields is a list of field names (e.g. "GcpServiceAccountEmail") to
1736 // unconditionally include in API requests. By default, fields with empty or
1737 // default values are omitted from API requests. See
1738 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1739 // details.
1740 ForceSendFields []string `json:"-"`
1741 // NullFields is a list of field names (e.g. "GcpServiceAccountEmail") to
1742 // include in API requests with the JSON null value. By default, fields with
1743 // empty values are omitted from API requests. See
1744 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1745 NullFields []string `json:"-"`
1746 }
1747
1748 func (s ConfigManagementGitConfig) MarshalJSON() ([]byte, error) {
1749 type NoMethod ConfigManagementGitConfig
1750 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1751 }
1752
1753 // ConfigManagementGroupVersionKind: A Kubernetes object's GVK
1754 type ConfigManagementGroupVersionKind struct {
1755 // Group: Kubernetes Group
1756 Group string `json:"group,omitempty"`
1757 // Kind: Kubernetes Kind
1758 Kind string `json:"kind,omitempty"`
1759 // Version: Kubernetes Version
1760 Version string `json:"version,omitempty"`
1761 // ForceSendFields is a list of field names (e.g. "Group") to unconditionally
1762 // include in API requests. By default, fields with empty or default values are
1763 // omitted from API requests. See
1764 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1765 // details.
1766 ForceSendFields []string `json:"-"`
1767 // NullFields is a list of field names (e.g. "Group") to include in API
1768 // requests with the JSON null value. By default, fields with empty values are
1769 // omitted from API requests. See
1770 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1771 NullFields []string `json:"-"`
1772 }
1773
1774 func (s ConfigManagementGroupVersionKind) MarshalJSON() ([]byte, error) {
1775 type NoMethod ConfigManagementGroupVersionKind
1776 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1777 }
1778
1779 // ConfigManagementHierarchyControllerConfig: Configuration for Hierarchy
1780 // Controller
1781 type ConfigManagementHierarchyControllerConfig struct {
1782 // EnableHierarchicalResourceQuota: Whether hierarchical resource quota is
1783 // enabled in this cluster.
1784 EnableHierarchicalResourceQuota bool `json:"enableHierarchicalResourceQuota,omitempty"`
1785 // EnablePodTreeLabels: Whether pod tree labels are enabled in this cluster.
1786 EnablePodTreeLabels bool `json:"enablePodTreeLabels,omitempty"`
1787 // Enabled: Whether Hierarchy Controller is enabled in this cluster.
1788 Enabled bool `json:"enabled,omitempty"`
1789 // ForceSendFields is a list of field names (e.g.
1790 // "EnableHierarchicalResourceQuota") to unconditionally include in API
1791 // requests. By default, fields with empty or default values are omitted from
1792 // API requests. See
1793 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1794 // details.
1795 ForceSendFields []string `json:"-"`
1796 // NullFields is a list of field names (e.g. "EnableHierarchicalResourceQuota")
1797 // to include in API requests with the JSON null value. By default, fields with
1798 // empty values are omitted from API requests. See
1799 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1800 NullFields []string `json:"-"`
1801 }
1802
1803 func (s ConfigManagementHierarchyControllerConfig) MarshalJSON() ([]byte, error) {
1804 type NoMethod ConfigManagementHierarchyControllerConfig
1805 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1806 }
1807
1808 // ConfigManagementHierarchyControllerDeploymentState: Deployment state for
1809 // Hierarchy Controller
1810 type ConfigManagementHierarchyControllerDeploymentState struct {
1811 // Extension: The deployment state for Hierarchy Controller extension (e.g.
1812 // v0.7.0-hc.1)
1813 //
1814 // Possible values:
1815 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1816 // "NOT_INSTALLED" - Deployment is not installed
1817 // "INSTALLED" - Deployment is installed
1818 // "ERROR" - Deployment was attempted to be installed, but has errors
1819 // "PENDING" - Deployment is installing or terminating
1820 Extension string `json:"extension,omitempty"`
1821 // Hnc: The deployment state for open source HNC (e.g. v0.7.0-hc.0)
1822 //
1823 // Possible values:
1824 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1825 // "NOT_INSTALLED" - Deployment is not installed
1826 // "INSTALLED" - Deployment is installed
1827 // "ERROR" - Deployment was attempted to be installed, but has errors
1828 // "PENDING" - Deployment is installing or terminating
1829 Hnc string `json:"hnc,omitempty"`
1830 // ForceSendFields is a list of field names (e.g. "Extension") to
1831 // unconditionally include in API requests. By default, fields with empty or
1832 // default values are omitted from API requests. See
1833 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1834 // details.
1835 ForceSendFields []string `json:"-"`
1836 // NullFields is a list of field names (e.g. "Extension") to include in API
1837 // requests with the JSON null value. By default, fields with empty values are
1838 // omitted from API requests. See
1839 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1840 NullFields []string `json:"-"`
1841 }
1842
1843 func (s ConfigManagementHierarchyControllerDeploymentState) MarshalJSON() ([]byte, error) {
1844 type NoMethod ConfigManagementHierarchyControllerDeploymentState
1845 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1846 }
1847
1848 // ConfigManagementHierarchyControllerState: State for Hierarchy Controller
1849 type ConfigManagementHierarchyControllerState struct {
1850 // State: The deployment state for Hierarchy Controller
1851 State *ConfigManagementHierarchyControllerDeploymentState `json:"state,omitempty"`
1852 // Version: The version for Hierarchy Controller
1853 Version *ConfigManagementHierarchyControllerVersion `json:"version,omitempty"`
1854 // ForceSendFields is a list of field names (e.g. "State") to unconditionally
1855 // include in API requests. By default, fields with empty or default values are
1856 // omitted from API requests. See
1857 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1858 // details.
1859 ForceSendFields []string `json:"-"`
1860 // NullFields is a list of field names (e.g. "State") to include in API
1861 // requests with the JSON null value. By default, fields with empty values are
1862 // omitted from API requests. See
1863 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1864 NullFields []string `json:"-"`
1865 }
1866
1867 func (s ConfigManagementHierarchyControllerState) MarshalJSON() ([]byte, error) {
1868 type NoMethod ConfigManagementHierarchyControllerState
1869 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1870 }
1871
1872 // ConfigManagementHierarchyControllerVersion: Version for Hierarchy Controller
1873 type ConfigManagementHierarchyControllerVersion struct {
1874 // Extension: Version for Hierarchy Controller extension
1875 Extension string `json:"extension,omitempty"`
1876 // Hnc: Version for open source HNC
1877 Hnc string `json:"hnc,omitempty"`
1878 // ForceSendFields is a list of field names (e.g. "Extension") to
1879 // unconditionally include in API requests. By default, fields with empty or
1880 // default values are omitted from API requests. See
1881 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1882 // details.
1883 ForceSendFields []string `json:"-"`
1884 // NullFields is a list of field names (e.g. "Extension") to include in API
1885 // requests with the JSON null value. By default, fields with empty values are
1886 // omitted from API requests. See
1887 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1888 NullFields []string `json:"-"`
1889 }
1890
1891 func (s ConfigManagementHierarchyControllerVersion) MarshalJSON() ([]byte, error) {
1892 type NoMethod ConfigManagementHierarchyControllerVersion
1893 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1894 }
1895
1896 // ConfigManagementInstallError: Errors pertaining to the installation of ACM
1897 type ConfigManagementInstallError struct {
1898 // ErrorMessage: A string representing the user facing error message
1899 ErrorMessage string `json:"errorMessage,omitempty"`
1900 // ForceSendFields is a list of field names (e.g. "ErrorMessage") to
1901 // unconditionally include in API requests. By default, fields with empty or
1902 // default values are omitted from API requests. See
1903 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1904 // details.
1905 ForceSendFields []string `json:"-"`
1906 // NullFields is a list of field names (e.g. "ErrorMessage") to include in API
1907 // requests with the JSON null value. By default, fields with empty values are
1908 // omitted from API requests. See
1909 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1910 NullFields []string `json:"-"`
1911 }
1912
1913 func (s ConfigManagementInstallError) MarshalJSON() ([]byte, error) {
1914 type NoMethod ConfigManagementInstallError
1915 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1916 }
1917
1918 // ConfigManagementMembershipSpec: **Anthos Config Management**: Configuration
1919 // for a single cluster. Intended to parallel the ConfigManagement CR.
1920 type ConfigManagementMembershipSpec struct {
1921 // Binauthz: Optional. Deprecated: Binauthz configuration will be ignored and
1922 // should not be set.
1923 Binauthz *ConfigManagementBinauthzConfig `json:"binauthz,omitempty"`
1924 // Cluster: Optional. User-specified cluster name used by the Config Sync
1925 // cluster-name-selector annotation or ClusterSelector object, for applying
1926 // configs to only a subset of clusters. Read more about the
1927 // cluster-name-selector annotation and ClusterSelector object at
1928 // https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/how-to/cluster-scoped-objects#limiting-configs.
1929 // Only set this field if a name different from the cluster's fleet membership
1930 // name is used by the Config Sync cluster-name-selector annotation or
1931 // ClusterSelector.
1932 Cluster string `json:"cluster,omitempty"`
1933 // ConfigSync: Optional. Config Sync configuration for the cluster.
1934 ConfigSync *ConfigManagementConfigSync `json:"configSync,omitempty"`
1935 // HierarchyController: Optional. Hierarchy Controller configuration for the
1936 // cluster. Deprecated: Configuring Hierarchy Controller through the
1937 // configmanagement feature is no longer recommended. Use
1938 // https://github.com/kubernetes-sigs/hierarchical-namespaces instead.
1939 HierarchyController *ConfigManagementHierarchyControllerConfig `json:"hierarchyController,omitempty"`
1940 // Management: Optional. Deprecated: From version 1.21.0, automatic Feature
1941 // management is unavailable, and Config Sync only supports manual upgrades.
1942 //
1943 // Possible values:
1944 // "MANAGEMENT_UNSPECIFIED" - Unspecified
1945 // "MANAGEMENT_AUTOMATIC" - Google will manage the Feature for the cluster.
1946 // "MANAGEMENT_MANUAL" - User will manually manage the Feature for the
1947 // cluster.
1948 Management string `json:"management,omitempty"`
1949 // PolicyController: Optional. Policy Controller configuration for the cluster.
1950 // Deprecated: Configuring Policy Controller through the configmanagement
1951 // feature is no longer recommended. Use the policycontroller feature instead.
1952 PolicyController *ConfigManagementPolicyController `json:"policyController,omitempty"`
1953 // Version: Optional. Version of Config Sync to install. Defaults to the latest
1954 // supported Config Sync version if the config_sync field is enabled. See
1955 // supported versions at
1956 // https://cloud.google.com/kubernetes-engine/config-sync/docs/get-support-config-sync#version_support_policy.
1957 Version string `json:"version,omitempty"`
1958 // ForceSendFields is a list of field names (e.g. "Binauthz") to
1959 // unconditionally include in API requests. By default, fields with empty or
1960 // default values are omitted from API requests. See
1961 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1962 // details.
1963 ForceSendFields []string `json:"-"`
1964 // NullFields is a list of field names (e.g. "Binauthz") to include in API
1965 // requests with the JSON null value. By default, fields with empty values are
1966 // omitted from API requests. See
1967 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1968 NullFields []string `json:"-"`
1969 }
1970
1971 func (s ConfigManagementMembershipSpec) MarshalJSON() ([]byte, error) {
1972 type NoMethod ConfigManagementMembershipSpec
1973 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1974 }
1975
1976 // ConfigManagementMembershipState: **Anthos Config Management**: State for a
1977 // single cluster.
1978 type ConfigManagementMembershipState struct {
1979 // BinauthzState: Output only. Binauthz status
1980 BinauthzState *ConfigManagementBinauthzState `json:"binauthzState,omitempty"`
1981 // ClusterName: Output only. This field is set to the `cluster_name` field of
1982 // the Membership Spec if it is not empty. Otherwise, it is set to the
1983 // cluster's fleet membership name.
1984 ClusterName string `json:"clusterName,omitempty"`
1985 // ConfigSyncState: Output only. Current sync status
1986 ConfigSyncState *ConfigManagementConfigSyncState `json:"configSyncState,omitempty"`
1987 // HierarchyControllerState: Output only. Hierarchy Controller status
1988 HierarchyControllerState *ConfigManagementHierarchyControllerState `json:"hierarchyControllerState,omitempty"`
1989 // KubernetesApiServerVersion: Output only. The Kubernetes API server version
1990 // of the cluster.
1991 KubernetesApiServerVersion string `json:"kubernetesApiServerVersion,omitempty"`
1992 // MembershipSpec: Output only. Membership configuration in the cluster. This
1993 // represents the actual state in the cluster, while the MembershipSpec in the
1994 // FeatureSpec represents the intended state
1995 MembershipSpec *ConfigManagementMembershipSpec `json:"membershipSpec,omitempty"`
1996 // OperatorState: Output only. Current install status of ACM's Operator
1997 OperatorState *ConfigManagementOperatorState `json:"operatorState,omitempty"`
1998 // PolicyControllerState: Output only. PolicyController status
1999 PolicyControllerState *ConfigManagementPolicyControllerState `json:"policyControllerState,omitempty"`
2000 // ForceSendFields is a list of field names (e.g. "BinauthzState") to
2001 // unconditionally include in API requests. By default, fields with empty or
2002 // default values are omitted from API requests. See
2003 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2004 // details.
2005 ForceSendFields []string `json:"-"`
2006 // NullFields is a list of field names (e.g. "BinauthzState") to include in API
2007 // requests with the JSON null value. By default, fields with empty values are
2008 // omitted from API requests. See
2009 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2010 NullFields []string `json:"-"`
2011 }
2012
2013 func (s ConfigManagementMembershipState) MarshalJSON() ([]byte, error) {
2014 type NoMethod ConfigManagementMembershipState
2015 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2016 }
2017
2018 // ConfigManagementOciConfig: OCI repo configuration for a single cluster
2019 type ConfigManagementOciConfig struct {
2020 // GcpServiceAccountEmail: Optional. The Google Cloud Service Account Email
2021 // used for auth when secret_type is `gcpserviceaccount`.
2022 GcpServiceAccountEmail string `json:"gcpServiceAccountEmail,omitempty"`
2023 // PolicyDir: Optional. The absolute path of the directory that contains the
2024 // local resources. Default: the root directory of the image.
2025 PolicyDir string `json:"policyDir,omitempty"`
2026 // SecretType: Required. Type of secret configured for access to the OCI repo.
2027 // Must be one of `gcenode`, `gcpserviceaccount`, `k8sserviceaccount` or
2028 // `none`. The validation of this is case-sensitive.
2029 SecretType string `json:"secretType,omitempty"`
2030 // SyncRepo: Required. The OCI image repository URL for the package to sync
2031 // from. e.g.
2032 // `LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME`.
2033 SyncRepo string `json:"syncRepo,omitempty"`
2034 // SyncWaitSecs: Optional. Period in seconds between consecutive syncs.
2035 // Default: 15.
2036 SyncWaitSecs int64 `json:"syncWaitSecs,omitempty,string"`
2037 // ForceSendFields is a list of field names (e.g. "GcpServiceAccountEmail") to
2038 // unconditionally include in API requests. By default, fields with empty or
2039 // default values are omitted from API requests. See
2040 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2041 // details.
2042 ForceSendFields []string `json:"-"`
2043 // NullFields is a list of field names (e.g. "GcpServiceAccountEmail") to
2044 // include in API requests with the JSON null value. By default, fields with
2045 // empty values are omitted from API requests. See
2046 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2047 NullFields []string `json:"-"`
2048 }
2049
2050 func (s ConfigManagementOciConfig) MarshalJSON() ([]byte, error) {
2051 type NoMethod ConfigManagementOciConfig
2052 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2053 }
2054
2055 // ConfigManagementOperatorState: State information for an ACM's Operator
2056 type ConfigManagementOperatorState struct {
2057 // DeploymentState: The state of the Operator's deployment
2058 //
2059 // Possible values:
2060 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
2061 // "NOT_INSTALLED" - Deployment is not installed
2062 // "INSTALLED" - Deployment is installed
2063 // "ERROR" - Deployment was attempted to be installed, but has errors
2064 // "PENDING" - Deployment is installing or terminating
2065 DeploymentState string `json:"deploymentState,omitempty"`
2066 // Errors: Install errors.
2067 Errors []*ConfigManagementInstallError `json:"errors,omitempty"`
2068 // Version: The semenatic version number of the operator
2069 Version string `json:"version,omitempty"`
2070 // ForceSendFields is a list of field names (e.g. "DeploymentState") to
2071 // unconditionally include in API requests. By default, fields with empty or
2072 // default values are omitted from API requests. See
2073 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2074 // details.
2075 ForceSendFields []string `json:"-"`
2076 // NullFields is a list of field names (e.g. "DeploymentState") to include in
2077 // API requests with the JSON null value. By default, fields with empty values
2078 // are omitted from API requests. See
2079 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2080 NullFields []string `json:"-"`
2081 }
2082
2083 func (s ConfigManagementOperatorState) MarshalJSON() ([]byte, error) {
2084 type NoMethod ConfigManagementOperatorState
2085 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2086 }
2087
2088 // ConfigManagementPolicyController: Configuration for Policy Controller
2089 type ConfigManagementPolicyController struct {
2090 // AuditIntervalSeconds: Sets the interval for Policy Controller Audit Scans
2091 // (in seconds). When set to 0, this disables audit functionality altogether.
2092 AuditIntervalSeconds int64 `json:"auditIntervalSeconds,omitempty,string"`
2093 // Enabled: Enables the installation of Policy Controller. If false, the rest
2094 // of PolicyController fields take no effect.
2095 Enabled bool `json:"enabled,omitempty"`
2096 // ExemptableNamespaces: The set of namespaces that are excluded from Policy
2097 // Controller checks. Namespaces do not need to currently exist on the cluster.
2098 ExemptableNamespaces []string `json:"exemptableNamespaces,omitempty"`
2099 // LogDeniesEnabled: Logs all denies and dry run failures.
2100 LogDeniesEnabled bool `json:"logDeniesEnabled,omitempty"`
2101 // Monitoring: Monitoring specifies the configuration of monitoring.
2102 Monitoring *ConfigManagementPolicyControllerMonitoring `json:"monitoring,omitempty"`
2103 // MutationEnabled: Enable or disable mutation in policy controller. If true,
2104 // mutation CRDs, webhook and controller deployment will be deployed to the
2105 // cluster.
2106 MutationEnabled bool `json:"mutationEnabled,omitempty"`
2107 // ReferentialRulesEnabled: Enables the ability to use Constraint Templates
2108 // that reference to objects other than the object currently being evaluated.
2109 ReferentialRulesEnabled bool `json:"referentialRulesEnabled,omitempty"`
2110 // TemplateLibraryInstalled: Installs the default template library along with
2111 // Policy Controller.
2112 TemplateLibraryInstalled bool `json:"templateLibraryInstalled,omitempty"`
2113 // UpdateTime: Output only. Last time this membership spec was updated.
2114 UpdateTime string `json:"updateTime,omitempty"`
2115 // ForceSendFields is a list of field names (e.g. "AuditIntervalSeconds") to
2116 // unconditionally include in API requests. By default, fields with empty or
2117 // default values are omitted from API requests. See
2118 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2119 // details.
2120 ForceSendFields []string `json:"-"`
2121 // NullFields is a list of field names (e.g. "AuditIntervalSeconds") to include
2122 // in API requests with the JSON null value. By default, fields with empty
2123 // values are omitted from API requests. See
2124 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2125 NullFields []string `json:"-"`
2126 }
2127
2128 func (s ConfigManagementPolicyController) MarshalJSON() ([]byte, error) {
2129 type NoMethod ConfigManagementPolicyController
2130 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2131 }
2132
2133 // ConfigManagementPolicyControllerMigration: State for the migration of
2134 // PolicyController from ACM -> PoCo Hub.
2135 type ConfigManagementPolicyControllerMigration struct {
2136 // CopyTime: Last time this membership spec was copied to PoCo feature.
2137 CopyTime string `json:"copyTime,omitempty"`
2138 // Stage: Stage of the migration.
2139 //
2140 // Possible values:
2141 // "STAGE_UNSPECIFIED" - Unknown state of migration.
2142 // "ACM_MANAGED" - ACM Hub/Operator manages policycontroller. No migration
2143 // yet completed.
2144 // "POCO_MANAGED" - All migrations steps complete; Poco Hub now manages
2145 // policycontroller.
2146 Stage string `json:"stage,omitempty"`
2147 // ForceSendFields is a list of field names (e.g. "CopyTime") to
2148 // unconditionally include in API requests. By default, fields with empty or
2149 // default values are omitted from API requests. See
2150 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2151 // details.
2152 ForceSendFields []string `json:"-"`
2153 // NullFields is a list of field names (e.g. "CopyTime") to include in API
2154 // requests with the JSON null value. By default, fields with empty values are
2155 // omitted from API requests. See
2156 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2157 NullFields []string `json:"-"`
2158 }
2159
2160 func (s ConfigManagementPolicyControllerMigration) MarshalJSON() ([]byte, error) {
2161 type NoMethod ConfigManagementPolicyControllerMigration
2162 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2163 }
2164
2165 // ConfigManagementPolicyControllerMonitoring: PolicyControllerMonitoring
2166 // specifies the backends Policy Controller should export metrics to. For
2167 // example, to specify metrics should be exported to Cloud Monitoring and
2168 // Prometheus, specify backends: ["cloudmonitoring", "prometheus"]
2169 type ConfigManagementPolicyControllerMonitoring struct {
2170 // Backends: Specifies the list of backends Policy Controller will export to.
2171 // An empty list would effectively disable metrics export.
2172 //
2173 // Possible values:
2174 // "MONITORING_BACKEND_UNSPECIFIED" - Backend cannot be determined
2175 // "PROMETHEUS" - Prometheus backend for monitoring
2176 // "CLOUD_MONITORING" - Stackdriver/Cloud Monitoring backend for monitoring
2177 Backends []string `json:"backends,omitempty"`
2178 // ForceSendFields is a list of field names (e.g. "Backends") to
2179 // unconditionally include in API requests. By default, fields with empty or
2180 // default values are omitted from API requests. See
2181 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2182 // details.
2183 ForceSendFields []string `json:"-"`
2184 // NullFields is a list of field names (e.g. "Backends") to include in API
2185 // requests with the JSON null value. By default, fields with empty values are
2186 // omitted from API requests. See
2187 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2188 NullFields []string `json:"-"`
2189 }
2190
2191 func (s ConfigManagementPolicyControllerMonitoring) MarshalJSON() ([]byte, error) {
2192 type NoMethod ConfigManagementPolicyControllerMonitoring
2193 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2194 }
2195
2196 // ConfigManagementPolicyControllerState: State for PolicyControllerState.
2197 type ConfigManagementPolicyControllerState struct {
2198 // DeploymentState: The state about the policy controller installation.
2199 DeploymentState *ConfigManagementGatekeeperDeploymentState `json:"deploymentState,omitempty"`
2200 // Migration: Record state of ACM -> PoCo Hub migration for this feature.
2201 Migration *ConfigManagementPolicyControllerMigration `json:"migration,omitempty"`
2202 // Version: The version of Gatekeeper Policy Controller deployed.
2203 Version *ConfigManagementPolicyControllerVersion `json:"version,omitempty"`
2204 // ForceSendFields is a list of field names (e.g. "DeploymentState") to
2205 // unconditionally include in API requests. By default, fields with empty or
2206 // default values are omitted from API requests. See
2207 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2208 // details.
2209 ForceSendFields []string `json:"-"`
2210 // NullFields is a list of field names (e.g. "DeploymentState") to include in
2211 // API requests with the JSON null value. By default, fields with empty values
2212 // are omitted from API requests. See
2213 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2214 NullFields []string `json:"-"`
2215 }
2216
2217 func (s ConfigManagementPolicyControllerState) MarshalJSON() ([]byte, error) {
2218 type NoMethod ConfigManagementPolicyControllerState
2219 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2220 }
2221
2222 // ConfigManagementPolicyControllerVersion: The build version of Gatekeeper
2223 // Policy Controller is using.
2224 type ConfigManagementPolicyControllerVersion struct {
2225 // Version: The gatekeeper image tag that is composed of ACM version, git tag,
2226 // build number.
2227 Version string `json:"version,omitempty"`
2228 // ForceSendFields is a list of field names (e.g. "Version") to unconditionally
2229 // include in API requests. By default, fields with empty or default values are
2230 // omitted from API requests. See
2231 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2232 // details.
2233 ForceSendFields []string `json:"-"`
2234 // NullFields is a list of field names (e.g. "Version") to include in API
2235 // requests with the JSON null value. By default, fields with empty values are
2236 // omitted from API requests. See
2237 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2238 NullFields []string `json:"-"`
2239 }
2240
2241 func (s ConfigManagementPolicyControllerVersion) MarshalJSON() ([]byte, error) {
2242 type NoMethod ConfigManagementPolicyControllerVersion
2243 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2244 }
2245
2246 // ConfigManagementSyncError: An ACM created error representing a problem
2247 // syncing configurations
2248 type ConfigManagementSyncError struct {
2249 // Code: An ACM defined error code
2250 Code string `json:"code,omitempty"`
2251 // ErrorMessage: A description of the error
2252 ErrorMessage string `json:"errorMessage,omitempty"`
2253 // ErrorResources: A list of config(s) associated with the error, if any
2254 ErrorResources []*ConfigManagementErrorResource `json:"errorResources,omitempty"`
2255 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2256 // include in API requests. By default, fields with empty or default values are
2257 // omitted from API requests. See
2258 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2259 // details.
2260 ForceSendFields []string `json:"-"`
2261 // NullFields is a list of field names (e.g. "Code") to include in API requests
2262 // with the JSON null value. By default, fields with empty values are omitted
2263 // from API requests. See
2264 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2265 NullFields []string `json:"-"`
2266 }
2267
2268 func (s ConfigManagementSyncError) MarshalJSON() ([]byte, error) {
2269 type NoMethod ConfigManagementSyncError
2270 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2271 }
2272
2273 // ConfigManagementSyncState: State indicating an ACM's progress syncing
2274 // configurations to a cluster
2275 type ConfigManagementSyncState struct {
2276 // Code: Sync status code
2277 //
2278 // Possible values:
2279 // "SYNC_CODE_UNSPECIFIED" - Config Sync cannot determine a sync code
2280 // "SYNCED" - Config Sync successfully synced the git Repo with the cluster
2281 // "PENDING" - Config Sync is in the progress of syncing a new change
2282 // "ERROR" - Indicates an error configuring Config Sync, and user action is
2283 // required
2284 // "NOT_CONFIGURED" - Config Sync has been installed but not configured
2285 // "NOT_INSTALLED" - Config Sync has not been installed
2286 // "UNAUTHORIZED" - Error authorizing with the cluster
2287 // "UNREACHABLE" - Cluster could not be reached
2288 Code string `json:"code,omitempty"`
2289 // Errors: A list of errors resulting from problematic configs. This list will
2290 // be truncated after 100 errors, although it is unlikely for that many errors
2291 // to simultaneously exist.
2292 Errors []*ConfigManagementSyncError `json:"errors,omitempty"`
2293 // ImportToken: Token indicating the state of the importer.
2294 ImportToken string `json:"importToken,omitempty"`
2295 // LastSync: Deprecated: use last_sync_time instead. Timestamp of when ACM last
2296 // successfully synced the repo The time format is specified in
2297 // https://golang.org/pkg/time/#Time.String
2298 LastSync string `json:"lastSync,omitempty"`
2299 // LastSyncTime: Timestamp type of when ACM last successfully synced the repo
2300 LastSyncTime string `json:"lastSyncTime,omitempty"`
2301 // SourceToken: Token indicating the state of the repo.
2302 SourceToken string `json:"sourceToken,omitempty"`
2303 // SyncToken: Token indicating the state of the syncer.
2304 SyncToken string `json:"syncToken,omitempty"`
2305 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2306 // include in API requests. By default, fields with empty or default values are
2307 // omitted from API requests. See
2308 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2309 // details.
2310 ForceSendFields []string `json:"-"`
2311 // NullFields is a list of field names (e.g. "Code") to include in API requests
2312 // with the JSON null value. By default, fields with empty values are omitted
2313 // from API requests. See
2314 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2315 NullFields []string `json:"-"`
2316 }
2317
2318 func (s ConfigManagementSyncState) MarshalJSON() ([]byte, error) {
2319 type NoMethod ConfigManagementSyncState
2320 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2321 }
2322
2323 // ConnectAgentResource: ConnectAgentResource represents a Kubernetes resource
2324 // manifest for Connect Agent deployment.
2325 type ConnectAgentResource struct {
2326 // Manifest: YAML manifest of the resource.
2327 Manifest string `json:"manifest,omitempty"`
2328 // Type: Kubernetes type of the resource.
2329 Type *TypeMeta `json:"type,omitempty"`
2330 // ForceSendFields is a list of field names (e.g. "Manifest") to
2331 // unconditionally include in API requests. By default, fields with empty or
2332 // default values are omitted from API requests. See
2333 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2334 // details.
2335 ForceSendFields []string `json:"-"`
2336 // NullFields is a list of field names (e.g. "Manifest") to include in API
2337 // requests with the JSON null value. By default, fields with empty values are
2338 // omitted from API requests. See
2339 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2340 NullFields []string `json:"-"`
2341 }
2342
2343 func (s ConnectAgentResource) MarshalJSON() ([]byte, error) {
2344 type NoMethod ConnectAgentResource
2345 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2346 }
2347
2348 // DataplaneV2FeatureSpec: **Dataplane V2**: Spec
2349 type DataplaneV2FeatureSpec struct {
2350 // EnableEncryption: Enable dataplane-v2 based encryption for multiple
2351 // clusters.
2352 EnableEncryption bool `json:"enableEncryption,omitempty"`
2353 // ForceSendFields is a list of field names (e.g. "EnableEncryption") to
2354 // unconditionally include in API requests. By default, fields with empty or
2355 // default values are omitted from API requests. See
2356 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2357 // details.
2358 ForceSendFields []string `json:"-"`
2359 // NullFields is a list of field names (e.g. "EnableEncryption") to include in
2360 // API requests with the JSON null value. By default, fields with empty values
2361 // are omitted from API requests. See
2362 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2363 NullFields []string `json:"-"`
2364 }
2365
2366 func (s DataplaneV2FeatureSpec) MarshalJSON() ([]byte, error) {
2367 type NoMethod DataplaneV2FeatureSpec
2368 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2369 }
2370
2371 // DefaultClusterConfig: DefaultClusterConfig describes the default cluster
2372 // configurations to be applied to all clusters born-in-fleet.
2373 type DefaultClusterConfig struct {
2374 // BinaryAuthorizationConfig: Optional. Enable/Disable binary authorization
2375 // features for the cluster.
2376 BinaryAuthorizationConfig *BinaryAuthorizationConfig `json:"binaryAuthorizationConfig,omitempty"`
2377 // CompliancePostureConfig: Optional. Deprecated: Compliance Posture is no
2378 // longer supported. For more details, see
2379 // https://cloud.google.com/kubernetes-engine/docs/deprecations/posture-management-deprecation.
2380 // Enable/Disable Compliance Posture features for the cluster. Note that on
2381 // UpdateFleet, only full replacement of this field is allowed. Users are not
2382 // allowed for partial updates through field mask.
2383 CompliancePostureConfig *CompliancePostureConfig `json:"compliancePostureConfig,omitempty"`
2384 // SecurityPostureConfig: Optional. Enable/Disable Security Posture features
2385 // for the cluster.
2386 SecurityPostureConfig *SecurityPostureConfig `json:"securityPostureConfig,omitempty"`
2387 // ForceSendFields is a list of field names (e.g. "BinaryAuthorizationConfig")
2388 // to unconditionally include in API requests. By default, fields with empty or
2389 // default values are omitted from API requests. See
2390 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2391 // details.
2392 ForceSendFields []string `json:"-"`
2393 // NullFields is a list of field names (e.g. "BinaryAuthorizationConfig") to
2394 // include in API requests with the JSON null value. By default, fields with
2395 // empty values are omitted from API requests. See
2396 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2397 NullFields []string `json:"-"`
2398 }
2399
2400 func (s DefaultClusterConfig) MarshalJSON() ([]byte, error) {
2401 type NoMethod DefaultClusterConfig
2402 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2403 }
2404
2405 // EdgeCluster: EdgeCluster contains information specific to Google Edge
2406 // Clusters.
2407 type EdgeCluster struct {
2408 // ResourceLink: Immutable. Self-link of the Google Cloud resource for the Edge
2409 // Cluster. For example:
2410 // //edgecontainer.googleapis.com/projects/my-project/locations/us-west1-a/clust
2411 // ers/my-cluster
2412 ResourceLink string `json:"resourceLink,omitempty"`
2413 // ForceSendFields is a list of field names (e.g. "ResourceLink") to
2414 // unconditionally include in API requests. By default, fields with empty or
2415 // default values are omitted from API requests. See
2416 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2417 // details.
2418 ForceSendFields []string `json:"-"`
2419 // NullFields is a list of field names (e.g. "ResourceLink") to include in API
2420 // requests with the JSON null value. By default, fields with empty values are
2421 // omitted from API requests. See
2422 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2423 NullFields []string `json:"-"`
2424 }
2425
2426 func (s EdgeCluster) MarshalJSON() ([]byte, error) {
2427 type NoMethod EdgeCluster
2428 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2429 }
2430
2431 // Empty: A generic empty message that you can re-use to avoid defining
2432 // duplicated empty messages in your APIs. A typical example is to use it as
2433 // the request or the response type of an API method. For instance: service Foo
2434 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
2435 type Empty struct {
2436 // ServerResponse contains the HTTP response code and headers from the server.
2437 googleapi.ServerResponse `json:"-"`
2438 }
2439
2440 // Expr: Represents a textual expression in the Common Expression Language
2441 // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
2442 // of CEL are documented at https://github.com/google/cel-spec. Example
2443 // (Comparison): title: "Summary size limit" description: "Determines if a
2444 // summary is less than 100 chars" expression: "document.summary.size() < 100"
2445 // Example (Equality): title: "Requestor is owner" description: "Determines if
2446 // requestor is the document owner" expression: "document.owner ==
2447 // request.auth.claims.email" Example (Logic): title: "Public documents"
2448 // description: "Determine whether the document should be publicly visible"
2449 // expression: "document.type != 'private' && document.type != 'internal'"
2450 // Example (Data Manipulation): title: "Notification string" description:
2451 // "Create a notification string with a timestamp." expression: "'New message
2452 // received at ' + string(document.create_time)" The exact variables and
2453 // functions that may be referenced within an expression are determined by the
2454 // service that evaluates it. See the service documentation for additional
2455 // information.
2456 type Expr struct {
2457 // Description: Optional. Description of the expression. This is a longer text
2458 // which describes the expression, e.g. when hovered over it in a UI.
2459 Description string `json:"description,omitempty"`
2460 // Expression: Textual representation of an expression in Common Expression
2461 // Language syntax.
2462 Expression string `json:"expression,omitempty"`
2463 // Location: Optional. String indicating the location of the expression for
2464 // error reporting, e.g. a file name and a position in the file.
2465 Location string `json:"location,omitempty"`
2466 // Title: Optional. Title for the expression, i.e. a short string describing
2467 // its purpose. This can be used e.g. in UIs which allow to enter the
2468 // expression.
2469 Title string `json:"title,omitempty"`
2470 // ForceSendFields is a list of field names (e.g. "Description") to
2471 // unconditionally include in API requests. By default, fields with empty or
2472 // default values are omitted from API requests. See
2473 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2474 // details.
2475 ForceSendFields []string `json:"-"`
2476 // NullFields is a list of field names (e.g. "Description") to include in API
2477 // requests with the JSON null value. By default, fields with empty values are
2478 // omitted from API requests. See
2479 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2480 NullFields []string `json:"-"`
2481 }
2482
2483 func (s Expr) MarshalJSON() ([]byte, error) {
2484 type NoMethod Expr
2485 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2486 }
2487
2488 // Feature: Feature represents the settings and status of any Fleet Feature.
2489 type Feature struct {
2490 // CreateTime: Output only. When the Feature resource was created.
2491 CreateTime string `json:"createTime,omitempty"`
2492 // DeleteTime: Output only. When the Feature resource was deleted.
2493 DeleteTime string `json:"deleteTime,omitempty"`
2494 // FleetDefaultMemberConfig: Optional. Feature configuration applicable to all
2495 // memberships of the fleet.
2496 FleetDefaultMemberConfig *CommonFleetDefaultMemberConfigSpec `json:"fleetDefaultMemberConfig,omitempty"`
2497 // Labels: Labels for this Feature.
2498 Labels map[string]string `json:"labels,omitempty"`
2499 // MembershipSpecs: Optional. Membership-specific configuration for this
2500 // Feature. If this Feature does not support any per-Membership configuration,
2501 // this field may be unused. The keys indicate which Membership the
2502 // configuration is for, in the form:
2503 // `projects/{p}/locations/{l}/memberships/{m}` Where {p} is the project, {l}
2504 // is a valid location and {m} is a valid Membership in this project at that
2505 // location. {p} WILL match the Feature's project. {p} will always be returned
2506 // as the project number, but the project ID is also accepted during input. If
2507 // the same Membership is specified in the map twice (using the project ID
2508 // form, and the project number form), exactly ONE of the entries will be
2509 // saved, with no guarantees as to which. For this reason, it is recommended
2510 // the same format be used for all entries when mutating a Feature.
2511 MembershipSpecs map[string]MembershipFeatureSpec `json:"membershipSpecs,omitempty"`
2512 // MembershipStates: Output only. Membership-specific Feature status. If this
2513 // Feature does report any per-Membership status, this field may be unused. The
2514 // keys indicate which Membership the state is for, in the form:
2515 // `projects/{p}/locations/{l}/memberships/{m}` Where {p} is the project
2516 // number, {l} is a valid location and {m} is a valid Membership in this
2517 // project at that location. {p} MUST match the Feature's project number.
2518 MembershipStates map[string]MembershipFeatureState `json:"membershipStates,omitempty"`
2519 // Name: Output only. The full, unique name of this Feature resource in the
2520 // format `projects/*/locations/*/features/*`.
2521 Name string `json:"name,omitempty"`
2522 // ResourceState: Output only. State of the Feature resource itself.
2523 ResourceState *FeatureResourceState `json:"resourceState,omitempty"`
2524 // ScopeSpecs: Optional. Scope-specific configuration for this Feature. If this
2525 // Feature does not support any per-Scope configuration, this field may be
2526 // unused. The keys indicate which Scope the configuration is for, in the form:
2527 // `projects/{p}/locations/global/scopes/{s}` Where {p} is the project, {s} is
2528 // a valid Scope in this project. {p} WILL match the Feature's project. {p}
2529 // will always be returned as the project number, but the project ID is also
2530 // accepted during input. If the same Scope is specified in the map twice
2531 // (using the project ID form, and the project number form), exactly ONE of the
2532 // entries will be saved, with no guarantees as to which. For this reason, it
2533 // is recommended the same format be used for all entries when mutating a
2534 // Feature.
2535 ScopeSpecs map[string]ScopeFeatureSpec `json:"scopeSpecs,omitempty"`
2536 // ScopeStates: Output only. Scope-specific Feature status. If this Feature
2537 // does report any per-Scope status, this field may be unused. The keys
2538 // indicate which Scope the state is for, in the form:
2539 // `projects/{p}/locations/global/scopes/{s}` Where {p} is the project, {s} is
2540 // a valid Scope in this project. {p} WILL match the Feature's project.
2541 ScopeStates map[string]ScopeFeatureState `json:"scopeStates,omitempty"`
2542 // Spec: Optional. Fleet-wide Feature configuration. If this Feature does not
2543 // support any Fleet-wide configuration, this field may be unused.
2544 Spec *CommonFeatureSpec `json:"spec,omitempty"`
2545 // State: Output only. The Fleet-wide Feature state.
2546 State *CommonFeatureState `json:"state,omitempty"`
2547 // Unreachable: Output only. List of locations that could not be reached while
2548 // fetching this feature.
2549 Unreachable []string `json:"unreachable,omitempty"`
2550 // UpdateTime: Output only. When the Feature resource was last updated.
2551 UpdateTime string `json:"updateTime,omitempty"`
2552
2553 // ServerResponse contains the HTTP response code and headers from the server.
2554 googleapi.ServerResponse `json:"-"`
2555 // ForceSendFields is a list of field names (e.g. "CreateTime") to
2556 // unconditionally include in API requests. By default, fields with empty or
2557 // default values are omitted from API requests. See
2558 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2559 // details.
2560 ForceSendFields []string `json:"-"`
2561 // NullFields is a list of field names (e.g. "CreateTime") to include in API
2562 // requests with the JSON null value. By default, fields with empty values are
2563 // omitted from API requests. See
2564 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2565 NullFields []string `json:"-"`
2566 }
2567
2568 func (s Feature) MarshalJSON() ([]byte, error) {
2569 type NoMethod Feature
2570 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2571 }
2572
2573 // FeatureResourceState: FeatureResourceState describes the state of a Feature
2574 // *resource* in the GkeHub API. See `FeatureState` for the "running state" of
2575 // the Feature in the Fleet and across Memberships.
2576 type FeatureResourceState struct {
2577 // State: The current state of the Feature resource in the Hub API.
2578 //
2579 // Possible values:
2580 // "STATE_UNSPECIFIED" - State is unknown or not set.
2581 // "ENABLING" - The Feature is being enabled, and the Feature resource is
2582 // being created. Once complete, the corresponding Feature will be enabled in
2583 // this Fleet.
2584 // "ACTIVE" - The Feature is enabled in this Fleet, and the Feature resource
2585 // is fully available.
2586 // "DISABLING" - The Feature is being disabled in this Fleet, and the Feature
2587 // resource is being deleted.
2588 // "UPDATING" - The Feature resource is being updated.
2589 // "SERVICE_UPDATING" - The Feature resource is being updated by the Hub
2590 // Service.
2591 State string `json:"state,omitempty"`
2592 // ForceSendFields is a list of field names (e.g. "State") to unconditionally
2593 // include in API requests. By default, fields with empty or default values are
2594 // omitted from API requests. See
2595 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2596 // details.
2597 ForceSendFields []string `json:"-"`
2598 // NullFields is a list of field names (e.g. "State") to include in API
2599 // requests with the JSON null value. By default, fields with empty values are
2600 // omitted from API requests. See
2601 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2602 NullFields []string `json:"-"`
2603 }
2604
2605 func (s FeatureResourceState) MarshalJSON() ([]byte, error) {
2606 type NoMethod FeatureResourceState
2607 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2608 }
2609
2610 // FeatureState: FeatureState describes the high-level state of a Feature. It
2611 // may be used to describe a Feature's state at the environ-level, or
2612 // per-membershop, depending on the context.
2613 type FeatureState struct {
2614 // Code: The high-level, machine-readable status of this Feature.
2615 //
2616 // Possible values:
2617 // "CODE_UNSPECIFIED" - Unknown or not set.
2618 // "OK" - The Feature is operating normally.
2619 // "WARNING" - The Feature has encountered an issue, and is operating in a
2620 // degraded state. The Feature may need intervention to return to normal
2621 // operation. See the description and any associated Feature-specific details
2622 // for more information.
2623 // "ERROR" - The Feature is not operating or is in a severely degraded state.
2624 // The Feature may need intervention to return to normal operation. See the
2625 // description and any associated Feature-specific details for more
2626 // information.
2627 Code string `json:"code,omitempty"`
2628 // Description: A human-readable description of the current status.
2629 Description string `json:"description,omitempty"`
2630 // UpdateTime: The time this status and any related Feature-specific details
2631 // were updated.
2632 UpdateTime string `json:"updateTime,omitempty"`
2633 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2634 // include in API requests. By default, fields with empty or default values are
2635 // omitted from API requests. See
2636 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2637 // details.
2638 ForceSendFields []string `json:"-"`
2639 // NullFields is a list of field names (e.g. "Code") to include in API requests
2640 // with the JSON null value. By default, fields with empty values are omitted
2641 // from API requests. See
2642 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2643 NullFields []string `json:"-"`
2644 }
2645
2646 func (s FeatureState) MarshalJSON() ([]byte, error) {
2647 type NoMethod FeatureState
2648 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2649 }
2650
2651 // Fleet: Fleet contains the Fleet-wide metadata and configuration.
2652 type Fleet struct {
2653 // CreateTime: Output only. When the Fleet was created.
2654 CreateTime string `json:"createTime,omitempty"`
2655 // DefaultClusterConfig: Optional. The default cluster configurations to apply
2656 // across the fleet.
2657 DefaultClusterConfig *DefaultClusterConfig `json:"defaultClusterConfig,omitempty"`
2658 // DeleteTime: Output only. When the Fleet was deleted.
2659 DeleteTime string `json:"deleteTime,omitempty"`
2660 // DisplayName: Optional. A user-assigned display name of the Fleet. When
2661 // present, it must be between 4 to 30 characters. Allowed characters are:
2662 // lowercase and uppercase letters, numbers, hyphen, single-quote,
2663 // double-quote, space, and exclamation point. Example: `Production Fleet`
2664 DisplayName string `json:"displayName,omitempty"`
2665 // Labels: Optional. Labels for this Fleet.
2666 Labels map[string]string `json:"labels,omitempty"`
2667 // Name: Output only. The full, unique resource name of this fleet in the
2668 // format of `projects/{project}/locations/{location}/fleets/{fleet}`. Each
2669 // Google Cloud project can have at most one fleet resource, named "default".
2670 Name string `json:"name,omitempty"`
2671 // State: Output only. State of the namespace resource.
2672 State *FleetLifecycleState `json:"state,omitempty"`
2673 // Uid: Output only. Google-generated UUID for this resource. This is unique
2674 // across all Fleet resources. If a Fleet resource is deleted and another
2675 // resource with the same name is created, it gets a different uid.
2676 Uid string `json:"uid,omitempty"`
2677 // UpdateTime: Output only. When the Fleet was last updated.
2678 UpdateTime string `json:"updateTime,omitempty"`
2679
2680 // ServerResponse contains the HTTP response code and headers from the server.
2681 googleapi.ServerResponse `json:"-"`
2682 // ForceSendFields is a list of field names (e.g. "CreateTime") to
2683 // unconditionally include in API requests. By default, fields with empty or
2684 // default values are omitted from API requests. See
2685 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2686 // details.
2687 ForceSendFields []string `json:"-"`
2688 // NullFields is a list of field names (e.g. "CreateTime") to include in API
2689 // requests with the JSON null value. By default, fields with empty values are
2690 // omitted from API requests. See
2691 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2692 NullFields []string `json:"-"`
2693 }
2694
2695 func (s Fleet) MarshalJSON() ([]byte, error) {
2696 type NoMethod Fleet
2697 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2698 }
2699
2700 // FleetLifecycleState: FleetLifecycleState describes the state of a Fleet
2701 // resource.
2702 type FleetLifecycleState struct {
2703 // Code: Output only. The current state of the Fleet resource.
2704 //
2705 // Possible values:
2706 // "CODE_UNSPECIFIED" - The code is not set.
2707 // "CREATING" - The fleet is being created.
2708 // "READY" - The fleet active.
2709 // "DELETING" - The fleet is being deleted.
2710 // "UPDATING" - The fleet is being updated.
2711 Code string `json:"code,omitempty"`
2712 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2713 // include in API requests. By default, fields with empty or default values are
2714 // omitted from API requests. See
2715 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2716 // details.
2717 ForceSendFields []string `json:"-"`
2718 // NullFields is a list of field names (e.g. "Code") to include in API requests
2719 // with the JSON null value. By default, fields with empty values are omitted
2720 // from API requests. See
2721 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2722 NullFields []string `json:"-"`
2723 }
2724
2725 func (s FleetLifecycleState) MarshalJSON() ([]byte, error) {
2726 type NoMethod FleetLifecycleState
2727 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2728 }
2729
2730 // FleetObservabilityFeatureError: All error details of the fleet observability
2731 // feature.
2732 type FleetObservabilityFeatureError struct {
2733 // Code: The code of the error.
2734 Code string `json:"code,omitempty"`
2735 // Description: A human-readable description of the current status.
2736 Description string `json:"description,omitempty"`
2737 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2738 // include in API requests. By default, fields with empty or default values are
2739 // omitted from API requests. See
2740 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2741 // details.
2742 ForceSendFields []string `json:"-"`
2743 // NullFields is a list of field names (e.g. "Code") to include in API requests
2744 // with the JSON null value. By default, fields with empty values are omitted
2745 // from API requests. See
2746 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2747 NullFields []string `json:"-"`
2748 }
2749
2750 func (s FleetObservabilityFeatureError) MarshalJSON() ([]byte, error) {
2751 type NoMethod FleetObservabilityFeatureError
2752 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2753 }
2754
2755 // FleetObservabilityFeatureSpec: **Fleet Observability**: The Hub-wide input
2756 // for the FleetObservability feature.
2757 type FleetObservabilityFeatureSpec struct {
2758 // LoggingConfig: Specified if fleet logging feature is enabled for the entire
2759 // fleet. If UNSPECIFIED, fleet logging feature is disabled for the entire
2760 // fleet.
2761 LoggingConfig *FleetObservabilityLoggingConfig `json:"loggingConfig,omitempty"`
2762 // ForceSendFields is a list of field names (e.g. "LoggingConfig") to
2763 // unconditionally include in API requests. By default, fields with empty or
2764 // default values are omitted from API requests. See
2765 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2766 // details.
2767 ForceSendFields []string `json:"-"`
2768 // NullFields is a list of field names (e.g. "LoggingConfig") to include in API
2769 // requests with the JSON null value. By default, fields with empty values are
2770 // omitted from API requests. See
2771 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2772 NullFields []string `json:"-"`
2773 }
2774
2775 func (s FleetObservabilityFeatureSpec) MarshalJSON() ([]byte, error) {
2776 type NoMethod FleetObservabilityFeatureSpec
2777 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2778 }
2779
2780 // FleetObservabilityFeatureState: **FleetObservability**: Hub-wide Feature for
2781 // FleetObservability feature. state.
2782 type FleetObservabilityFeatureState struct {
2783 // Logging: The feature state of default logging.
2784 Logging *FleetObservabilityFleetObservabilityLoggingState `json:"logging,omitempty"`
2785 // Monitoring: The feature state of fleet monitoring.
2786 Monitoring *FleetObservabilityFleetObservabilityMonitoringState `json:"monitoring,omitempty"`
2787 // ForceSendFields is a list of field names (e.g. "Logging") to unconditionally
2788 // include in API requests. By default, fields with empty or default values are
2789 // omitted from API requests. See
2790 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2791 // details.
2792 ForceSendFields []string `json:"-"`
2793 // NullFields is a list of field names (e.g. "Logging") to include in API
2794 // requests with the JSON null value. By default, fields with empty values are
2795 // omitted from API requests. See
2796 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2797 NullFields []string `json:"-"`
2798 }
2799
2800 func (s FleetObservabilityFeatureState) MarshalJSON() ([]byte, error) {
2801 type NoMethod FleetObservabilityFeatureState
2802 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2803 }
2804
2805 // FleetObservabilityFleetObservabilityBaseFeatureState: Base state for fleet
2806 // observability feature.
2807 type FleetObservabilityFleetObservabilityBaseFeatureState struct {
2808 // Code: The high-level, machine-readable status of this Feature.
2809 //
2810 // Possible values:
2811 // "CODE_UNSPECIFIED" - Unknown or not set.
2812 // "OK" - The Feature is operating normally.
2813 // "ERROR" - The Feature is encountering errors in the reconciliation. The
2814 // Feature may need intervention to return to normal operation. See the
2815 // description and any associated Feature-specific details for more
2816 // information.
2817 Code string `json:"code,omitempty"`
2818 // Errors: Errors after reconciling the monitoring and logging feature if the
2819 // code is not OK.
2820 Errors []*FleetObservabilityFeatureError `json:"errors,omitempty"`
2821 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2822 // include in API requests. By default, fields with empty or default values are
2823 // omitted from API requests. See
2824 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2825 // details.
2826 ForceSendFields []string `json:"-"`
2827 // NullFields is a list of field names (e.g. "Code") to include in API requests
2828 // with the JSON null value. By default, fields with empty values are omitted
2829 // from API requests. See
2830 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2831 NullFields []string `json:"-"`
2832 }
2833
2834 func (s FleetObservabilityFleetObservabilityBaseFeatureState) MarshalJSON() ([]byte, error) {
2835 type NoMethod FleetObservabilityFleetObservabilityBaseFeatureState
2836 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2837 }
2838
2839 // FleetObservabilityFleetObservabilityLoggingState: Feature state for logging
2840 // feature.
2841 type FleetObservabilityFleetObservabilityLoggingState struct {
2842 // DefaultLog: The base feature state of fleet default log.
2843 DefaultLog *FleetObservabilityFleetObservabilityBaseFeatureState `json:"defaultLog,omitempty"`
2844 // ScopeLog: The base feature state of fleet scope log.
2845 ScopeLog *FleetObservabilityFleetObservabilityBaseFeatureState `json:"scopeLog,omitempty"`
2846 // ForceSendFields is a list of field names (e.g. "DefaultLog") to
2847 // unconditionally include in API requests. By default, fields with empty or
2848 // default values are omitted from API requests. See
2849 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2850 // details.
2851 ForceSendFields []string `json:"-"`
2852 // NullFields is a list of field names (e.g. "DefaultLog") to include in API
2853 // requests with the JSON null value. By default, fields with empty values are
2854 // omitted from API requests. See
2855 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2856 NullFields []string `json:"-"`
2857 }
2858
2859 func (s FleetObservabilityFleetObservabilityLoggingState) MarshalJSON() ([]byte, error) {
2860 type NoMethod FleetObservabilityFleetObservabilityLoggingState
2861 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2862 }
2863
2864 // FleetObservabilityFleetObservabilityMonitoringState: Feature state for
2865 // monitoring feature.
2866 type FleetObservabilityFleetObservabilityMonitoringState struct {
2867 // State: The base feature state of fleet monitoring feature.
2868 State *FleetObservabilityFleetObservabilityBaseFeatureState `json:"state,omitempty"`
2869 // ForceSendFields is a list of field names (e.g. "State") to unconditionally
2870 // include in API requests. By default, fields with empty or default values are
2871 // omitted from API requests. See
2872 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2873 // details.
2874 ForceSendFields []string `json:"-"`
2875 // NullFields is a list of field names (e.g. "State") to include in API
2876 // requests with the JSON null value. By default, fields with empty values are
2877 // omitted from API requests. See
2878 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2879 NullFields []string `json:"-"`
2880 }
2881
2882 func (s FleetObservabilityFleetObservabilityMonitoringState) MarshalJSON() ([]byte, error) {
2883 type NoMethod FleetObservabilityFleetObservabilityMonitoringState
2884 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2885 }
2886
2887 // FleetObservabilityLoggingConfig: LoggingConfig defines the configuration for
2888 // different types of logs.
2889 type FleetObservabilityLoggingConfig struct {
2890 // DefaultConfig: Specified if applying the default routing config to logs not
2891 // specified in other configs.
2892 DefaultConfig *FleetObservabilityRoutingConfig `json:"defaultConfig,omitempty"`
2893 // FleetScopeLogsConfig: Specified if applying the routing config to all logs
2894 // for all fleet scopes.
2895 FleetScopeLogsConfig *FleetObservabilityRoutingConfig `json:"fleetScopeLogsConfig,omitempty"`
2896 // ForceSendFields is a list of field names (e.g. "DefaultConfig") to
2897 // unconditionally include in API requests. By default, fields with empty or
2898 // default values are omitted from API requests. See
2899 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2900 // details.
2901 ForceSendFields []string `json:"-"`
2902 // NullFields is a list of field names (e.g. "DefaultConfig") to include in API
2903 // requests with the JSON null value. By default, fields with empty values are
2904 // omitted from API requests. See
2905 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2906 NullFields []string `json:"-"`
2907 }
2908
2909 func (s FleetObservabilityLoggingConfig) MarshalJSON() ([]byte, error) {
2910 type NoMethod FleetObservabilityLoggingConfig
2911 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2912 }
2913
2914 // FleetObservabilityMembershipSpec: **FleetObservability**: The
2915 // membership-specific input for FleetObservability feature.
2916 type FleetObservabilityMembershipSpec struct {
2917 }
2918
2919 // FleetObservabilityMembershipState: **FleetObservability**:
2920 // Membership-specific Feature state for fleetobservability.
2921 type FleetObservabilityMembershipState struct {
2922 }
2923
2924 // FleetObservabilityRoutingConfig: RoutingConfig configures the behaviour of
2925 // fleet logging feature.
2926 type FleetObservabilityRoutingConfig struct {
2927 // Mode: mode configures the logs routing mode.
2928 //
2929 // Possible values:
2930 // "MODE_UNSPECIFIED" - If UNSPECIFIED, fleet logging feature is disabled.
2931 // "COPY" - logs will be copied to the destination project.
2932 // "MOVE" - logs will be moved to the destination project.
2933 Mode string `json:"mode,omitempty"`
2934 // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally
2935 // include in API requests. By default, fields with empty or default values are
2936 // omitted from API requests. See
2937 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2938 // details.
2939 ForceSendFields []string `json:"-"`
2940 // NullFields is a list of field names (e.g. "Mode") to include in API requests
2941 // with the JSON null value. By default, fields with empty values are omitted
2942 // from API requests. See
2943 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2944 NullFields []string `json:"-"`
2945 }
2946
2947 func (s FleetObservabilityRoutingConfig) MarshalJSON() ([]byte, error) {
2948 type NoMethod FleetObservabilityRoutingConfig
2949 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2950 }
2951
2952 // GenerateConnectManifestResponse: GenerateConnectManifestResponse contains
2953 // manifest information for installing/upgrading a Connect agent.
2954 type GenerateConnectManifestResponse struct {
2955 // Manifest: The ordered list of Kubernetes resources that need to be applied
2956 // to the cluster for GKE Connect agent installation/upgrade.
2957 Manifest []*ConnectAgentResource `json:"manifest,omitempty"`
2958
2959 // ServerResponse contains the HTTP response code and headers from the server.
2960 googleapi.ServerResponse `json:"-"`
2961 // ForceSendFields is a list of field names (e.g. "Manifest") to
2962 // unconditionally include in API requests. By default, fields with empty or
2963 // default values are omitted from API requests. See
2964 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2965 // details.
2966 ForceSendFields []string `json:"-"`
2967 // NullFields is a list of field names (e.g. "Manifest") to include in API
2968 // requests with the JSON null value. By default, fields with empty values are
2969 // omitted from API requests. See
2970 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2971 NullFields []string `json:"-"`
2972 }
2973
2974 func (s GenerateConnectManifestResponse) MarshalJSON() ([]byte, error) {
2975 type NoMethod GenerateConnectManifestResponse
2976 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2977 }
2978
2979 // GenerateMembershipRBACRoleBindingYAMLResponse: Response for
2980 // GenerateRBACRoleBindingYAML.
2981 type GenerateMembershipRBACRoleBindingYAMLResponse struct {
2982 // RoleBindingsYaml: a yaml text blob including the RBAC policies.
2983 RoleBindingsYaml string `json:"roleBindingsYaml,omitempty"`
2984
2985 // ServerResponse contains the HTTP response code and headers from the server.
2986 googleapi.ServerResponse `json:"-"`
2987 // ForceSendFields is a list of field names (e.g. "RoleBindingsYaml") to
2988 // unconditionally include in API requests. By default, fields with empty or
2989 // default values are omitted from API requests. See
2990 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2991 // details.
2992 ForceSendFields []string `json:"-"`
2993 // NullFields is a list of field names (e.g. "RoleBindingsYaml") to include in
2994 // API requests with the JSON null value. By default, fields with empty values
2995 // are omitted from API requests. See
2996 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2997 NullFields []string `json:"-"`
2998 }
2999
3000 func (s GenerateMembershipRBACRoleBindingYAMLResponse) MarshalJSON() ([]byte, error) {
3001 type NoMethod GenerateMembershipRBACRoleBindingYAMLResponse
3002 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3003 }
3004
3005 // GkeCluster: GkeCluster contains information specific to GKE clusters.
3006 type GkeCluster struct {
3007 // ClusterMissing: Output only. If cluster_missing is set then it denotes that
3008 // the GKE cluster no longer exists in the GKE Control Plane.
3009 ClusterMissing bool `json:"clusterMissing,omitempty"`
3010 // ResourceLink: Immutable. Self-link of the Google Cloud resource for the GKE
3011 // cluster. For example:
3012 // //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/
3013 // my-cluster Zonal clusters are also supported.
3014 ResourceLink string `json:"resourceLink,omitempty"`
3015 // ForceSendFields is a list of field names (e.g. "ClusterMissing") 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. "ClusterMissing") to include in
3022 // API requests with the JSON null value. By default, fields with empty values
3023 // are 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 GkeCluster) MarshalJSON() ([]byte, error) {
3029 type NoMethod GkeCluster
3030 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3031 }
3032
3033 // GoogleRpcStatus: The `Status` type defines a logical error model that is
3034 // suitable for different programming environments, including REST APIs and RPC
3035 // APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message
3036 // contains three pieces of data: error code, error message, and error details.
3037 // You can find out more about this error model and how to work with it in the
3038 // API Design Guide (https://cloud.google.com/apis/design/errors).
3039 type GoogleRpcStatus struct {
3040 // Code: The status code, which should be an enum value of google.rpc.Code.
3041 Code int64 `json:"code,omitempty"`
3042 // Details: A list of messages that carry the error details. There is a common
3043 // set of message types for APIs to use.
3044 Details []googleapi.RawMessage `json:"details,omitempty"`
3045 // Message: A developer-facing error message, which should be in English. Any
3046 // user-facing error message should be localized and sent in the
3047 // google.rpc.Status.details field, or localized by the client.
3048 Message string `json:"message,omitempty"`
3049 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
3050 // include in API requests. By default, fields with empty or default values are
3051 // omitted from API requests. See
3052 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3053 // details.
3054 ForceSendFields []string `json:"-"`
3055 // NullFields is a list of field names (e.g. "Code") to include in API requests
3056 // with the JSON null value. By default, fields with empty values are omitted
3057 // from API requests. See
3058 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3059 NullFields []string `json:"-"`
3060 }
3061
3062 func (s GoogleRpcStatus) MarshalJSON() ([]byte, error) {
3063 type NoMethod GoogleRpcStatus
3064 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3065 }
3066
3067 // IdentityServiceAuthMethod: Configuration of an auth method for a
3068 // member/cluster. Only one authentication method (e.g., OIDC and LDAP) can be
3069 // set per AuthMethod.
3070 type IdentityServiceAuthMethod struct {
3071 // AzureadConfig: AzureAD specific Configuration.
3072 AzureadConfig *IdentityServiceAzureADConfig `json:"azureadConfig,omitempty"`
3073 // GoogleConfig: GoogleConfig specific configuration.
3074 GoogleConfig *IdentityServiceGoogleConfig `json:"googleConfig,omitempty"`
3075 // LdapConfig: LDAP specific configuration.
3076 LdapConfig *IdentityServiceLdapConfig `json:"ldapConfig,omitempty"`
3077 // Name: Identifier for auth config.
3078 Name string `json:"name,omitempty"`
3079 // OidcConfig: OIDC specific configuration.
3080 OidcConfig *IdentityServiceOidcConfig `json:"oidcConfig,omitempty"`
3081 // Proxy: Proxy server address to use for auth method.
3082 Proxy string `json:"proxy,omitempty"`
3083 // SamlConfig: SAML specific configuration.
3084 SamlConfig *IdentityServiceSamlConfig `json:"samlConfig,omitempty"`
3085 // ForceSendFields is a list of field names (e.g. "AzureadConfig") to
3086 // unconditionally include in API requests. By default, fields with empty or
3087 // default values are omitted from API requests. See
3088 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3089 // details.
3090 ForceSendFields []string `json:"-"`
3091 // NullFields is a list of field names (e.g. "AzureadConfig") to include in API
3092 // requests with the JSON null value. By default, fields with empty values are
3093 // omitted from API requests. See
3094 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3095 NullFields []string `json:"-"`
3096 }
3097
3098 func (s IdentityServiceAuthMethod) MarshalJSON() ([]byte, error) {
3099 type NoMethod IdentityServiceAuthMethod
3100 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3101 }
3102
3103 // IdentityServiceAzureADConfig: Configuration for the AzureAD Auth flow.
3104 type IdentityServiceAzureADConfig struct {
3105 // ClientId: ID for the registered client application that makes authentication
3106 // requests to the Azure AD identity provider.
3107 ClientId string `json:"clientId,omitempty"`
3108 // ClientSecret: Input only. Unencrypted AzureAD client secret will be passed
3109 // to the GKE Hub CLH.
3110 ClientSecret string `json:"clientSecret,omitempty"`
3111 // EncryptedClientSecret: Output only. Encrypted AzureAD client secret.
3112 EncryptedClientSecret string `json:"encryptedClientSecret,omitempty"`
3113 // GroupFormat: Optional. Format of the AzureAD groups that the client wants
3114 // for auth.
3115 GroupFormat string `json:"groupFormat,omitempty"`
3116 // KubectlRedirectUri: The redirect URL that kubectl uses for authorization.
3117 KubectlRedirectUri string `json:"kubectlRedirectUri,omitempty"`
3118 // Tenant: Kind of Azure AD account to be authenticated. Supported values are
3119 // or for accounts belonging to a specific tenant.
3120 Tenant string `json:"tenant,omitempty"`
3121 // UserClaim: Optional. Claim in the AzureAD ID Token that holds the user
3122 // details.
3123 UserClaim string `json:"userClaim,omitempty"`
3124 // ForceSendFields is a list of field names (e.g. "ClientId") to
3125 // unconditionally include in API requests. By default, fields with empty or
3126 // default values are omitted from API requests. See
3127 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3128 // details.
3129 ForceSendFields []string `json:"-"`
3130 // NullFields is a list of field names (e.g. "ClientId") to include in API
3131 // requests with the JSON null value. By default, fields with empty values are
3132 // omitted from API requests. See
3133 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3134 NullFields []string `json:"-"`
3135 }
3136
3137 func (s IdentityServiceAzureADConfig) MarshalJSON() ([]byte, error) {
3138 type NoMethod IdentityServiceAzureADConfig
3139 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3140 }
3141
3142 // IdentityServiceDiagnosticInterface: Configuration options for the AIS
3143 // diagnostic interface.
3144 type IdentityServiceDiagnosticInterface struct {
3145 // Enabled: Determines whether to enable the diagnostic interface.
3146 Enabled bool `json:"enabled,omitempty"`
3147 // ExpirationTime: Determines the expiration time of the diagnostic interface
3148 // enablement. When reached, requests to the interface would be automatically
3149 // rejected.
3150 ExpirationTime string `json:"expirationTime,omitempty"`
3151 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
3152 // include in API requests. By default, fields with empty or default values are
3153 // omitted from API requests. See
3154 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3155 // details.
3156 ForceSendFields []string `json:"-"`
3157 // NullFields is a list of field names (e.g. "Enabled") to include in API
3158 // requests with the JSON null value. By default, fields with empty values are
3159 // omitted from API requests. See
3160 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3161 NullFields []string `json:"-"`
3162 }
3163
3164 func (s IdentityServiceDiagnosticInterface) MarshalJSON() ([]byte, error) {
3165 type NoMethod IdentityServiceDiagnosticInterface
3166 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3167 }
3168
3169 // IdentityServiceGoogleConfig: Configuration for the Google Plugin Auth flow.
3170 type IdentityServiceGoogleConfig struct {
3171 // Disable: Disable automatic configuration of Google Plugin on supported
3172 // platforms.
3173 Disable bool `json:"disable,omitempty"`
3174 // ForceSendFields is a list of field names (e.g. "Disable") to unconditionally
3175 // include in API requests. By default, fields with empty or default values are
3176 // omitted from API requests. See
3177 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3178 // details.
3179 ForceSendFields []string `json:"-"`
3180 // NullFields is a list of field names (e.g. "Disable") to include in API
3181 // requests with the JSON null value. By default, fields with empty values are
3182 // omitted from API requests. See
3183 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3184 NullFields []string `json:"-"`
3185 }
3186
3187 func (s IdentityServiceGoogleConfig) MarshalJSON() ([]byte, error) {
3188 type NoMethod IdentityServiceGoogleConfig
3189 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3190 }
3191
3192 // IdentityServiceGroupConfig: Contains the properties for locating and
3193 // authenticating groups in the directory.
3194 type IdentityServiceGroupConfig struct {
3195 // BaseDn: Required. The location of the subtree in the LDAP directory to
3196 // search for group entries.
3197 BaseDn string `json:"baseDn,omitempty"`
3198 // Filter: Optional. Optional filter to be used when searching for groups a
3199 // user belongs to. This can be used to explicitly match only certain groups in
3200 // order to reduce the amount of groups returned for each user. This defaults
3201 // to "(objectClass=Group)".
3202 Filter string `json:"filter,omitempty"`
3203 // IdAttribute: Optional. The identifying name of each group a user belongs to.
3204 // For example, if this is set to "distinguishedName" then RBACs and other
3205 // group expectations should be written as full DNs. This defaults to
3206 // "distinguishedName".
3207 IdAttribute string `json:"idAttribute,omitempty"`
3208 // ForceSendFields is a list of field names (e.g. "BaseDn") to unconditionally
3209 // include in API requests. By default, fields with empty or default values are
3210 // omitted from API requests. See
3211 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3212 // details.
3213 ForceSendFields []string `json:"-"`
3214 // NullFields is a list of field names (e.g. "BaseDn") to include in API
3215 // requests with the JSON null value. By default, fields with empty values are
3216 // omitted from API requests. See
3217 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3218 NullFields []string `json:"-"`
3219 }
3220
3221 func (s IdentityServiceGroupConfig) MarshalJSON() ([]byte, error) {
3222 type NoMethod IdentityServiceGroupConfig
3223 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3224 }
3225
3226 // IdentityServiceIdentityServiceOptions: Holds non-protocol-related
3227 // configuration options.
3228 type IdentityServiceIdentityServiceOptions struct {
3229 // DiagnosticInterface: Configuration options for the AIS diagnostic interface.
3230 DiagnosticInterface *IdentityServiceDiagnosticInterface `json:"diagnosticInterface,omitempty"`
3231 // SessionDuration: Determines the lifespan of STS tokens issued by Anthos
3232 // Identity Service.
3233 SessionDuration string `json:"sessionDuration,omitempty"`
3234 // ForceSendFields is a list of field names (e.g. "DiagnosticInterface") to
3235 // unconditionally include in API requests. By default, fields with empty or
3236 // default values are omitted from API requests. See
3237 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3238 // details.
3239 ForceSendFields []string `json:"-"`
3240 // NullFields is a list of field names (e.g. "DiagnosticInterface") to include
3241 // in API requests with the JSON null value. By default, fields with empty
3242 // values are omitted from API requests. See
3243 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3244 NullFields []string `json:"-"`
3245 }
3246
3247 func (s IdentityServiceIdentityServiceOptions) MarshalJSON() ([]byte, error) {
3248 type NoMethod IdentityServiceIdentityServiceOptions
3249 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3250 }
3251
3252 // IdentityServiceLdapConfig: Configuration for the LDAP Auth flow.
3253 type IdentityServiceLdapConfig struct {
3254 // Group: Optional. Contains the properties for locating and authenticating
3255 // groups in the directory.
3256 Group *IdentityServiceGroupConfig `json:"group,omitempty"`
3257 // Server: Required. Server settings for the external LDAP server.
3258 Server *IdentityServiceServerConfig `json:"server,omitempty"`
3259 // ServiceAccount: Required. Contains the credentials of the service account
3260 // which is authorized to perform the LDAP search in the directory. The
3261 // credentials can be supplied by the combination of the DN and password or the
3262 // client certificate.
3263 ServiceAccount *IdentityServiceServiceAccountConfig `json:"serviceAccount,omitempty"`
3264 // User: Required. Defines where users exist in the LDAP directory.
3265 User *IdentityServiceUserConfig `json:"user,omitempty"`
3266 // ForceSendFields is a list of field names (e.g. "Group") to unconditionally
3267 // include in API requests. By default, fields with empty or default values are
3268 // omitted from API requests. See
3269 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3270 // details.
3271 ForceSendFields []string `json:"-"`
3272 // NullFields is a list of field names (e.g. "Group") to include in API
3273 // requests with the JSON null value. By default, fields with empty values are
3274 // omitted from API requests. See
3275 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3276 NullFields []string `json:"-"`
3277 }
3278
3279 func (s IdentityServiceLdapConfig) MarshalJSON() ([]byte, error) {
3280 type NoMethod IdentityServiceLdapConfig
3281 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3282 }
3283
3284 // IdentityServiceMembershipSpec: **Anthos Identity Service**: Configuration
3285 // for a single Membership.
3286 type IdentityServiceMembershipSpec struct {
3287 // AuthMethods: A member may support multiple auth methods.
3288 AuthMethods []*IdentityServiceAuthMethod `json:"authMethods,omitempty"`
3289 // IdentityServiceOptions: Optional. non-protocol-related configuration
3290 // options.
3291 IdentityServiceOptions *IdentityServiceIdentityServiceOptions `json:"identityServiceOptions,omitempty"`
3292 // ForceSendFields is a list of field names (e.g. "AuthMethods") to
3293 // unconditionally include in API requests. By default, fields with empty or
3294 // default values are omitted from API requests. See
3295 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3296 // details.
3297 ForceSendFields []string `json:"-"`
3298 // NullFields is a list of field names (e.g. "AuthMethods") to include in API
3299 // requests with the JSON null value. By default, fields with empty values are
3300 // omitted from API requests. See
3301 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3302 NullFields []string `json:"-"`
3303 }
3304
3305 func (s IdentityServiceMembershipSpec) MarshalJSON() ([]byte, error) {
3306 type NoMethod IdentityServiceMembershipSpec
3307 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3308 }
3309
3310 // IdentityServiceMembershipState: **Anthos Identity Service**: State for a
3311 // single Membership.
3312 type IdentityServiceMembershipState struct {
3313 // FailureReason: The reason of the failure.
3314 FailureReason string `json:"failureReason,omitempty"`
3315 // InstalledVersion: Installed AIS version. This is the AIS version installed
3316 // on this member. The values makes sense iff state is OK.
3317 InstalledVersion string `json:"installedVersion,omitempty"`
3318 // MemberConfig: Last reconciled membership configuration
3319 MemberConfig *IdentityServiceMembershipSpec `json:"memberConfig,omitempty"`
3320 // State: Deployment state on this member
3321 //
3322 // Possible values:
3323 // "DEPLOYMENT_STATE_UNSPECIFIED" - Unspecified state
3324 // "OK" - deployment succeeds
3325 // "ERROR" - Failure with error.
3326 State string `json:"state,omitempty"`
3327 // ForceSendFields is a list of field names (e.g. "FailureReason") to
3328 // unconditionally include in API requests. By default, fields with empty or
3329 // default values are omitted from API requests. See
3330 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3331 // details.
3332 ForceSendFields []string `json:"-"`
3333 // NullFields is a list of field names (e.g. "FailureReason") to include in API
3334 // requests with the JSON null value. By default, fields with empty values are
3335 // omitted from API requests. See
3336 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3337 NullFields []string `json:"-"`
3338 }
3339
3340 func (s IdentityServiceMembershipState) MarshalJSON() ([]byte, error) {
3341 type NoMethod IdentityServiceMembershipState
3342 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3343 }
3344
3345 // IdentityServiceOidcConfig: Configuration for OIDC Auth flow.
3346 type IdentityServiceOidcConfig struct {
3347 // CertificateAuthorityData: PEM-encoded CA for OIDC provider.
3348 CertificateAuthorityData string `json:"certificateAuthorityData,omitempty"`
3349 // ClientId: ID for OIDC client application.
3350 ClientId string `json:"clientId,omitempty"`
3351 // ClientSecret: Input only. Unencrypted OIDC client secret will be passed to
3352 // the GKE Hub CLH.
3353 ClientSecret string `json:"clientSecret,omitempty"`
3354 // DeployCloudConsoleProxy: Flag to denote if reverse proxy is used to connect
3355 // to auth provider. This flag should be set to true when provider is not
3356 // reachable by Google Cloud Console.
3357 DeployCloudConsoleProxy bool `json:"deployCloudConsoleProxy,omitempty"`
3358 // EnableAccessToken: Enable access token.
3359 EnableAccessToken bool `json:"enableAccessToken,omitempty"`
3360 // EncryptedClientSecret: Output only. Encrypted OIDC Client secret
3361 EncryptedClientSecret string `json:"encryptedClientSecret,omitempty"`
3362 // ExtraParams: Comma-separated list of key-value pairs.
3363 ExtraParams string `json:"extraParams,omitempty"`
3364 // GroupPrefix: Prefix to prepend to group name.
3365 GroupPrefix string `json:"groupPrefix,omitempty"`
3366 // GroupsClaim: Claim in OIDC ID token that holds group information.
3367 GroupsClaim string `json:"groupsClaim,omitempty"`
3368 // IssuerUri: URI for the OIDC provider. This should point to the level below
3369 // .well-known/openid-configuration.
3370 IssuerUri string `json:"issuerUri,omitempty"`
3371 // KubectlRedirectUri: Registered redirect uri to redirect users going through
3372 // OAuth flow using kubectl plugin.
3373 KubectlRedirectUri string `json:"kubectlRedirectUri,omitempty"`
3374 // Scopes: Comma-separated list of identifiers.
3375 Scopes string `json:"scopes,omitempty"`
3376 // UserClaim: Claim in OIDC ID token that holds username.
3377 UserClaim string `json:"userClaim,omitempty"`
3378 // UserPrefix: Prefix to prepend to user name.
3379 UserPrefix string `json:"userPrefix,omitempty"`
3380 // ForceSendFields is a list of field names (e.g. "CertificateAuthorityData")
3381 // to unconditionally include in API requests. By default, fields with empty or
3382 // default values are omitted from API requests. See
3383 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3384 // details.
3385 ForceSendFields []string `json:"-"`
3386 // NullFields is a list of field names (e.g. "CertificateAuthorityData") to
3387 // include in API requests with the JSON null value. By default, fields with
3388 // empty values are omitted from API requests. See
3389 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3390 NullFields []string `json:"-"`
3391 }
3392
3393 func (s IdentityServiceOidcConfig) MarshalJSON() ([]byte, error) {
3394 type NoMethod IdentityServiceOidcConfig
3395 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3396 }
3397
3398 // IdentityServiceSamlConfig: Configuration for the SAML Auth flow.
3399 type IdentityServiceSamlConfig struct {
3400 // AttributeMapping: Optional. The mapping of additional user attributes like
3401 // nickname, birthday and address etc.. `key` is the name of this additional
3402 // attribute. `value` is a string presenting as CEL(common expression language,
3403 // go/cel) used for getting the value from the resources. Take nickname as an
3404 // example, in this case, `key` is "attribute.nickname" and `value` is
3405 // "assertion.nickname".
3406 AttributeMapping map[string]string `json:"attributeMapping,omitempty"`
3407 // GroupPrefix: Optional. Prefix to prepend to group name.
3408 GroupPrefix string `json:"groupPrefix,omitempty"`
3409 // GroupsAttribute: Optional. The SAML attribute to read groups from. This
3410 // value is expected to be a string and will be passed along as-is (with the
3411 // option of being prefixed by the `group_prefix`).
3412 GroupsAttribute string `json:"groupsAttribute,omitempty"`
3413 // IdentityProviderCertificates: Required. The list of IdP certificates to
3414 // validate the SAML response against.
3415 IdentityProviderCertificates []string `json:"identityProviderCertificates,omitempty"`
3416 // IdentityProviderId: Required. The entity ID of the SAML IdP.
3417 IdentityProviderId string `json:"identityProviderId,omitempty"`
3418 // IdentityProviderSsoUri: Required. The URI where the SAML IdP exposes the SSO
3419 // service.
3420 IdentityProviderSsoUri string `json:"identityProviderSsoUri,omitempty"`
3421 // UserAttribute: Optional. The SAML attribute to read username from. If
3422 // unspecified, the username will be read from the NameID element of the
3423 // assertion in SAML response. This value is expected to be a string and will
3424 // be passed along as-is (with the option of being prefixed by the
3425 // `user_prefix`).
3426 UserAttribute string `json:"userAttribute,omitempty"`
3427 // UserPrefix: Optional. Prefix to prepend to user name.
3428 UserPrefix string `json:"userPrefix,omitempty"`
3429 // ForceSendFields is a list of field names (e.g. "AttributeMapping") to
3430 // unconditionally include in API requests. By default, fields with empty or
3431 // default values are omitted from API requests. See
3432 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3433 // details.
3434 ForceSendFields []string `json:"-"`
3435 // NullFields is a list of field names (e.g. "AttributeMapping") to include in
3436 // API requests with the JSON null value. By default, fields with empty values
3437 // are omitted from API requests. See
3438 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3439 NullFields []string `json:"-"`
3440 }
3441
3442 func (s IdentityServiceSamlConfig) MarshalJSON() ([]byte, error) {
3443 type NoMethod IdentityServiceSamlConfig
3444 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3445 }
3446
3447 // IdentityServiceServerConfig: Server settings for the external LDAP server.
3448 type IdentityServiceServerConfig struct {
3449 // CertificateAuthorityData: Optional. Contains a Base64 encoded, PEM formatted
3450 // certificate authority certificate for the LDAP server. This must be provided
3451 // for the "ldaps" and "startTLS" connections.
3452 CertificateAuthorityData string `json:"certificateAuthorityData,omitempty"`
3453 // ConnectionType: Optional. Defines the connection type to communicate with
3454 // the LDAP server. If `starttls` or `ldaps` is specified, the
3455 // certificate_authority_data should not be empty.
3456 ConnectionType string `json:"connectionType,omitempty"`
3457 // Host: Required. Defines the hostname or IP of the LDAP server. Port is
3458 // optional and will default to 389, if unspecified. For example,
3459 // "ldap.server.example" or "10.10.10.10:389".
3460 Host string `json:"host,omitempty"`
3461 // ForceSendFields is a list of field names (e.g. "CertificateAuthorityData")
3462 // to unconditionally include in API requests. By default, fields with empty or
3463 // default values are omitted from API requests. See
3464 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3465 // details.
3466 ForceSendFields []string `json:"-"`
3467 // NullFields is a list of field names (e.g. "CertificateAuthorityData") to
3468 // include in API requests with the JSON null value. By default, fields with
3469 // empty values are omitted from API requests. See
3470 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3471 NullFields []string `json:"-"`
3472 }
3473
3474 func (s IdentityServiceServerConfig) MarshalJSON() ([]byte, error) {
3475 type NoMethod IdentityServiceServerConfig
3476 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3477 }
3478
3479 // IdentityServiceServiceAccountConfig: Contains the credentials of the service
3480 // account which is authorized to perform the LDAP search in the directory. The
3481 // credentials can be supplied by the combination of the DN and password or the
3482 // client certificate.
3483 type IdentityServiceServiceAccountConfig struct {
3484 // SimpleBindCredentials: Credentials for basic auth.
3485 SimpleBindCredentials *IdentityServiceSimpleBindCredentials `json:"simpleBindCredentials,omitempty"`
3486 // ForceSendFields is a list of field names (e.g. "SimpleBindCredentials") to
3487 // unconditionally include in API requests. By default, fields with empty or
3488 // default values are omitted from API requests. See
3489 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3490 // details.
3491 ForceSendFields []string `json:"-"`
3492 // NullFields is a list of field names (e.g. "SimpleBindCredentials") to
3493 // include in API requests with the JSON null value. By default, fields with
3494 // empty values are omitted from API requests. See
3495 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3496 NullFields []string `json:"-"`
3497 }
3498
3499 func (s IdentityServiceServiceAccountConfig) MarshalJSON() ([]byte, error) {
3500 type NoMethod IdentityServiceServiceAccountConfig
3501 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3502 }
3503
3504 // IdentityServiceSimpleBindCredentials: The structure holds the LDAP simple
3505 // binding credential.
3506 type IdentityServiceSimpleBindCredentials struct {
3507 // Dn: Required. The distinguished name(DN) of the service account object/user.
3508 Dn string `json:"dn,omitempty"`
3509 // EncryptedPassword: Output only. The encrypted password of the service
3510 // account object/user.
3511 EncryptedPassword string `json:"encryptedPassword,omitempty"`
3512 // Password: Required. Input only. The password of the service account
3513 // object/user.
3514 Password string `json:"password,omitempty"`
3515 // ForceSendFields is a list of field names (e.g. "Dn") to unconditionally
3516 // include in API requests. By default, fields with empty or default values are
3517 // omitted from API requests. See
3518 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3519 // details.
3520 ForceSendFields []string `json:"-"`
3521 // NullFields is a list of field names (e.g. "Dn") to include in API requests
3522 // with the JSON null value. By default, fields with empty values are omitted
3523 // from API requests. See
3524 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3525 NullFields []string `json:"-"`
3526 }
3527
3528 func (s IdentityServiceSimpleBindCredentials) MarshalJSON() ([]byte, error) {
3529 type NoMethod IdentityServiceSimpleBindCredentials
3530 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3531 }
3532
3533 // IdentityServiceUserConfig: Defines where users exist in the LDAP directory.
3534 type IdentityServiceUserConfig struct {
3535 // BaseDn: Required. The location of the subtree in the LDAP directory to
3536 // search for user entries.
3537 BaseDn string `json:"baseDn,omitempty"`
3538 // Filter: Optional. Filter to apply when searching for the user. This can be
3539 // used to further restrict the user accounts which are allowed to login. This
3540 // defaults to "(objectClass=User)".
3541 Filter string `json:"filter,omitempty"`
3542 // IdAttribute: Optional. Determines which attribute to use as the user's
3543 // identity after they are authenticated. This is distinct from the
3544 // loginAttribute field to allow users to login with a username, but then have
3545 // their actual identifier be an email address or full Distinguished Name (DN).
3546 // For example, setting loginAttribute to "sAMAccountName" and
3547 // identifierAttribute to "userPrincipalName" would allow a user to login as
3548 // "bsmith", but actual RBAC policies for the user would be written as
3549 // "[email protected]". Using "userPrincipalName" is recommended since this
3550 // will be unique for each user. This defaults to "userPrincipalName".
3551 IdAttribute string `json:"idAttribute,omitempty"`
3552 // LoginAttribute: Optional. The name of the attribute which matches against
3553 // the input username. This is used to find the user in the LDAP database e.g.
3554 // "(=)" and is combined with the optional filter field. This defaults to
3555 // "userPrincipalName".
3556 LoginAttribute string `json:"loginAttribute,omitempty"`
3557 // ForceSendFields is a list of field names (e.g. "BaseDn") to unconditionally
3558 // include in API requests. By default, fields with empty or default values are
3559 // omitted from API requests. See
3560 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3561 // details.
3562 ForceSendFields []string `json:"-"`
3563 // NullFields is a list of field names (e.g. "BaseDn") to include in API
3564 // requests with the JSON null value. By default, fields with empty values are
3565 // omitted from API requests. See
3566 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3567 NullFields []string `json:"-"`
3568 }
3569
3570 func (s IdentityServiceUserConfig) MarshalJSON() ([]byte, error) {
3571 type NoMethod IdentityServiceUserConfig
3572 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3573 }
3574
3575 // KubernetesMetadata: KubernetesMetadata provides informational metadata for
3576 // Memberships representing Kubernetes clusters.
3577 type KubernetesMetadata struct {
3578 // KubernetesApiServerVersion: Output only. Kubernetes API server version
3579 // string as reported by `/version`.
3580 KubernetesApiServerVersion string `json:"kubernetesApiServerVersion,omitempty"`
3581 // MemoryMb: Output only. The total memory capacity as reported by the sum of
3582 // all Kubernetes nodes resources, defined in MB.
3583 MemoryMb int64 `json:"memoryMb,omitempty"`
3584 // NodeCount: Output only. Node count as reported by Kubernetes nodes
3585 // resources.
3586 NodeCount int64 `json:"nodeCount,omitempty"`
3587 // NodeProviderId: Output only. Node providerID as reported by the first node
3588 // in the list of nodes on the Kubernetes endpoint. On Kubernetes platforms
3589 // that support zero-node clusters (like GKE on Google Cloud), the node_count
3590 // will be zero and the node_provider_id will be empty.
3591 NodeProviderId string `json:"nodeProviderId,omitempty"`
3592 // UpdateTime: Output only. The time at which these details were last updated.
3593 // This update_time is different from the Membership-level update_time since
3594 // EndpointDetails are updated internally for API consumers.
3595 UpdateTime string `json:"updateTime,omitempty"`
3596 // VcpuCount: Output only. vCPU count as reported by Kubernetes nodes
3597 // resources.
3598 VcpuCount int64 `json:"vcpuCount,omitempty"`
3599 // ForceSendFields is a list of field names (e.g. "KubernetesApiServerVersion")
3600 // to unconditionally include in API requests. By default, fields with empty or
3601 // default values are omitted from API requests. See
3602 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3603 // details.
3604 ForceSendFields []string `json:"-"`
3605 // NullFields is a list of field names (e.g. "KubernetesApiServerVersion") to
3606 // include in API requests with the JSON null value. By default, fields with
3607 // empty values are omitted from API requests. See
3608 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3609 NullFields []string `json:"-"`
3610 }
3611
3612 func (s KubernetesMetadata) MarshalJSON() ([]byte, error) {
3613 type NoMethod KubernetesMetadata
3614 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3615 }
3616
3617 // KubernetesResource: KubernetesResource contains the YAML manifests and
3618 // configuration for Membership Kubernetes resources in the cluster. After
3619 // CreateMembership or UpdateMembership, these resources should be re-applied
3620 // in the cluster.
3621 type KubernetesResource struct {
3622 // ConnectResources: Output only. The Kubernetes resources for installing the
3623 // GKE Connect agent This field is only populated in the Membership returned
3624 // from a successful long-running operation from CreateMembership or
3625 // UpdateMembership. It is not populated during normal GetMembership or
3626 // ListMemberships requests. To get the resource manifest after the initial
3627 // registration, the caller should make a UpdateMembership call with an empty
3628 // field mask.
3629 ConnectResources []*ResourceManifest `json:"connectResources,omitempty"`
3630 // MembershipCrManifest: Input only. The YAML representation of the Membership
3631 // CR. This field is ignored for GKE clusters where Hub can read the CR
3632 // directly. Callers should provide the CR that is currently present in the
3633 // cluster during CreateMembership or UpdateMembership, or leave this field
3634 // empty if none exists. The CR manifest is used to validate the cluster has
3635 // not been registered with another Membership.
3636 MembershipCrManifest string `json:"membershipCrManifest,omitempty"`
3637 // MembershipResources: Output only. Additional Kubernetes resources that need
3638 // to be applied to the cluster after Membership creation, and after every
3639 // update. This field is only populated in the Membership returned from a
3640 // successful long-running operation from CreateMembership or UpdateMembership.
3641 // It is not populated during normal GetMembership or ListMemberships requests.
3642 // To get the resource manifest after the initial registration, the caller
3643 // should make a UpdateMembership call with an empty field mask.
3644 MembershipResources []*ResourceManifest `json:"membershipResources,omitempty"`
3645 // ResourceOptions: Optional. Options for Kubernetes resource generation.
3646 ResourceOptions *ResourceOptions `json:"resourceOptions,omitempty"`
3647 // ForceSendFields is a list of field names (e.g. "ConnectResources") to
3648 // unconditionally include in API requests. By default, fields with empty or
3649 // default values are omitted from API requests. See
3650 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3651 // details.
3652 ForceSendFields []string `json:"-"`
3653 // NullFields is a list of field names (e.g. "ConnectResources") to include in
3654 // API requests with the JSON null value. By default, fields with empty values
3655 // are omitted from API requests. See
3656 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3657 NullFields []string `json:"-"`
3658 }
3659
3660 func (s KubernetesResource) MarshalJSON() ([]byte, error) {
3661 type NoMethod KubernetesResource
3662 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3663 }
3664
3665 // ListBoundMembershipsResponse: List of Memberships bound to a Scope.
3666 type ListBoundMembershipsResponse struct {
3667 // Memberships: The list of Memberships bound to the given Scope.
3668 Memberships []*Membership `json:"memberships,omitempty"`
3669 // NextPageToken: A token to request the next page of resources from the
3670 // `ListBoundMemberships` method. The value of an empty string means that there
3671 // are no more resources to return.
3672 NextPageToken string `json:"nextPageToken,omitempty"`
3673 // Unreachable: List of locations that could not be reached while fetching this
3674 // list.
3675 Unreachable []string `json:"unreachable,omitempty"`
3676
3677 // ServerResponse contains the HTTP response code and headers from the server.
3678 googleapi.ServerResponse `json:"-"`
3679 // ForceSendFields is a list of field names (e.g. "Memberships") to
3680 // unconditionally include in API requests. By default, fields with empty or
3681 // default values are omitted from API requests. See
3682 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3683 // details.
3684 ForceSendFields []string `json:"-"`
3685 // NullFields is a list of field names (e.g. "Memberships") to include in API
3686 // requests with the JSON null value. By default, fields with empty values are
3687 // omitted from API requests. See
3688 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3689 NullFields []string `json:"-"`
3690 }
3691
3692 func (s ListBoundMembershipsResponse) MarshalJSON() ([]byte, error) {
3693 type NoMethod ListBoundMembershipsResponse
3694 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3695 }
3696
3697 // ListFeaturesResponse: Response message for the `GkeHub.ListFeatures` method.
3698 type ListFeaturesResponse struct {
3699 // NextPageToken: A token to request the next page of resources from the
3700 // `ListFeatures` method. The value of an empty string means that there are no
3701 // more resources to return.
3702 NextPageToken string `json:"nextPageToken,omitempty"`
3703 // Resources: The list of matching Features
3704 Resources []*Feature `json:"resources,omitempty"`
3705
3706 // ServerResponse contains the HTTP response code and headers from the server.
3707 googleapi.ServerResponse `json:"-"`
3708 // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 ListFeaturesResponse) MarshalJSON() ([]byte, error) {
3722 type NoMethod ListFeaturesResponse
3723 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3724 }
3725
3726 // ListFleetsResponse: Response message for the `GkeHub.ListFleetsResponse`
3727 // method.
3728 type ListFleetsResponse struct {
3729 // Fleets: The list of matching fleets.
3730 Fleets []*Fleet `json:"fleets,omitempty"`
3731 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3732 // next page. If this field is omitted, there are no subsequent pages. The
3733 // token is only valid for 1h.
3734 NextPageToken string `json:"nextPageToken,omitempty"`
3735
3736 // ServerResponse contains the HTTP response code and headers from the server.
3737 googleapi.ServerResponse `json:"-"`
3738 // ForceSendFields is a list of field names (e.g. "Fleets") to unconditionally
3739 // include in API requests. By default, fields with empty or default values are
3740 // omitted from API requests. See
3741 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3742 // details.
3743 ForceSendFields []string `json:"-"`
3744 // NullFields is a list of field names (e.g. "Fleets") to include in API
3745 // requests with the JSON null value. By default, fields with empty values are
3746 // omitted from API requests. See
3747 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3748 NullFields []string `json:"-"`
3749 }
3750
3751 func (s ListFleetsResponse) MarshalJSON() ([]byte, error) {
3752 type NoMethod ListFleetsResponse
3753 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3754 }
3755
3756 // ListLocationsResponse: The response message for Locations.ListLocations.
3757 type ListLocationsResponse struct {
3758 // Locations: A list of locations that matches the specified filter in the
3759 // request.
3760 Locations []*Location `json:"locations,omitempty"`
3761 // NextPageToken: The standard List next-page token.
3762 NextPageToken string `json:"nextPageToken,omitempty"`
3763
3764 // ServerResponse contains the HTTP response code and headers from the server.
3765 googleapi.ServerResponse `json:"-"`
3766 // ForceSendFields is a list of field names (e.g. "Locations") to
3767 // unconditionally include in API requests. By default, fields with empty or
3768 // default values are omitted from API requests. See
3769 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3770 // details.
3771 ForceSendFields []string `json:"-"`
3772 // NullFields is a list of field names (e.g. "Locations") to include in API
3773 // requests with the JSON null value. By default, fields with empty values are
3774 // omitted from API requests. See
3775 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3776 NullFields []string `json:"-"`
3777 }
3778
3779 func (s ListLocationsResponse) MarshalJSON() ([]byte, error) {
3780 type NoMethod ListLocationsResponse
3781 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3782 }
3783
3784 // ListMembershipBindingsResponse: List of MembershipBindings.
3785 type ListMembershipBindingsResponse struct {
3786 // MembershipBindings: The list of membership_bindings
3787 MembershipBindings []*MembershipBinding `json:"membershipBindings,omitempty"`
3788 // NextPageToken: A token to request the next page of resources from the
3789 // `ListMembershipBindings` method. The value of an empty string means that
3790 // there are no more resources to return.
3791 NextPageToken string `json:"nextPageToken,omitempty"`
3792 // Unreachable: List of locations that could not be reached while fetching this
3793 // list.
3794 Unreachable []string `json:"unreachable,omitempty"`
3795
3796 // ServerResponse contains the HTTP response code and headers from the server.
3797 googleapi.ServerResponse `json:"-"`
3798 // ForceSendFields is a list of field names (e.g. "MembershipBindings") to
3799 // unconditionally include in API requests. By default, fields with empty or
3800 // default values are omitted from API requests. See
3801 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3802 // details.
3803 ForceSendFields []string `json:"-"`
3804 // NullFields is a list of field names (e.g. "MembershipBindings") to include
3805 // in API requests with the JSON null value. By default, fields with empty
3806 // values are omitted from API requests. See
3807 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3808 NullFields []string `json:"-"`
3809 }
3810
3811 func (s ListMembershipBindingsResponse) MarshalJSON() ([]byte, error) {
3812 type NoMethod ListMembershipBindingsResponse
3813 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3814 }
3815
3816 // ListMembershipRBACRoleBindingsResponse: List of Membership RBACRoleBindings.
3817 type ListMembershipRBACRoleBindingsResponse struct {
3818 // NextPageToken: A token to request the next page of resources from the
3819 // `ListMembershipRBACRoleBindings` method. The value of an empty string means
3820 // that there are no more resources to return.
3821 NextPageToken string `json:"nextPageToken,omitempty"`
3822 // Rbacrolebindings: The list of Membership RBACRoleBindings.
3823 Rbacrolebindings []*RBACRoleBinding `json:"rbacrolebindings,omitempty"`
3824 // Unreachable: List of locations that could not be reached while fetching this
3825 // list.
3826 Unreachable []string `json:"unreachable,omitempty"`
3827
3828 // ServerResponse contains the HTTP response code and headers from the server.
3829 googleapi.ServerResponse `json:"-"`
3830 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3831 // unconditionally include in API requests. By default, fields with empty or
3832 // default values are omitted from API requests. See
3833 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3834 // details.
3835 ForceSendFields []string `json:"-"`
3836 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3837 // requests with the JSON null value. By default, fields with empty values are
3838 // omitted from API requests. See
3839 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3840 NullFields []string `json:"-"`
3841 }
3842
3843 func (s ListMembershipRBACRoleBindingsResponse) MarshalJSON() ([]byte, error) {
3844 type NoMethod ListMembershipRBACRoleBindingsResponse
3845 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3846 }
3847
3848 // ListMembershipsResponse: Response message for the `GkeHub.ListMemberships`
3849 // method.
3850 type ListMembershipsResponse struct {
3851 // NextPageToken: A token to request the next page of resources from the
3852 // `ListMemberships` method. The value of an empty string means that there are
3853 // no more resources to return.
3854 NextPageToken string `json:"nextPageToken,omitempty"`
3855 // Resources: The list of matching Memberships.
3856 Resources []*Membership `json:"resources,omitempty"`
3857 // Unreachable: List of locations that could not be reached while fetching this
3858 // list.
3859 Unreachable []string `json:"unreachable,omitempty"`
3860
3861 // ServerResponse contains the HTTP response code and headers from the server.
3862 googleapi.ServerResponse `json:"-"`
3863 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3864 // unconditionally include in API requests. By default, fields with empty or
3865 // default values are omitted from API requests. See
3866 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3867 // details.
3868 ForceSendFields []string `json:"-"`
3869 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3870 // requests with the JSON null value. By default, fields with empty values are
3871 // omitted from API requests. See
3872 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3873 NullFields []string `json:"-"`
3874 }
3875
3876 func (s ListMembershipsResponse) MarshalJSON() ([]byte, error) {
3877 type NoMethod ListMembershipsResponse
3878 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3879 }
3880
3881 // ListOperationsResponse: The response message for Operations.ListOperations.
3882 type ListOperationsResponse struct {
3883 // NextPageToken: The standard List next-page token.
3884 NextPageToken string `json:"nextPageToken,omitempty"`
3885 // Operations: A list of operations that matches the specified filter in the
3886 // request.
3887 Operations []*Operation `json:"operations,omitempty"`
3888 // Unreachable: Unordered list. Unreachable resources. Populated when the
3889 // request sets `ListOperationsRequest.return_partial_success` and reads across
3890 // collections. For example, when attempting to list all resources across all
3891 // supported locations.
3892 Unreachable []string `json:"unreachable,omitempty"`
3893
3894 // ServerResponse contains the HTTP response code and headers from the server.
3895 googleapi.ServerResponse `json:"-"`
3896 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3897 // unconditionally include in API requests. By default, fields with empty or
3898 // default values are omitted from API requests. See
3899 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3900 // details.
3901 ForceSendFields []string `json:"-"`
3902 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3903 // requests with the JSON null value. By default, fields with empty values are
3904 // omitted from API requests. See
3905 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3906 NullFields []string `json:"-"`
3907 }
3908
3909 func (s ListOperationsResponse) MarshalJSON() ([]byte, error) {
3910 type NoMethod ListOperationsResponse
3911 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3912 }
3913
3914 // ListPermittedScopesResponse: List of permitted Scopes.
3915 type ListPermittedScopesResponse struct {
3916 // NextPageToken: A token to request the next page of resources from the
3917 // `ListPermittedScopes` method. The value of an empty string means that there
3918 // are no more resources to return.
3919 NextPageToken string `json:"nextPageToken,omitempty"`
3920 // Scopes: The list of permitted Scopes
3921 Scopes []*Scope `json:"scopes,omitempty"`
3922
3923 // ServerResponse contains the HTTP response code and headers from the server.
3924 googleapi.ServerResponse `json:"-"`
3925 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3926 // unconditionally include in API requests. By default, fields with empty or
3927 // default values are omitted from API requests. See
3928 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3929 // details.
3930 ForceSendFields []string `json:"-"`
3931 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3932 // requests with the JSON null value. By default, fields with empty values are
3933 // omitted from API requests. See
3934 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3935 NullFields []string `json:"-"`
3936 }
3937
3938 func (s ListPermittedScopesResponse) MarshalJSON() ([]byte, error) {
3939 type NoMethod ListPermittedScopesResponse
3940 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3941 }
3942
3943 // ListRolloutSequencesResponse: Response message for listing rollout
3944 // sequences.
3945 type ListRolloutSequencesResponse struct {
3946 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3947 // next page. If this field is omitted, there are no subsequent pages.
3948 NextPageToken string `json:"nextPageToken,omitempty"`
3949 // RolloutSequences: The rollout sequences from the specified parent resource.
3950 RolloutSequences []*RolloutSequence `json:"rolloutSequences,omitempty"`
3951
3952 // ServerResponse contains the HTTP response code and headers from the server.
3953 googleapi.ServerResponse `json:"-"`
3954 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3955 // unconditionally include in API requests. By default, fields with empty or
3956 // default values are omitted from API requests. See
3957 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3958 // details.
3959 ForceSendFields []string `json:"-"`
3960 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3961 // requests with the JSON null value. By default, fields with empty values are
3962 // omitted from API requests. See
3963 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3964 NullFields []string `json:"-"`
3965 }
3966
3967 func (s ListRolloutSequencesResponse) MarshalJSON() ([]byte, error) {
3968 type NoMethod ListRolloutSequencesResponse
3969 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3970 }
3971
3972 // ListRolloutsResponse: Response message for listing rollouts.
3973 type ListRolloutsResponse struct {
3974 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3975 // next page. If this field is omitted, there are no subsequent pages.
3976 NextPageToken string `json:"nextPageToken,omitempty"`
3977 // Rollouts: The rollouts from the specified parent resource.
3978 Rollouts []*Rollout `json:"rollouts,omitempty"`
3979
3980 // ServerResponse contains the HTTP response code and headers from the server.
3981 googleapi.ServerResponse `json:"-"`
3982 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3983 // unconditionally include in API requests. By default, fields with empty or
3984 // default values are omitted from API requests. See
3985 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3986 // details.
3987 ForceSendFields []string `json:"-"`
3988 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3989 // requests with the JSON null value. By default, fields with empty values are
3990 // omitted from API requests. See
3991 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3992 NullFields []string `json:"-"`
3993 }
3994
3995 func (s ListRolloutsResponse) MarshalJSON() ([]byte, error) {
3996 type NoMethod ListRolloutsResponse
3997 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3998 }
3999
4000 // ListScopeNamespacesResponse: List of fleet namespaces.
4001 type ListScopeNamespacesResponse struct {
4002 // NextPageToken: A token to request the next page of resources from the
4003 // `ListNamespaces` method. The value of an empty string means that there are
4004 // no more resources to return.
4005 NextPageToken string `json:"nextPageToken,omitempty"`
4006 // ScopeNamespaces: The list of fleet namespaces
4007 ScopeNamespaces []*Namespace `json:"scopeNamespaces,omitempty"`
4008
4009 // ServerResponse contains the HTTP response code and headers from the server.
4010 googleapi.ServerResponse `json:"-"`
4011 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
4012 // unconditionally include in API requests. By default, fields with empty or
4013 // default values are omitted from API requests. See
4014 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4015 // details.
4016 ForceSendFields []string `json:"-"`
4017 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
4018 // requests with the JSON null value. By default, fields with empty values are
4019 // omitted from API requests. See
4020 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4021 NullFields []string `json:"-"`
4022 }
4023
4024 func (s ListScopeNamespacesResponse) MarshalJSON() ([]byte, error) {
4025 type NoMethod ListScopeNamespacesResponse
4026 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4027 }
4028
4029 // ListScopeRBACRoleBindingsResponse: List of Scope RBACRoleBindings.
4030 type ListScopeRBACRoleBindingsResponse struct {
4031 // NextPageToken: A token to request the next page of resources from the
4032 // `ListScopeRBACRoleBindings` method. The value of an empty string means that
4033 // there are no more resources to return.
4034 NextPageToken string `json:"nextPageToken,omitempty"`
4035 // Rbacrolebindings: The list of Scope RBACRoleBindings.
4036 Rbacrolebindings []*RBACRoleBinding `json:"rbacrolebindings,omitempty"`
4037
4038 // ServerResponse contains the HTTP response code and headers from the server.
4039 googleapi.ServerResponse `json:"-"`
4040 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
4041 // unconditionally include in API requests. By default, fields with empty or
4042 // default values are omitted from API requests. See
4043 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4044 // details.
4045 ForceSendFields []string `json:"-"`
4046 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
4047 // requests with the JSON null value. By default, fields with empty values are
4048 // omitted from API requests. See
4049 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4050 NullFields []string `json:"-"`
4051 }
4052
4053 func (s ListScopeRBACRoleBindingsResponse) MarshalJSON() ([]byte, error) {
4054 type NoMethod ListScopeRBACRoleBindingsResponse
4055 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4056 }
4057
4058 // ListScopesResponse: List of Scopes.
4059 type ListScopesResponse struct {
4060 // NextPageToken: A token to request the next page of resources from the
4061 // `ListScopes` method. The value of an empty string means that there are no
4062 // more resources to return.
4063 NextPageToken string `json:"nextPageToken,omitempty"`
4064 // Scopes: The list of Scopes
4065 Scopes []*Scope `json:"scopes,omitempty"`
4066
4067 // ServerResponse contains the HTTP response code and headers from the server.
4068 googleapi.ServerResponse `json:"-"`
4069 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
4070 // unconditionally include in API requests. By default, fields with empty or
4071 // default values are omitted from API requests. See
4072 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4073 // details.
4074 ForceSendFields []string `json:"-"`
4075 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
4076 // requests with the JSON null value. By default, fields with empty values are
4077 // omitted from API requests. See
4078 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4079 NullFields []string `json:"-"`
4080 }
4081
4082 func (s ListScopesResponse) MarshalJSON() ([]byte, error) {
4083 type NoMethod ListScopesResponse
4084 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4085 }
4086
4087 // Location: A resource that represents a Google Cloud location.
4088 type Location struct {
4089 // DisplayName: The friendly name for this location, typically a nearby city
4090 // name. For example, "Tokyo".
4091 DisplayName string `json:"displayName,omitempty"`
4092 // Labels: Cross-service attributes for the location. For example
4093 // {"cloud.googleapis.com/region": "us-east1"}
4094 Labels map[string]string `json:"labels,omitempty"`
4095 // LocationId: The canonical id for this location. For example: "us-east1".
4096 LocationId string `json:"locationId,omitempty"`
4097 // Metadata: Service-specific metadata. For example the available capacity at
4098 // the given location.
4099 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
4100 // Name: Resource name for the location, which may vary between
4101 // implementations. For example:
4102 // "projects/example-project/locations/us-east1"
4103 Name string `json:"name,omitempty"`
4104
4105 // ServerResponse contains the HTTP response code and headers from the server.
4106 googleapi.ServerResponse `json:"-"`
4107 // ForceSendFields is a list of field names (e.g. "DisplayName") to
4108 // unconditionally include in API requests. By default, fields with empty or
4109 // default values are omitted from API requests. See
4110 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4111 // details.
4112 ForceSendFields []string `json:"-"`
4113 // NullFields is a list of field names (e.g. "DisplayName") to include in API
4114 // requests with the JSON null value. By default, fields with empty values are
4115 // omitted from API requests. See
4116 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4117 NullFields []string `json:"-"`
4118 }
4119
4120 func (s Location) MarshalJSON() ([]byte, error) {
4121 type NoMethod Location
4122 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4123 }
4124
4125 // Membership: Membership contains information about a member cluster.
4126 type Membership struct {
4127 // Authority: Optional. How to identify workloads from this Membership. See the
4128 // documentation on Workload Identity for more details:
4129 // https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity
4130 Authority *Authority `json:"authority,omitempty"`
4131 // ClusterTier: Output only. The tier of the cluster.
4132 //
4133 // Possible values:
4134 // "CLUSTER_TIER_UNSPECIFIED" - The ClusterTier is not set.
4135 // "STANDARD" - The ClusterTier is standard.
4136 // "ENTERPRISE" - The ClusterTier is enterprise.
4137 ClusterTier string `json:"clusterTier,omitempty"`
4138 // CreateTime: Output only. When the Membership was created.
4139 CreateTime string `json:"createTime,omitempty"`
4140 // DeleteTime: Output only. When the Membership was deleted.
4141 DeleteTime string `json:"deleteTime,omitempty"`
4142 // Description: Output only. Description of this membership, limited to 63
4143 // characters. Must match the regex: `a-zA-Z0-9*` This field is present for
4144 // legacy purposes.
4145 Description string `json:"description,omitempty"`
4146 // Endpoint: Optional. Endpoint information to reach this member.
4147 Endpoint *MembershipEndpoint `json:"endpoint,omitempty"`
4148 // ExternalId: Optional. An externally-generated and managed ID for this
4149 // Membership. This ID may be modified after creation, but this is not
4150 // recommended. The ID must match the regex: `a-zA-Z0-9*` If this Membership
4151 // represents a Kubernetes cluster, this value should be set to the UID of the
4152 // `kube-system` namespace object.
4153 ExternalId string `json:"externalId,omitempty"`
4154 // Labels: Optional. Labels for this membership. These labels are not leveraged
4155 // by multi-cluster features, instead, we prefer cluster labels, which can be
4156 // set on GKE cluster or other cluster types.
4157 Labels map[string]string `json:"labels,omitempty"`
4158 // LastConnectionTime: Output only. For clusters using Connect, the timestamp
4159 // of the most recent connection established with Google Cloud. This time is
4160 // updated every several minutes, not continuously. For clusters that do not
4161 // use GKE Connect, or that have never connected successfully, this field will
4162 // be unset.
4163 LastConnectionTime string `json:"lastConnectionTime,omitempty"`
4164 // MembershipType: Output only. The type of the membership.
4165 //
4166 // Possible values:
4167 // "MEMBERSHIP_TYPE_UNSPECIFIED" - The MembershipType is not set.
4168 // "LIGHTWEIGHT" - The membership supports only lightweight compatible
4169 // features.
4170 MembershipType string `json:"membershipType,omitempty"`
4171 // MonitoringConfig: Optional. The monitoring config information for this
4172 // membership.
4173 MonitoringConfig *MonitoringConfig `json:"monitoringConfig,omitempty"`
4174 // Name: Output only. The full, unique name of this Membership resource in the
4175 // format `projects/*/locations/*/memberships/{membership_id}`, set during
4176 // creation. `membership_id` must be a valid RFC 1123 compliant DNS label: 1.
4177 // At most 63 characters in length 2. It must consist of lower case
4178 // alphanumeric characters or `-` 3. It must start and end with an alphanumeric
4179 // character Which can be expressed as the regex:
4180 // `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
4181 Name string `json:"name,omitempty"`
4182 // State: Output only. State of the Membership resource.
4183 State *MembershipState `json:"state,omitempty"`
4184 // UniqueId: Output only. Google-generated UUID for this resource. This is
4185 // unique across all Membership resources. If a Membership resource is deleted
4186 // and another resource with the same name is created, it gets a different
4187 // unique_id.
4188 UniqueId string `json:"uniqueId,omitempty"`
4189 // UpdateTime: Output only. When the Membership was last updated.
4190 UpdateTime string `json:"updateTime,omitempty"`
4191
4192 // ServerResponse contains the HTTP response code and headers from the server.
4193 googleapi.ServerResponse `json:"-"`
4194 // ForceSendFields is a list of field names (e.g. "Authority") to
4195 // unconditionally include in API requests. By default, fields with empty or
4196 // default values are omitted from API requests. See
4197 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4198 // details.
4199 ForceSendFields []string `json:"-"`
4200 // NullFields is a list of field names (e.g. "Authority") to include in API
4201 // requests with the JSON null value. By default, fields with empty values are
4202 // omitted from API requests. See
4203 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4204 NullFields []string `json:"-"`
4205 }
4206
4207 func (s Membership) MarshalJSON() ([]byte, error) {
4208 type NoMethod Membership
4209 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4210 }
4211
4212 // MembershipBinding: MembershipBinding is a subresource of a Membership,
4213 // representing what Fleet Scopes (or other, future Fleet resources) a
4214 // Membership is bound to.
4215 type MembershipBinding struct {
4216 // CreateTime: Output only. When the membership binding was created.
4217 CreateTime string `json:"createTime,omitempty"`
4218 // DeleteTime: Output only. When the membership binding was deleted.
4219 DeleteTime string `json:"deleteTime,omitempty"`
4220 // Labels: Optional. Labels for this MembershipBinding.
4221 Labels map[string]string `json:"labels,omitempty"`
4222 // Name: The resource name for the membershipbinding itself
4223 // `projects/{project}/locations/{location}/memberships/{membership}/bindings/{m
4224 // embershipbinding}`
4225 Name string `json:"name,omitempty"`
4226 // Scope: A Scope resource name in the format
4227 // `projects/*/locations/*/scopes/*`.
4228 Scope string `json:"scope,omitempty"`
4229 // State: Output only. State of the membership binding resource.
4230 State *MembershipBindingLifecycleState `json:"state,omitempty"`
4231 // Uid: Output only. Google-generated UUID for this resource. This is unique
4232 // across all membershipbinding resources. If a membershipbinding resource is
4233 // deleted and another resource with the same name is created, it gets a
4234 // different uid.
4235 Uid string `json:"uid,omitempty"`
4236 // UpdateTime: Output only. When the membership binding was last updated.
4237 UpdateTime string `json:"updateTime,omitempty"`
4238
4239 // ServerResponse contains the HTTP response code and headers from the server.
4240 googleapi.ServerResponse `json:"-"`
4241 // ForceSendFields is a list of field names (e.g. "CreateTime") to
4242 // unconditionally include in API requests. By default, fields with empty or
4243 // default values are omitted from API requests. See
4244 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4245 // details.
4246 ForceSendFields []string `json:"-"`
4247 // NullFields is a list of field names (e.g. "CreateTime") to include in API
4248 // requests with the JSON null value. By default, fields with empty values are
4249 // omitted from API requests. See
4250 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4251 NullFields []string `json:"-"`
4252 }
4253
4254 func (s MembershipBinding) MarshalJSON() ([]byte, error) {
4255 type NoMethod MembershipBinding
4256 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4257 }
4258
4259 // MembershipBindingLifecycleState: MembershipBindingLifecycleState describes
4260 // the state of a Binding resource.
4261 type MembershipBindingLifecycleState struct {
4262 // Code: Output only. The current state of the MembershipBinding resource.
4263 //
4264 // Possible values:
4265 // "CODE_UNSPECIFIED" - The code is not set.
4266 // "CREATING" - The membershipbinding is being created.
4267 // "READY" - The membershipbinding active.
4268 // "DELETING" - The membershipbinding is being deleted.
4269 // "UPDATING" - The membershipbinding is being updated.
4270 Code string `json:"code,omitempty"`
4271 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
4272 // include in API requests. By default, fields with empty or default values are
4273 // omitted from API requests. See
4274 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4275 // details.
4276 ForceSendFields []string `json:"-"`
4277 // NullFields is a list of field names (e.g. "Code") to include in API requests
4278 // with the JSON null value. By default, fields with empty values are omitted
4279 // from API requests. See
4280 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4281 NullFields []string `json:"-"`
4282 }
4283
4284 func (s MembershipBindingLifecycleState) MarshalJSON() ([]byte, error) {
4285 type NoMethod MembershipBindingLifecycleState
4286 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4287 }
4288
4289 // MembershipEndpoint: MembershipEndpoint contains information needed to
4290 // contact a Kubernetes API, endpoint and any additional Kubernetes metadata.
4291 type MembershipEndpoint struct {
4292 // ApplianceCluster: Optional. Specific information for a GDC Edge Appliance
4293 // cluster.
4294 ApplianceCluster *ApplianceCluster `json:"applianceCluster,omitempty"`
4295 // EdgeCluster: Optional. Specific information for a Google Edge cluster.
4296 EdgeCluster *EdgeCluster `json:"edgeCluster,omitempty"`
4297 // GkeCluster: Optional. Specific information for a GKE on Google Cloud
4298 // cluster.
4299 GkeCluster *GkeCluster `json:"gkeCluster,omitempty"`
4300 // GoogleManaged: Output only. Whether the lifecycle of this membership is
4301 // managed by a google cluster platform service.
4302 GoogleManaged bool `json:"googleManaged,omitempty"`
4303 // KubernetesMetadata: Output only. Useful Kubernetes-specific metadata.
4304 KubernetesMetadata *KubernetesMetadata `json:"kubernetesMetadata,omitempty"`
4305 // KubernetesResource: Optional. The in-cluster Kubernetes Resources that
4306 // should be applied for a correctly registered cluster, in the steady state.
4307 // These resources: * Ensure that the cluster is exclusively registered to one
4308 // and only one Hub Membership. * Propagate Workload Pool Information available
4309 // in the Membership Authority field. * Ensure proper initial configuration of
4310 // default Hub Features.
4311 KubernetesResource *KubernetesResource `json:"kubernetesResource,omitempty"`
4312 // MultiCloudCluster: Optional. Specific information for a GKE Multi-Cloud
4313 // cluster.
4314 MultiCloudCluster *MultiCloudCluster `json:"multiCloudCluster,omitempty"`
4315 // OnPremCluster: Optional. Specific information for a GKE On-Prem cluster. An
4316 // onprem user-cluster who has no resourceLink is not allowed to use this
4317 // field, it should have a nil "type" instead.
4318 OnPremCluster *OnPremCluster `json:"onPremCluster,omitempty"`
4319 // ForceSendFields is a list of field names (e.g. "ApplianceCluster") to
4320 // unconditionally include in API requests. By default, fields with empty or
4321 // default values are omitted from API requests. See
4322 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4323 // details.
4324 ForceSendFields []string `json:"-"`
4325 // NullFields is a list of field names (e.g. "ApplianceCluster") to include in
4326 // API requests with the JSON null value. By default, fields with empty values
4327 // are omitted from API requests. See
4328 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4329 NullFields []string `json:"-"`
4330 }
4331
4332 func (s MembershipEndpoint) MarshalJSON() ([]byte, error) {
4333 type NoMethod MembershipEndpoint
4334 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4335 }
4336
4337 // MembershipFeatureSpec: MembershipFeatureSpec contains configuration
4338 // information for a single Membership.
4339 type MembershipFeatureSpec struct {
4340 // Cloudbuild: Cloud Build-specific spec
4341 Cloudbuild *MembershipSpec `json:"cloudbuild,omitempty"`
4342 // Configmanagement: Config Management-specific spec.
4343 Configmanagement *ConfigManagementMembershipSpec `json:"configmanagement,omitempty"`
4344 // Fleetobservability: Fleet observability membership spec
4345 Fleetobservability *FleetObservabilityMembershipSpec `json:"fleetobservability,omitempty"`
4346 // Identityservice: Identity Service-specific spec.
4347 Identityservice *IdentityServiceMembershipSpec `json:"identityservice,omitempty"`
4348 // Mesh: Anthos Service Mesh-specific spec
4349 Mesh *ServiceMeshMembershipSpec `json:"mesh,omitempty"`
4350 // Origin: Whether this per-Membership spec was inherited from a fleet-level
4351 // default. This field can be updated by users by either overriding a
4352 // Membership config (updated to USER implicitly) or setting to FLEET
4353 // explicitly.
4354 Origin *Origin `json:"origin,omitempty"`
4355 // Policycontroller: Policy Controller spec.
4356 Policycontroller *PolicyControllerMembershipSpec `json:"policycontroller,omitempty"`
4357 // ForceSendFields is a list of field names (e.g. "Cloudbuild") to
4358 // unconditionally include in API requests. By default, fields with empty or
4359 // default values are omitted from API requests. See
4360 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4361 // details.
4362 ForceSendFields []string `json:"-"`
4363 // NullFields is a list of field names (e.g. "Cloudbuild") to include in API
4364 // requests with the JSON null value. By default, fields with empty values are
4365 // omitted from API requests. See
4366 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4367 NullFields []string `json:"-"`
4368 }
4369
4370 func (s MembershipFeatureSpec) MarshalJSON() ([]byte, error) {
4371 type NoMethod MembershipFeatureSpec
4372 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4373 }
4374
4375 // MembershipFeatureState: MembershipFeatureState contains Feature status
4376 // information for a single Membership.
4377 type MembershipFeatureState struct {
4378 // Appdevexperience: Appdevexperience specific state.
4379 Appdevexperience *AppDevExperienceFeatureState `json:"appdevexperience,omitempty"`
4380 // Clusterupgrade: ClusterUpgrade state.
4381 Clusterupgrade *ClusterUpgradeMembershipState `json:"clusterupgrade,omitempty"`
4382 // Configmanagement: Config Management-specific state.
4383 Configmanagement *ConfigManagementMembershipState `json:"configmanagement,omitempty"`
4384 // Fleetobservability: Fleet observability membership state.
4385 Fleetobservability *FleetObservabilityMembershipState `json:"fleetobservability,omitempty"`
4386 // Identityservice: Identity Service-specific state.
4387 Identityservice *IdentityServiceMembershipState `json:"identityservice,omitempty"`
4388 // Metering: Metering-specific state.
4389 Metering *MeteringMembershipState `json:"metering,omitempty"`
4390 // Policycontroller: Policycontroller-specific state.
4391 Policycontroller *PolicyControllerMembershipState `json:"policycontroller,omitempty"`
4392 // Servicemesh: Service Mesh-specific state.
4393 Servicemesh *ServiceMeshMembershipState `json:"servicemesh,omitempty"`
4394 // State: The high-level state of this Feature for a single membership.
4395 State *FeatureState `json:"state,omitempty"`
4396 // Workloadidentity: Workload Identity membership specific state.
4397 Workloadidentity *WorkloadIdentityMembershipState `json:"workloadidentity,omitempty"`
4398 // ForceSendFields is a list of field names (e.g. "Appdevexperience") to
4399 // unconditionally include in API requests. By default, fields with empty or
4400 // default values are omitted from API requests. See
4401 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4402 // details.
4403 ForceSendFields []string `json:"-"`
4404 // NullFields is a list of field names (e.g. "Appdevexperience") to include in
4405 // API requests with the JSON null value. By default, fields with empty values
4406 // are omitted from API requests. See
4407 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4408 NullFields []string `json:"-"`
4409 }
4410
4411 func (s MembershipFeatureState) MarshalJSON() ([]byte, error) {
4412 type NoMethod MembershipFeatureState
4413 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4414 }
4415
4416 // MembershipSpec: **Cloud Build**: Configurations for each Cloud Build enabled
4417 // cluster.
4418 type MembershipSpec struct {
4419 // SecurityPolicy: Whether it is allowed to run the privileged builds on the
4420 // cluster or not.
4421 //
4422 // Possible values:
4423 // "SECURITY_POLICY_UNSPECIFIED" - Unspecified policy
4424 // "NON_PRIVILEGED" - Privileged build pods are disallowed
4425 // "PRIVILEGED" - Privileged build pods are allowed
4426 SecurityPolicy string `json:"securityPolicy,omitempty"`
4427 // Version: Version of the cloud build software on the cluster.
4428 Version string `json:"version,omitempty"`
4429 // ForceSendFields is a list of field names (e.g. "SecurityPolicy") to
4430 // unconditionally include in API requests. By default, fields with empty or
4431 // default values are omitted from API requests. See
4432 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4433 // details.
4434 ForceSendFields []string `json:"-"`
4435 // NullFields is a list of field names (e.g. "SecurityPolicy") to include in
4436 // API requests with the JSON null value. By default, fields with empty values
4437 // are omitted from API requests. See
4438 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4439 NullFields []string `json:"-"`
4440 }
4441
4442 func (s MembershipSpec) MarshalJSON() ([]byte, error) {
4443 type NoMethod MembershipSpec
4444 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4445 }
4446
4447 // MembershipState: MembershipState describes the state of a Membership
4448 // resource.
4449 type MembershipState struct {
4450 // Code: Output only. The current state of the Membership resource.
4451 //
4452 // Possible values:
4453 // "CODE_UNSPECIFIED" - The code is not set.
4454 // "CREATING" - The cluster is being registered.
4455 // "READY" - The cluster is registered.
4456 // "DELETING" - The cluster is being unregistered.
4457 // "UPDATING" - The Membership is being updated.
4458 // "SERVICE_UPDATING" - The Membership is being updated by the Hub Service.
4459 Code string `json:"code,omitempty"`
4460 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
4461 // include in API requests. By default, fields with empty or default values are
4462 // omitted from API requests. See
4463 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4464 // details.
4465 ForceSendFields []string `json:"-"`
4466 // NullFields is a list of field names (e.g. "Code") to include in API requests
4467 // with the JSON null value. By default, fields with empty values are omitted
4468 // from API requests. See
4469 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4470 NullFields []string `json:"-"`
4471 }
4472
4473 func (s MembershipState) MarshalJSON() ([]byte, error) {
4474 type NoMethod MembershipState
4475 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4476 }
4477
4478 // MeteringMembershipState: **Metering**: Per-Membership Feature State.
4479 type MeteringMembershipState struct {
4480 // LastMeasurementTime: The time stamp of the most recent measurement of the
4481 // number of vCPUs in the cluster.
4482 LastMeasurementTime string `json:"lastMeasurementTime,omitempty"`
4483 // PreciseLastMeasuredClusterVcpuCapacity: The vCPUs capacity in the cluster
4484 // according to the most recent measurement (1/1000 precision).
4485 PreciseLastMeasuredClusterVcpuCapacity float64 `json:"preciseLastMeasuredClusterVcpuCapacity,omitempty"`
4486 // ForceSendFields is a list of field names (e.g. "LastMeasurementTime") to
4487 // unconditionally include in API requests. By default, fields with empty or
4488 // default values are omitted from API requests. See
4489 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4490 // details.
4491 ForceSendFields []string `json:"-"`
4492 // NullFields is a list of field names (e.g. "LastMeasurementTime") to include
4493 // in API requests with the JSON null value. By default, fields with empty
4494 // values are omitted from API requests. See
4495 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4496 NullFields []string `json:"-"`
4497 }
4498
4499 func (s MeteringMembershipState) MarshalJSON() ([]byte, error) {
4500 type NoMethod MeteringMembershipState
4501 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4502 }
4503
4504 func (s *MeteringMembershipState) UnmarshalJSON(data []byte) error {
4505 type NoMethod MeteringMembershipState
4506 var s1 struct {
4507 PreciseLastMeasuredClusterVcpuCapacity gensupport.JSONFloat64 `json:"preciseLastMeasuredClusterVcpuCapacity"`
4508 *NoMethod
4509 }
4510 s1.NoMethod = (*NoMethod)(s)
4511 if err := json.Unmarshal(data, &s1); err != nil {
4512 return err
4513 }
4514 s.PreciseLastMeasuredClusterVcpuCapacity = float64(s1.PreciseLastMeasuredClusterVcpuCapacity)
4515 return nil
4516 }
4517
4518 // MonitoringConfig: MonitoringConfig informs Fleet-based
4519 // applications/services/UIs how the metrics for the underlying cluster is
4520 // reported to cloud monitoring services. It can be set from empty to
4521 // non-empty, but can't be mutated directly to prevent accidentally breaking
4522 // the constinousty of metrics.
4523 type MonitoringConfig struct {
4524 // Cluster: Optional. Cluster name used to report metrics. For Anthos on
4525 // VMWare/Baremetal/MultiCloud clusters, it would be in format
4526 // {cluster_type}/{cluster_name}, e.g., "awsClusters/cluster_1".
4527 Cluster string `json:"cluster,omitempty"`
4528 // ClusterHash: Optional. For GKE and Multicloud clusters, this is the UUID of
4529 // the cluster resource. For VMWare and Baremetal clusters, this is the
4530 // kube-system UID.
4531 ClusterHash string `json:"clusterHash,omitempty"`
4532 // KubernetesMetricsPrefix: Optional. Kubernetes system metrics, if available,
4533 // are written to this prefix. This defaults to kubernetes.io for GKE, and
4534 // kubernetes.io/anthos for Anthos eventually. Noted: Anthos MultiCloud will
4535 // have kubernetes.io prefix today but will migration to be under
4536 // kubernetes.io/anthos.
4537 KubernetesMetricsPrefix string `json:"kubernetesMetricsPrefix,omitempty"`
4538 // Location: Optional. Location used to report Metrics
4539 Location string `json:"location,omitempty"`
4540 // ProjectId: Optional. Project used to report Metrics
4541 ProjectId string `json:"projectId,omitempty"`
4542 // ForceSendFields is a list of field names (e.g. "Cluster") to unconditionally
4543 // include in API requests. By default, fields with empty or default values are
4544 // omitted from API requests. See
4545 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4546 // details.
4547 ForceSendFields []string `json:"-"`
4548 // NullFields is a list of field names (e.g. "Cluster") to include in API
4549 // requests with the JSON null value. By default, fields with empty values are
4550 // omitted from API requests. See
4551 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4552 NullFields []string `json:"-"`
4553 }
4554
4555 func (s MonitoringConfig) MarshalJSON() ([]byte, error) {
4556 type NoMethod MonitoringConfig
4557 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4558 }
4559
4560 // MultiCloudCluster: MultiCloudCluster contains information specific to GKE
4561 // Multi-Cloud clusters.
4562 type MultiCloudCluster struct {
4563 // ClusterMissing: Output only. If cluster_missing is set then it denotes that
4564 // API(gkemulticloud.googleapis.com) resource for this GKE Multi-Cloud cluster
4565 // no longer exists.
4566 ClusterMissing bool `json:"clusterMissing,omitempty"`
4567 // ResourceLink: Immutable. Self-link of the Google Cloud resource for the GKE
4568 // Multi-Cloud cluster. For example:
4569 // //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/awsCl
4570 // usters/my-cluster
4571 // //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/azure
4572 // Clusters/my-cluster
4573 // //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/attac
4574 // hedClusters/my-cluster
4575 ResourceLink string `json:"resourceLink,omitempty"`
4576 // ForceSendFields is a list of field names (e.g. "ClusterMissing") to
4577 // unconditionally include in API requests. By default, fields with empty or
4578 // default values are omitted from API requests. See
4579 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4580 // details.
4581 ForceSendFields []string `json:"-"`
4582 // NullFields is a list of field names (e.g. "ClusterMissing") to include in
4583 // API requests with the JSON null value. By default, fields with empty values
4584 // are omitted from API requests. See
4585 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4586 NullFields []string `json:"-"`
4587 }
4588
4589 func (s MultiCloudCluster) MarshalJSON() ([]byte, error) {
4590 type NoMethod MultiCloudCluster
4591 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4592 }
4593
4594 // MultiClusterIngressFeatureSpec: **Multi-cluster Ingress**: The configuration
4595 // for the MultiClusterIngress feature.
4596 type MultiClusterIngressFeatureSpec struct {
4597 // Billing: Deprecated: This field will be ignored and should not be set.
4598 // Customer's billing structure.
4599 //
4600 // Possible values:
4601 // "BILLING_UNSPECIFIED" - Unknown
4602 // "PAY_AS_YOU_GO" - User pays a fee per-endpoint.
4603 // "ANTHOS_LICENSE" - User is paying for Anthos as a whole.
4604 Billing string `json:"billing,omitempty"`
4605 // ConfigMembership: Fully-qualified Membership name which hosts the
4606 // MultiClusterIngress CRD. Example:
4607 // `projects/foo-proj/locations/global/memberships/bar`
4608 ConfigMembership string `json:"configMembership,omitempty"`
4609 // ForceSendFields is a list of field names (e.g. "Billing") to unconditionally
4610 // include in API requests. By default, fields with empty or default values are
4611 // omitted from API requests. See
4612 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4613 // details.
4614 ForceSendFields []string `json:"-"`
4615 // NullFields is a list of field names (e.g. "Billing") to include in API
4616 // requests with the JSON null value. By default, fields with empty values are
4617 // omitted from API requests. See
4618 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4619 NullFields []string `json:"-"`
4620 }
4621
4622 func (s MultiClusterIngressFeatureSpec) MarshalJSON() ([]byte, error) {
4623 type NoMethod MultiClusterIngressFeatureSpec
4624 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4625 }
4626
4627 // Namespace: Namespace represents a namespace across the Fleet
4628 type Namespace struct {
4629 // CreateTime: Output only. When the namespace was created.
4630 CreateTime string `json:"createTime,omitempty"`
4631 // DeleteTime: Output only. When the namespace was deleted.
4632 DeleteTime string `json:"deleteTime,omitempty"`
4633 // Labels: Optional. Labels for this Namespace.
4634 Labels map[string]string `json:"labels,omitempty"`
4635 // Name: The resource name for the namespace
4636 // `projects/{project}/locations/{location}/namespaces/{namespace}`
4637 Name string `json:"name,omitempty"`
4638 // NamespaceLabels: Optional. Namespace-level cluster namespace labels. These
4639 // labels are applied to the related namespace of the member clusters bound to
4640 // the parent Scope. Scope-level labels (`namespace_labels` in the Fleet Scope
4641 // resource) take precedence over Namespace-level labels if they share a key.
4642 // Keys and values must be Kubernetes-conformant.
4643 NamespaceLabels map[string]string `json:"namespaceLabels,omitempty"`
4644 // Scope: Required. Scope associated with the namespace
4645 Scope string `json:"scope,omitempty"`
4646 // State: Output only. State of the namespace resource.
4647 State *NamespaceLifecycleState `json:"state,omitempty"`
4648 // Uid: Output only. Google-generated UUID for this resource. This is unique
4649 // across all namespace resources. If a namespace resource is deleted and
4650 // another resource with the same name is created, it gets a different uid.
4651 Uid string `json:"uid,omitempty"`
4652 // UpdateTime: Output only. When the namespace was last updated.
4653 UpdateTime string `json:"updateTime,omitempty"`
4654
4655 // ServerResponse contains the HTTP response code and headers from the server.
4656 googleapi.ServerResponse `json:"-"`
4657 // ForceSendFields is a list of field names (e.g. "CreateTime") to
4658 // unconditionally include in API requests. By default, fields with empty or
4659 // default values are omitted from API requests. See
4660 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4661 // details.
4662 ForceSendFields []string `json:"-"`
4663 // NullFields is a list of field names (e.g. "CreateTime") to include in API
4664 // requests with the JSON null value. By default, fields with empty values are
4665 // omitted from API requests. See
4666 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4667 NullFields []string `json:"-"`
4668 }
4669
4670 func (s Namespace) MarshalJSON() ([]byte, error) {
4671 type NoMethod Namespace
4672 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4673 }
4674
4675 // NamespaceLifecycleState: NamespaceLifecycleState describes the state of a
4676 // Namespace resource.
4677 type NamespaceLifecycleState struct {
4678 // Code: Output only. The current state of the Namespace resource.
4679 //
4680 // Possible values:
4681 // "CODE_UNSPECIFIED" - The code is not set.
4682 // "CREATING" - The namespace is being created.
4683 // "READY" - The namespace active.
4684 // "DELETING" - The namespace is being deleted.
4685 // "UPDATING" - The namespace is being updated.
4686 Code string `json:"code,omitempty"`
4687 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
4688 // include in API requests. By default, fields with empty or default values are
4689 // omitted from API requests. See
4690 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4691 // details.
4692 ForceSendFields []string `json:"-"`
4693 // NullFields is a list of field names (e.g. "Code") to include in API requests
4694 // with the JSON null value. By default, fields with empty values are omitted
4695 // from API requests. See
4696 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4697 NullFields []string `json:"-"`
4698 }
4699
4700 func (s NamespaceLifecycleState) MarshalJSON() ([]byte, error) {
4701 type NoMethod NamespaceLifecycleState
4702 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4703 }
4704
4705 // OnPremCluster: OnPremCluster contains information specific to GKE On-Prem
4706 // clusters.
4707 type OnPremCluster struct {
4708 // AdminCluster: Immutable. Whether the cluster is an admin cluster.
4709 AdminCluster bool `json:"adminCluster,omitempty"`
4710 // ClusterMissing: Output only. If cluster_missing is set then it denotes that
4711 // API(gkeonprem.googleapis.com) resource for this GKE On-Prem cluster no
4712 // longer exists.
4713 ClusterMissing bool `json:"clusterMissing,omitempty"`
4714 // ClusterType: Immutable. The on prem cluster's type.
4715 //
4716 // Possible values:
4717 // "CLUSTERTYPE_UNSPECIFIED" - The ClusterType is not set.
4718 // "BOOTSTRAP" - The ClusterType is bootstrap cluster.
4719 // "HYBRID" - The ClusterType is baremetal hybrid cluster.
4720 // "STANDALONE" - The ClusterType is baremetal standalone cluster.
4721 // "USER" - The ClusterType is user cluster.
4722 ClusterType string `json:"clusterType,omitempty"`
4723 // ResourceLink: Immutable. Self-link of the Google Cloud resource for the GKE
4724 // On-Prem cluster. For example:
4725 // //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/vmwareClu
4726 // sters/my-cluster
4727 // //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/bareMetal
4728 // Clusters/my-cluster
4729 ResourceLink string `json:"resourceLink,omitempty"`
4730 // ForceSendFields is a list of field names (e.g. "AdminCluster") to
4731 // unconditionally include in API requests. By default, fields with empty or
4732 // default values are omitted from API requests. See
4733 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4734 // details.
4735 ForceSendFields []string `json:"-"`
4736 // NullFields is a list of field names (e.g. "AdminCluster") to include in API
4737 // requests with the JSON null value. By default, fields with empty values are
4738 // omitted from API requests. See
4739 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4740 NullFields []string `json:"-"`
4741 }
4742
4743 func (s OnPremCluster) MarshalJSON() ([]byte, error) {
4744 type NoMethod OnPremCluster
4745 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4746 }
4747
4748 // Operation: This resource represents a long-running operation that is the
4749 // result of a network API call.
4750 type Operation struct {
4751 // Done: If the value is `false`, it means the operation is still in progress.
4752 // If `true`, the operation is completed, and either `error` or `response` is
4753 // available.
4754 Done bool `json:"done,omitempty"`
4755 // Error: The error result of the operation in case of failure or cancellation.
4756 Error *GoogleRpcStatus `json:"error,omitempty"`
4757 // Metadata: Service-specific metadata associated with the operation. It
4758 // typically contains progress information and common metadata such as create
4759 // time. Some services might not provide such metadata. Any method that returns
4760 // a long-running operation should document the metadata type, if any.
4761 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
4762 // Name: The server-assigned name, which is only unique within the same service
4763 // that originally returns it. If you use the default HTTP mapping, the `name`
4764 // should be a resource name ending with `operations/{unique_id}`.
4765 Name string `json:"name,omitempty"`
4766 // Response: The normal, successful response of the operation. If the original
4767 // method returns no data on success, such as `Delete`, the response is
4768 // `google.protobuf.Empty`. If the original method is standard
4769 // `Get`/`Create`/`Update`, the response should be the resource. For other
4770 // methods, the response should have the type `XxxResponse`, where `Xxx` is the
4771 // original method name. For example, if the original method name is
4772 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
4773 Response googleapi.RawMessage `json:"response,omitempty"`
4774
4775 // ServerResponse contains the HTTP response code and headers from the server.
4776 googleapi.ServerResponse `json:"-"`
4777 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally
4778 // include in API requests. By default, fields with empty or default values are
4779 // omitted from API requests. See
4780 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4781 // details.
4782 ForceSendFields []string `json:"-"`
4783 // NullFields is a list of field names (e.g. "Done") to include in API requests
4784 // with the JSON null value. By default, fields with empty values are omitted
4785 // from API requests. See
4786 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4787 NullFields []string `json:"-"`
4788 }
4789
4790 func (s Operation) MarshalJSON() ([]byte, error) {
4791 type NoMethod Operation
4792 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4793 }
4794
4795 // OperationMetadata: Represents the metadata of the long-running operation.
4796 type OperationMetadata struct {
4797 // ApiVersion: Output only. API version used to start the operation.
4798 ApiVersion string `json:"apiVersion,omitempty"`
4799 // CancelRequested: Output only. Identifies whether the user has requested
4800 // cancellation of the operation. Operations that have successfully been
4801 // cancelled have google.longrunning.Operation.error value with a
4802 // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
4803 CancelRequested bool `json:"cancelRequested,omitempty"`
4804 // CreateTime: Output only. The time the operation was created.
4805 CreateTime string `json:"createTime,omitempty"`
4806 // EndTime: Output only. The time the operation finished running.
4807 EndTime string `json:"endTime,omitempty"`
4808 // StatusDetail: Output only. Human-readable status of the operation, if any.
4809 StatusDetail string `json:"statusDetail,omitempty"`
4810 // Target: Output only. Server-defined resource path for the target of the
4811 // operation.
4812 Target string `json:"target,omitempty"`
4813 // Verb: Output only. Name of the verb executed by the operation.
4814 Verb string `json:"verb,omitempty"`
4815 // ForceSendFields is a list of field names (e.g. "ApiVersion") to
4816 // unconditionally include in API requests. By default, fields with empty or
4817 // default values are omitted from API requests. See
4818 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4819 // details.
4820 ForceSendFields []string `json:"-"`
4821 // NullFields is a list of field names (e.g. "ApiVersion") to include in API
4822 // requests with the JSON null value. By default, fields with empty values are
4823 // omitted from API requests. See
4824 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4825 NullFields []string `json:"-"`
4826 }
4827
4828 func (s OperationMetadata) MarshalJSON() ([]byte, error) {
4829 type NoMethod OperationMetadata
4830 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4831 }
4832
4833 // Origin: Origin defines where this MembershipFeatureSpec originated from.
4834 type Origin struct {
4835 // Type: Type specifies which type of origin is set.
4836 //
4837 // Possible values:
4838 // "TYPE_UNSPECIFIED" - Type is unknown or not set.
4839 // "FLEET" - Per-Membership spec was inherited from the fleet-level default.
4840 // "FLEET_OUT_OF_SYNC" - Per-Membership spec was inherited from the
4841 // fleet-level default but is now out of sync with the current default.
4842 // "USER" - Per-Membership spec was inherited from a user specification.
4843 Type string `json:"type,omitempty"`
4844 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally
4845 // include in API requests. By default, fields with empty or default values are
4846 // omitted from API requests. See
4847 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4848 // details.
4849 ForceSendFields []string `json:"-"`
4850 // NullFields is a list of field names (e.g. "Type") to include in API requests
4851 // with the JSON null value. By default, fields with empty values are omitted
4852 // from API requests. See
4853 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4854 NullFields []string `json:"-"`
4855 }
4856
4857 func (s Origin) MarshalJSON() ([]byte, error) {
4858 type NoMethod Origin
4859 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4860 }
4861
4862 // Policy: An Identity and Access Management (IAM) policy, which specifies
4863 // access controls for Google Cloud resources. A `Policy` is a collection of
4864 // `bindings`. A `binding` binds one or more `members`, or principals, to a
4865 // single `role`. Principals can be user accounts, service accounts, Google
4866 // groups, and domains (such as G Suite). A `role` is a named list of
4867 // permissions; each `role` can be an IAM predefined role or a user-created
4868 // custom role. For some types of Google Cloud resources, a `binding` can also
4869 // specify a `condition`, which is a logical expression that allows access to a
4870 // resource only if the expression evaluates to `true`. A condition can add
4871 // constraints based on attributes of the request, the resource, or both. To
4872 // learn which resources support conditions in their IAM policies, see the IAM
4873 // documentation
4874 // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
4875 // example:** ``` { "bindings": [ { "role":
4876 // "roles/resourcemanager.organizationAdmin", "members": [
4877 // "user:[email protected]", "group:[email protected]", "domain:google.com",
4878 // "serviceAccount:[email protected]" ] }, { "role":
4879 // "roles/resourcemanager.organizationViewer", "members": [
4880 // "user:[email protected]" ], "condition": { "title": "expirable access",
4881 // "description": "Does not grant access after Sep 2020", "expression":
4882 // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
4883 // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
4884 // members: - user:[email protected] - group:[email protected] -
4885 // domain:google.com - serviceAccount:[email protected]
4886 // role: roles/resourcemanager.organizationAdmin - members: -
4887 // user:[email protected] role: roles/resourcemanager.organizationViewer
4888 // condition: title: expirable access description: Does not grant access after
4889 // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
4890 // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
4891 // see the IAM documentation (https://cloud.google.com/iam/docs/).
4892 type Policy struct {
4893 // AuditConfigs: Specifies cloud audit logging configuration for this policy.
4894 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
4895 // Bindings: Associates a list of `members`, or principals, with a `role`.
4896 // Optionally, may specify a `condition` that determines how and when the
4897 // `bindings` are applied. Each of the `bindings` must contain at least one
4898 // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
4899 // up to 250 of these principals can be Google groups. Each occurrence of a
4900 // principal counts towards these limits. For example, if the `bindings` grant
4901 // 50 different roles to `user:[email protected]`, and not to any other
4902 // principal, then you can add another 1,450 principals to the `bindings` in
4903 // the `Policy`.
4904 Bindings []*Binding `json:"bindings,omitempty"`
4905 // Etag: `etag` is used for optimistic concurrency control as a way to help
4906 // prevent simultaneous updates of a policy from overwriting each other. It is
4907 // strongly suggested that systems make use of the `etag` in the
4908 // read-modify-write cycle to perform policy updates in order to avoid race
4909 // conditions: An `etag` is returned in the response to `getIamPolicy`, and
4910 // systems are expected to put that etag in the request to `setIamPolicy` to
4911 // ensure that their change will be applied to the same version of the policy.
4912 // **Important:** If you use IAM Conditions, you must include the `etag` field
4913 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4914 // you to overwrite a version `3` policy with a version `1` policy, and all of
4915 // the conditions in the version `3` policy are lost.
4916 Etag string `json:"etag,omitempty"`
4917 // Version: Specifies the format of the policy. Valid values are `0`, `1`, and
4918 // `3`. Requests that specify an invalid value are rejected. Any operation that
4919 // affects conditional role bindings must specify version `3`. This requirement
4920 // applies to the following operations: * Getting a policy that includes a
4921 // conditional role binding * Adding a conditional role binding to a policy *
4922 // Changing a conditional role binding in a policy * Removing any role binding,
4923 // with or without a condition, from a policy that includes conditions
4924 // **Important:** If you use IAM Conditions, you must include the `etag` field
4925 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4926 // you to overwrite a version `3` policy with a version `1` policy, and all of
4927 // the conditions in the version `3` policy are lost. If a policy does not
4928 // include any conditions, operations on that policy may specify any valid
4929 // version or leave the field unset. To learn which resources support
4930 // conditions in their IAM policies, see the IAM documentation
4931 // (https://cloud.google.com/iam/help/conditions/resource-policies).
4932 Version int64 `json:"version,omitempty"`
4933
4934 // ServerResponse contains the HTTP response code and headers from the server.
4935 googleapi.ServerResponse `json:"-"`
4936 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to
4937 // unconditionally include in API requests. By default, fields with empty or
4938 // default values are omitted from API requests. See
4939 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4940 // details.
4941 ForceSendFields []string `json:"-"`
4942 // NullFields is a list of field names (e.g. "AuditConfigs") to include in API
4943 // requests with the JSON null value. By default, fields with empty values are
4944 // omitted from API requests. See
4945 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4946 NullFields []string `json:"-"`
4947 }
4948
4949 func (s Policy) MarshalJSON() ([]byte, error) {
4950 type NoMethod Policy
4951 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4952 }
4953
4954 // PolicyBinding: Binauthz policy that applies to this cluster.
4955 type PolicyBinding struct {
4956 // Name: The relative resource name of the binauthz platform policy to audit.
4957 // GKE platform policies have the following format:
4958 // `projects/{project_number}/platforms/gke/policies/{policy_id}`.
4959 Name string `json:"name,omitempty"`
4960 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
4961 // include in API requests. By default, fields with empty or default values are
4962 // omitted from API requests. See
4963 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4964 // details.
4965 ForceSendFields []string `json:"-"`
4966 // NullFields is a list of field names (e.g. "Name") to include in API requests
4967 // with the JSON null value. By default, fields with empty values are omitted
4968 // from API requests. See
4969 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4970 NullFields []string `json:"-"`
4971 }
4972
4973 func (s PolicyBinding) MarshalJSON() ([]byte, error) {
4974 type NoMethod PolicyBinding
4975 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4976 }
4977
4978 // PolicyControllerBundleInstallSpec: BundleInstallSpec is the specification
4979 // configuration for a single managed bundle.
4980 type PolicyControllerBundleInstallSpec struct {
4981 // ExemptedNamespaces: The set of namespaces to be exempted from the bundle.
4982 ExemptedNamespaces []string `json:"exemptedNamespaces,omitempty"`
4983 // ForceSendFields is a list of field names (e.g. "ExemptedNamespaces") to
4984 // unconditionally include in API requests. By default, fields with empty or
4985 // default values are omitted from API requests. See
4986 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4987 // details.
4988 ForceSendFields []string `json:"-"`
4989 // NullFields is a list of field names (e.g. "ExemptedNamespaces") to include
4990 // in API requests with the JSON null value. By default, fields with empty
4991 // values are omitted from API requests. See
4992 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4993 NullFields []string `json:"-"`
4994 }
4995
4996 func (s PolicyControllerBundleInstallSpec) MarshalJSON() ([]byte, error) {
4997 type NoMethod PolicyControllerBundleInstallSpec
4998 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4999 }
5000
5001 // PolicyControllerHubConfig: Configuration for Policy Controller
5002 type PolicyControllerHubConfig struct {
5003 // AuditIntervalSeconds: Sets the interval for Policy Controller Audit Scans
5004 // (in seconds). When set to 0, this disables audit functionality altogether.
5005 AuditIntervalSeconds int64 `json:"auditIntervalSeconds,omitempty,string"`
5006 // ConstraintViolationLimit: The maximum number of audit violations to be
5007 // stored in a constraint. If not set, the internal default (currently 20) will
5008 // be used.
5009 ConstraintViolationLimit int64 `json:"constraintViolationLimit,omitempty,string"`
5010 // DeploymentConfigs: Map of deployment configs to deployments ("admission",
5011 // "audit", "mutation').
5012 DeploymentConfigs map[string]PolicyControllerPolicyControllerDeploymentConfig `json:"deploymentConfigs,omitempty"`
5013 // ExemptableNamespaces: The set of namespaces that are excluded from Policy
5014 // Controller checks. Namespaces do not need to currently exist on the cluster.
5015 ExemptableNamespaces []string `json:"exemptableNamespaces,omitempty"`
5016 // InstallSpec: The install_spec represents the intended state specified by the
5017 // latest request that mutated install_spec in the feature spec, not the
5018 // lifecycle state of the feature observed by the Hub feature controller that
5019 // is reported in the feature state.
5020 //
5021 // Possible values:
5022 // "INSTALL_SPEC_UNSPECIFIED" - Spec is unknown.
5023 // "INSTALL_SPEC_NOT_INSTALLED" - Request to uninstall Policy Controller.
5024 // "INSTALL_SPEC_ENABLED" - Request to install and enable Policy Controller.
5025 // "INSTALL_SPEC_SUSPENDED" - Request to suspend Policy Controller i.e. its
5026 // webhooks. If Policy Controller is not installed, it will be installed but
5027 // suspended.
5028 // "INSTALL_SPEC_DETACHED" - Request to stop all reconciliation actions by
5029 // PoCo Hub controller. This is a breakglass mechanism to stop PoCo Hub from
5030 // affecting cluster resources.
5031 InstallSpec string `json:"installSpec,omitempty"`
5032 // LogDeniesEnabled: Logs all denies and dry run failures.
5033 LogDeniesEnabled bool `json:"logDeniesEnabled,omitempty"`
5034 // Monitoring: Monitoring specifies the configuration of monitoring.
5035 Monitoring *PolicyControllerMonitoringConfig `json:"monitoring,omitempty"`
5036 // MutationEnabled: Enables the ability to mutate resources using Policy
5037 // Controller.
5038 MutationEnabled bool `json:"mutationEnabled,omitempty"`
5039 // PolicyContent: Specifies the desired policy content on the cluster
5040 PolicyContent *PolicyControllerPolicyContentSpec `json:"policyContent,omitempty"`
5041 // ReferentialRulesEnabled: Enables the ability to use Constraint Templates
5042 // that reference to objects other than the object currently being evaluated.
5043 ReferentialRulesEnabled bool `json:"referentialRulesEnabled,omitempty"`
5044 // ForceSendFields is a list of field names (e.g. "AuditIntervalSeconds") to
5045 // unconditionally include in API requests. By default, fields with empty or
5046 // default values are omitted from API requests. See
5047 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5048 // details.
5049 ForceSendFields []string `json:"-"`
5050 // NullFields is a list of field names (e.g. "AuditIntervalSeconds") to include
5051 // in API requests with the JSON null value. By default, fields with empty
5052 // values are omitted from API requests. See
5053 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5054 NullFields []string `json:"-"`
5055 }
5056
5057 func (s PolicyControllerHubConfig) MarshalJSON() ([]byte, error) {
5058 type NoMethod PolicyControllerHubConfig
5059 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5060 }
5061
5062 // PolicyControllerMembershipSpec: **Policy Controller**: Configuration for a
5063 // single cluster. Intended to parallel the PolicyController CR.
5064 type PolicyControllerMembershipSpec struct {
5065 // PolicyControllerHubConfig: Policy Controller configuration for the cluster.
5066 PolicyControllerHubConfig *PolicyControllerHubConfig `json:"policyControllerHubConfig,omitempty"`
5067 // Version: Version of Policy Controller installed.
5068 Version string `json:"version,omitempty"`
5069 // ForceSendFields is a list of field names (e.g. "PolicyControllerHubConfig")
5070 // to unconditionally include in API requests. By default, fields with empty or
5071 // default values are omitted from API requests. See
5072 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5073 // details.
5074 ForceSendFields []string `json:"-"`
5075 // NullFields is a list of field names (e.g. "PolicyControllerHubConfig") to
5076 // include in API requests with the JSON null value. By default, fields with
5077 // empty values are omitted from API requests. See
5078 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5079 NullFields []string `json:"-"`
5080 }
5081
5082 func (s PolicyControllerMembershipSpec) MarshalJSON() ([]byte, error) {
5083 type NoMethod PolicyControllerMembershipSpec
5084 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5085 }
5086
5087 // PolicyControllerMembershipState: **Policy Controller**: State for a single
5088 // cluster.
5089 type PolicyControllerMembershipState struct {
5090 // ComponentStates: Currently these include (also serving as map keys): 1.
5091 // "admission" 2. "audit" 3. "mutation"
5092 ComponentStates map[string]PolicyControllerOnClusterState `json:"componentStates,omitempty"`
5093 // PolicyContentState: The overall content state observed by the Hub Feature
5094 // controller.
5095 PolicyContentState *PolicyControllerPolicyContentState `json:"policyContentState,omitempty"`
5096 // State: The overall Policy Controller lifecycle state observed by the Hub
5097 // Feature controller.
5098 //
5099 // Possible values:
5100 // "LIFECYCLE_STATE_UNSPECIFIED" - The lifecycle state is unspecified.
5101 // "NOT_INSTALLED" - The PC does not exist on the given cluster, and no k8s
5102 // resources of any type that are associated with the PC should exist there.
5103 // The cluster does not possess a membership with the PCH.
5104 // "INSTALLING" - The PCH possesses a Membership, however the PC is not fully
5105 // installed on the cluster. In this state the hub can be expected to be taking
5106 // actions to install the PC on the cluster.
5107 // "ACTIVE" - The PC is fully installed on the cluster and in an operational
5108 // mode. In this state PCH will be reconciling state with the PC, and the PC
5109 // will be performing it's operational tasks per that software. Entering a
5110 // READY state requires that the hub has confirmed the PC is installed and its
5111 // pods are operational with the version of the PC the PCH expects.
5112 // "UPDATING" - The PC is fully installed, but in the process of changing the
5113 // configuration (including changing the version of PC either up and down, or
5114 // modifying the manifests of PC) of the resources running on the cluster. The
5115 // PCH has a Membership, is aware of the version the cluster should be running
5116 // in, but has not confirmed for itself that the PC is running with that
5117 // version.
5118 // "DECOMMISSIONING" - The PC may have resources on the cluster, but the PCH
5119 // wishes to remove the Membership. The Membership still exists.
5120 // "CLUSTER_ERROR" - The PC is not operational, and the PCH is unable to act
5121 // to make it operational. Entering a CLUSTER_ERROR state happens automatically
5122 // when the PCH determines that a PC installed on the cluster is non-operative
5123 // or that the cluster does not meet requirements set for the PCH to administer
5124 // the cluster but has nevertheless been given an instruction to do so (such as
5125 // 'install').
5126 // "HUB_ERROR" - In this state, the PC may still be operational, and only the
5127 // PCH is unable to act. The hub should not issue instructions to change the PC
5128 // state, or otherwise interfere with the on-cluster resources. Entering a
5129 // HUB_ERROR state happens automatically when the PCH determines the hub is in
5130 // an unhealthy state and it wishes to 'take hands off' to avoid corrupting the
5131 // PC or other data.
5132 // "SUSPENDED" - Policy Controller (PC) is installed but suspended. This
5133 // means that the policies are not enforced, but violations are still recorded
5134 // (through audit).
5135 // "DETACHED" - PoCo Hub is not taking any action to reconcile cluster
5136 // objects. Changes to those objects will not be overwritten by PoCo Hub.
5137 State string `json:"state,omitempty"`
5138 // ForceSendFields is a list of field names (e.g. "ComponentStates") to
5139 // unconditionally include in API requests. By default, fields with empty or
5140 // default values are omitted from API requests. See
5141 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5142 // details.
5143 ForceSendFields []string `json:"-"`
5144 // NullFields is a list of field names (e.g. "ComponentStates") to include in
5145 // API requests with the JSON null value. By default, fields with empty values
5146 // are omitted from API requests. See
5147 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5148 NullFields []string `json:"-"`
5149 }
5150
5151 func (s PolicyControllerMembershipState) MarshalJSON() ([]byte, error) {
5152 type NoMethod PolicyControllerMembershipState
5153 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5154 }
5155
5156 // PolicyControllerMonitoringConfig: MonitoringConfig specifies the backends
5157 // Policy Controller should export metrics to. For example, to specify metrics
5158 // should be exported to Cloud Monitoring and Prometheus, specify backends:
5159 // ["cloudmonitoring", "prometheus"]
5160 type PolicyControllerMonitoringConfig struct {
5161 // Backends: Specifies the list of backends Policy Controller will export to.
5162 // An empty list would effectively disable metrics export.
5163 //
5164 // Possible values:
5165 // "MONITORING_BACKEND_UNSPECIFIED" - Backend cannot be determined
5166 // "PROMETHEUS" - Prometheus backend for monitoring
5167 // "CLOUD_MONITORING" - Stackdriver/Cloud Monitoring backend for monitoring
5168 Backends []string `json:"backends,omitempty"`
5169 // ForceSendFields is a list of field names (e.g. "Backends") to
5170 // unconditionally include in API requests. By default, fields with empty or
5171 // default values are omitted from API requests. See
5172 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5173 // details.
5174 ForceSendFields []string `json:"-"`
5175 // NullFields is a list of field names (e.g. "Backends") to include in API
5176 // requests with the JSON null value. By default, fields with empty values are
5177 // omitted from API requests. See
5178 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5179 NullFields []string `json:"-"`
5180 }
5181
5182 func (s PolicyControllerMonitoringConfig) MarshalJSON() ([]byte, error) {
5183 type NoMethod PolicyControllerMonitoringConfig
5184 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5185 }
5186
5187 // PolicyControllerOnClusterState: OnClusterState represents the state of a
5188 // sub-component of Policy Controller.
5189 type PolicyControllerOnClusterState struct {
5190 // Details: Surface potential errors or information logs.
5191 Details string `json:"details,omitempty"`
5192 // State: The lifecycle state of this component.
5193 //
5194 // Possible values:
5195 // "LIFECYCLE_STATE_UNSPECIFIED" - The lifecycle state is unspecified.
5196 // "NOT_INSTALLED" - The PC does not exist on the given cluster, and no k8s
5197 // resources of any type that are associated with the PC should exist there.
5198 // The cluster does not possess a membership with the PCH.
5199 // "INSTALLING" - The PCH possesses a Membership, however the PC is not fully
5200 // installed on the cluster. In this state the hub can be expected to be taking
5201 // actions to install the PC on the cluster.
5202 // "ACTIVE" - The PC is fully installed on the cluster and in an operational
5203 // mode. In this state PCH will be reconciling state with the PC, and the PC
5204 // will be performing it's operational tasks per that software. Entering a
5205 // READY state requires that the hub has confirmed the PC is installed and its
5206 // pods are operational with the version of the PC the PCH expects.
5207 // "UPDATING" - The PC is fully installed, but in the process of changing the
5208 // configuration (including changing the version of PC either up and down, or
5209 // modifying the manifests of PC) of the resources running on the cluster. The
5210 // PCH has a Membership, is aware of the version the cluster should be running
5211 // in, but has not confirmed for itself that the PC is running with that
5212 // version.
5213 // "DECOMMISSIONING" - The PC may have resources on the cluster, but the PCH
5214 // wishes to remove the Membership. The Membership still exists.
5215 // "CLUSTER_ERROR" - The PC is not operational, and the PCH is unable to act
5216 // to make it operational. Entering a CLUSTER_ERROR state happens automatically
5217 // when the PCH determines that a PC installed on the cluster is non-operative
5218 // or that the cluster does not meet requirements set for the PCH to administer
5219 // the cluster but has nevertheless been given an instruction to do so (such as
5220 // 'install').
5221 // "HUB_ERROR" - In this state, the PC may still be operational, and only the
5222 // PCH is unable to act. The hub should not issue instructions to change the PC
5223 // state, or otherwise interfere with the on-cluster resources. Entering a
5224 // HUB_ERROR state happens automatically when the PCH determines the hub is in
5225 // an unhealthy state and it wishes to 'take hands off' to avoid corrupting the
5226 // PC or other data.
5227 // "SUSPENDED" - Policy Controller (PC) is installed but suspended. This
5228 // means that the policies are not enforced, but violations are still recorded
5229 // (through audit).
5230 // "DETACHED" - PoCo Hub is not taking any action to reconcile cluster
5231 // objects. Changes to those objects will not be overwritten by PoCo Hub.
5232 State string `json:"state,omitempty"`
5233 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally
5234 // include in API requests. By default, fields with empty or default values are
5235 // omitted from API requests. See
5236 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5237 // details.
5238 ForceSendFields []string `json:"-"`
5239 // NullFields is a list of field names (e.g. "Details") to include in API
5240 // requests with the JSON null value. By default, fields with empty values are
5241 // omitted from API requests. See
5242 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5243 NullFields []string `json:"-"`
5244 }
5245
5246 func (s PolicyControllerOnClusterState) MarshalJSON() ([]byte, error) {
5247 type NoMethod PolicyControllerOnClusterState
5248 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5249 }
5250
5251 // PolicyControllerPolicyContentSpec: PolicyContentSpec defines the user's
5252 // desired content configuration on the cluster.
5253 type PolicyControllerPolicyContentSpec struct {
5254 // Bundles: map of bundle name to BundleInstallSpec. The bundle name maps to
5255 // the `bundleName` key in the `policycontroller.gke.io/constraintData`
5256 // annotation on a constraint.
5257 Bundles map[string]PolicyControllerBundleInstallSpec `json:"bundles,omitempty"`
5258 // TemplateLibrary: Configures the installation of the Template Library.
5259 TemplateLibrary *PolicyControllerTemplateLibraryConfig `json:"templateLibrary,omitempty"`
5260 // ForceSendFields is a list of field names (e.g. "Bundles") to unconditionally
5261 // include in API requests. By default, fields with empty or default values are
5262 // omitted from API requests. See
5263 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5264 // details.
5265 ForceSendFields []string `json:"-"`
5266 // NullFields is a list of field names (e.g. "Bundles") to include in API
5267 // requests with the JSON null value. By default, fields with empty values are
5268 // omitted from API requests. See
5269 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5270 NullFields []string `json:"-"`
5271 }
5272
5273 func (s PolicyControllerPolicyContentSpec) MarshalJSON() ([]byte, error) {
5274 type NoMethod PolicyControllerPolicyContentSpec
5275 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5276 }
5277
5278 // PolicyControllerPolicyContentState: The state of the policy controller
5279 // policy content
5280 type PolicyControllerPolicyContentState struct {
5281 // BundleStates: The state of the any bundles included in the chosen version of
5282 // the manifest
5283 BundleStates map[string]PolicyControllerOnClusterState `json:"bundleStates,omitempty"`
5284 // ReferentialSyncConfigState: The state of the referential data sync
5285 // configuration. This could represent the state of either the syncSet
5286 // object(s) or the config object, depending on the version of PoCo configured
5287 // by the user.
5288 ReferentialSyncConfigState *PolicyControllerOnClusterState `json:"referentialSyncConfigState,omitempty"`
5289 // TemplateLibraryState: The state of the template library
5290 TemplateLibraryState *PolicyControllerOnClusterState `json:"templateLibraryState,omitempty"`
5291 // ForceSendFields is a list of field names (e.g. "BundleStates") to
5292 // unconditionally include in API requests. By default, fields with empty or
5293 // default values are omitted from API requests. See
5294 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5295 // details.
5296 ForceSendFields []string `json:"-"`
5297 // NullFields is a list of field names (e.g. "BundleStates") to include in API
5298 // requests with the JSON null value. By default, fields with empty values are
5299 // omitted from API requests. See
5300 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5301 NullFields []string `json:"-"`
5302 }
5303
5304 func (s PolicyControllerPolicyContentState) MarshalJSON() ([]byte, error) {
5305 type NoMethod PolicyControllerPolicyContentState
5306 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5307 }
5308
5309 // PolicyControllerPolicyControllerDeploymentConfig: Deployment-specific
5310 // configuration.
5311 type PolicyControllerPolicyControllerDeploymentConfig struct {
5312 // ContainerResources: Container resource requirements.
5313 ContainerResources *PolicyControllerResourceRequirements `json:"containerResources,omitempty"`
5314 // PodAffinity: Pod affinity configuration.
5315 //
5316 // Possible values:
5317 // "AFFINITY_UNSPECIFIED" - No affinity configuration has been specified.
5318 // "NO_AFFINITY" - Affinity configurations will be removed from the
5319 // deployment.
5320 // "ANTI_AFFINITY" - Anti-affinity configuration will be applied to this
5321 // deployment. Default for admissions deployment.
5322 PodAffinity string `json:"podAffinity,omitempty"`
5323 // PodAntiAffinity: Pod anti-affinity enablement. Deprecated: use
5324 // `pod_affinity` instead.
5325 PodAntiAffinity bool `json:"podAntiAffinity,omitempty"`
5326 // PodTolerations: Pod tolerations of node taints.
5327 PodTolerations []*PolicyControllerToleration `json:"podTolerations,omitempty"`
5328 // ReplicaCount: Pod replica count.
5329 ReplicaCount int64 `json:"replicaCount,omitempty,string"`
5330 // ForceSendFields is a list of field names (e.g. "ContainerResources") to
5331 // unconditionally include in API requests. By default, fields with empty or
5332 // default values are omitted from API requests. See
5333 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5334 // details.
5335 ForceSendFields []string `json:"-"`
5336 // NullFields is a list of field names (e.g. "ContainerResources") to include
5337 // in API requests with the JSON null value. By default, fields with empty
5338 // values are omitted from API requests. See
5339 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5340 NullFields []string `json:"-"`
5341 }
5342
5343 func (s PolicyControllerPolicyControllerDeploymentConfig) MarshalJSON() ([]byte, error) {
5344 type NoMethod PolicyControllerPolicyControllerDeploymentConfig
5345 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5346 }
5347
5348 // PolicyControllerResourceList: ResourceList contains container resource
5349 // requirements.
5350 type PolicyControllerResourceList struct {
5351 // Cpu: CPU requirement expressed in Kubernetes resource units.
5352 Cpu string `json:"cpu,omitempty"`
5353 // Memory: Memory requirement expressed in Kubernetes resource units.
5354 Memory string `json:"memory,omitempty"`
5355 // ForceSendFields is a list of field names (e.g. "Cpu") to unconditionally
5356 // include in API requests. By default, fields with empty or default values are
5357 // omitted from API requests. See
5358 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5359 // details.
5360 ForceSendFields []string `json:"-"`
5361 // NullFields is a list of field names (e.g. "Cpu") to include in API requests
5362 // with the JSON null value. By default, fields with empty values are omitted
5363 // from API requests. See
5364 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5365 NullFields []string `json:"-"`
5366 }
5367
5368 func (s PolicyControllerResourceList) MarshalJSON() ([]byte, error) {
5369 type NoMethod PolicyControllerResourceList
5370 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5371 }
5372
5373 // PolicyControllerResourceRequirements: ResourceRequirements describes the
5374 // compute resource requirements.
5375 type PolicyControllerResourceRequirements struct {
5376 // Limits: Limits describes the maximum amount of compute resources allowed for
5377 // use by the running container.
5378 Limits *PolicyControllerResourceList `json:"limits,omitempty"`
5379 // Requests: Requests describes the amount of compute resources reserved for
5380 // the container by the kube-scheduler.
5381 Requests *PolicyControllerResourceList `json:"requests,omitempty"`
5382 // ForceSendFields is a list of field names (e.g. "Limits") to unconditionally
5383 // include in API requests. By default, fields with empty or default values are
5384 // omitted from API requests. See
5385 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5386 // details.
5387 ForceSendFields []string `json:"-"`
5388 // NullFields is a list of field names (e.g. "Limits") to include in API
5389 // requests with the JSON null value. By default, fields with empty values are
5390 // omitted from API requests. See
5391 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5392 NullFields []string `json:"-"`
5393 }
5394
5395 func (s PolicyControllerResourceRequirements) MarshalJSON() ([]byte, error) {
5396 type NoMethod PolicyControllerResourceRequirements
5397 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5398 }
5399
5400 // PolicyControllerTemplateLibraryConfig: The config specifying which default
5401 // library templates to install.
5402 type PolicyControllerTemplateLibraryConfig struct {
5403 // Installation: Configures the manner in which the template library is
5404 // installed on the cluster.
5405 //
5406 // Possible values:
5407 // "INSTALLATION_UNSPECIFIED" - No installation strategy has been specified.
5408 // "NOT_INSTALLED" - Do not install the template library.
5409 // "ALL" - Install the entire template library.
5410 Installation string `json:"installation,omitempty"`
5411 // ForceSendFields is a list of field names (e.g. "Installation") to
5412 // unconditionally include in API requests. By default, fields with empty or
5413 // default values are omitted from API requests. See
5414 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5415 // details.
5416 ForceSendFields []string `json:"-"`
5417 // NullFields is a list of field names (e.g. "Installation") to include in API
5418 // requests with the JSON null value. By default, fields with empty values are
5419 // omitted from API requests. See
5420 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5421 NullFields []string `json:"-"`
5422 }
5423
5424 func (s PolicyControllerTemplateLibraryConfig) MarshalJSON() ([]byte, error) {
5425 type NoMethod PolicyControllerTemplateLibraryConfig
5426 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5427 }
5428
5429 // PolicyControllerToleration: Toleration of a node taint.
5430 type PolicyControllerToleration struct {
5431 // Effect: Matches a taint effect.
5432 Effect string `json:"effect,omitempty"`
5433 // Key: Matches a taint key (not necessarily unique).
5434 Key string `json:"key,omitempty"`
5435 // Operator: Matches a taint operator.
5436 Operator string `json:"operator,omitempty"`
5437 // Value: Matches a taint value.
5438 Value string `json:"value,omitempty"`
5439 // ForceSendFields is a list of field names (e.g. "Effect") to unconditionally
5440 // include in API requests. By default, fields with empty or default values are
5441 // omitted from API requests. See
5442 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5443 // details.
5444 ForceSendFields []string `json:"-"`
5445 // NullFields is a list of field names (e.g. "Effect") to include in API
5446 // requests with the JSON null value. By default, fields with empty values are
5447 // omitted from API requests. See
5448 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5449 NullFields []string `json:"-"`
5450 }
5451
5452 func (s PolicyControllerToleration) MarshalJSON() ([]byte, error) {
5453 type NoMethod PolicyControllerToleration
5454 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5455 }
5456
5457 // RBACRoleBinding: RBACRoleBinding represents a rbacrolebinding across the
5458 // Fleet
5459 type RBACRoleBinding struct {
5460 // CreateTime: Output only. When the rbacrolebinding was created.
5461 CreateTime string `json:"createTime,omitempty"`
5462 // DeleteTime: Output only. When the rbacrolebinding was deleted.
5463 DeleteTime string `json:"deleteTime,omitempty"`
5464 // Group: group is the group, as seen by the kubernetes cluster.
5465 Group string `json:"group,omitempty"`
5466 // Labels: Optional. Labels for this RBACRolebinding.
5467 Labels map[string]string `json:"labels,omitempty"`
5468 // Name: The resource name for the rbacrolebinding
5469 // `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rba
5470 // crolebinding}` or
5471 // `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebin
5472 // dings/{rbacrolebinding}`
5473 Name string `json:"name,omitempty"`
5474 // Role: Required. Role to bind to the principal
5475 Role *Role `json:"role,omitempty"`
5476 // State: Output only. State of the rbacrolebinding resource.
5477 State *RBACRoleBindingLifecycleState `json:"state,omitempty"`
5478 // Uid: Output only. Google-generated UUID for this resource. This is unique
5479 // across all rbacrolebinding resources. If a rbacrolebinding resource is
5480 // deleted and another resource with the same name is created, it gets a
5481 // different uid.
5482 Uid string `json:"uid,omitempty"`
5483 // UpdateTime: Output only. When the rbacrolebinding was last updated.
5484 UpdateTime string `json:"updateTime,omitempty"`
5485 // User: user is the name of the user as seen by the kubernetes cluster,
5486 // example "alice" or "[email protected]"
5487 User string `json:"user,omitempty"`
5488
5489 // ServerResponse contains the HTTP response code and headers from the server.
5490 googleapi.ServerResponse `json:"-"`
5491 // ForceSendFields is a list of field names (e.g. "CreateTime") to
5492 // unconditionally include in API requests. By default, fields with empty or
5493 // default values are omitted from API requests. See
5494 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5495 // details.
5496 ForceSendFields []string `json:"-"`
5497 // NullFields is a list of field names (e.g. "CreateTime") to include in API
5498 // requests with the JSON null value. By default, fields with empty values are
5499 // omitted from API requests. See
5500 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5501 NullFields []string `json:"-"`
5502 }
5503
5504 func (s RBACRoleBinding) MarshalJSON() ([]byte, error) {
5505 type NoMethod RBACRoleBinding
5506 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5507 }
5508
5509 // RBACRoleBindingActuationFeatureSpec: **RBAC RoleBinding Actuation**: The
5510 // Hub-wide input for the RBACRoleBindingActuation feature.
5511 type RBACRoleBindingActuationFeatureSpec struct {
5512 // AllowedCustomRoles: The list of allowed custom roles (ClusterRoles). If a
5513 // ClusterRole is not part of this list, it cannot be used in a Scope
5514 // RBACRoleBinding. If a ClusterRole in this list is in use, it cannot be
5515 // removed from the list.
5516 AllowedCustomRoles []string `json:"allowedCustomRoles,omitempty"`
5517 // ForceSendFields is a list of field names (e.g. "AllowedCustomRoles") 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. "AllowedCustomRoles") to include
5524 // in API requests with the JSON null value. By default, fields with empty
5525 // values are 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 RBACRoleBindingActuationFeatureSpec) MarshalJSON() ([]byte, error) {
5531 type NoMethod RBACRoleBindingActuationFeatureSpec
5532 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5533 }
5534
5535 // RBACRoleBindingActuationFeatureState: **RBAC RoleBinding Actuation**: An
5536 // empty state left as an example Hub-wide Feature state.
5537 type RBACRoleBindingActuationFeatureState struct {
5538 }
5539
5540 // RBACRoleBindingLifecycleState: RBACRoleBindingLifecycleState describes the
5541 // state of a RbacRoleBinding resource.
5542 type RBACRoleBindingLifecycleState struct {
5543 // Code: Output only. The current state of the rbacrolebinding resource.
5544 //
5545 // Possible values:
5546 // "CODE_UNSPECIFIED" - The code is not set.
5547 // "CREATING" - The rbacrolebinding is being created.
5548 // "READY" - The rbacrolebinding active.
5549 // "DELETING" - The rbacrolebinding is being deleted.
5550 // "UPDATING" - The rbacrolebinding is being updated.
5551 Code string `json:"code,omitempty"`
5552 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
5553 // include in API requests. By default, fields with empty or default values are
5554 // omitted from API requests. See
5555 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5556 // details.
5557 ForceSendFields []string `json:"-"`
5558 // NullFields is a list of field names (e.g. "Code") to include in API requests
5559 // with the JSON null value. By default, fields with empty values are omitted
5560 // from API requests. See
5561 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5562 NullFields []string `json:"-"`
5563 }
5564
5565 func (s RBACRoleBindingLifecycleState) MarshalJSON() ([]byte, error) {
5566 type NoMethod RBACRoleBindingLifecycleState
5567 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5568 }
5569
5570 // ResourceManifest: ResourceManifest represents a single Kubernetes resource
5571 // to be applied to the cluster.
5572 type ResourceManifest struct {
5573 // ClusterScoped: Output only. Whether the resource provided in the manifest is
5574 // `cluster_scoped`. If unset, the manifest is assumed to be namespace scoped.
5575 // This field is used for REST mapping when applying the resource in a cluster.
5576 ClusterScoped bool `json:"clusterScoped,omitempty"`
5577 // Manifest: Output only. YAML manifest of the resource.
5578 Manifest string `json:"manifest,omitempty"`
5579 // ForceSendFields is a list of field names (e.g. "ClusterScoped") to
5580 // unconditionally include in API requests. By default, fields with empty or
5581 // default values are omitted from API requests. See
5582 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5583 // details.
5584 ForceSendFields []string `json:"-"`
5585 // NullFields is a list of field names (e.g. "ClusterScoped") to include in API
5586 // requests with the JSON null value. By default, fields with empty values are
5587 // omitted from API requests. See
5588 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5589 NullFields []string `json:"-"`
5590 }
5591
5592 func (s ResourceManifest) MarshalJSON() ([]byte, error) {
5593 type NoMethod ResourceManifest
5594 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5595 }
5596
5597 // ResourceOptions: ResourceOptions represent options for Kubernetes resource
5598 // generation.
5599 type ResourceOptions struct {
5600 // ConnectVersion: Optional. The Connect agent version to use for
5601 // connect_resources. Defaults to the latest GKE Connect version. The version
5602 // must be a currently supported version, obsolete versions will be rejected.
5603 ConnectVersion string `json:"connectVersion,omitempty"`
5604 // K8sGitVersion: Optional. Git version of the Kubernetes cluster. This is only
5605 // used to gate the Connect Agent migration to svc.id.goog on GDC-SO 1.33.100
5606 // patch and above.
5607 K8sGitVersion string `json:"k8sGitVersion,omitempty"`
5608 // K8sVersion: Optional. Major and minor version of the Kubernetes cluster.
5609 // This is only used to determine which version to use for the
5610 // CustomResourceDefinition resources, `apiextensions/v1beta1`
5611 // or`apiextensions/v1`.
5612 K8sVersion string `json:"k8sVersion,omitempty"`
5613 // V1beta1Crd: Optional. Use `apiextensions/v1beta1` instead of
5614 // `apiextensions/v1` for CustomResourceDefinition resources. This option
5615 // should be set for clusters with Kubernetes apiserver versions <1.16.
5616 V1beta1Crd bool `json:"v1beta1Crd,omitempty"`
5617 // ForceSendFields is a list of field names (e.g. "ConnectVersion") to
5618 // unconditionally include in API requests. By default, fields with empty or
5619 // default values are omitted from API requests. See
5620 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5621 // details.
5622 ForceSendFields []string `json:"-"`
5623 // NullFields is a list of field names (e.g. "ConnectVersion") to include in
5624 // API requests with the JSON null value. By default, fields with empty values
5625 // are omitted from API requests. See
5626 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5627 NullFields []string `json:"-"`
5628 }
5629
5630 func (s ResourceOptions) MarshalJSON() ([]byte, error) {
5631 type NoMethod ResourceOptions
5632 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5633 }
5634
5635 // Role: Role is the type for Kubernetes roles
5636 type Role struct {
5637 // CustomRole: Optional. custom_role is the name of a custom
5638 // KubernetesClusterRole to use.
5639 CustomRole string `json:"customRole,omitempty"`
5640 // PredefinedRole: predefined_role is the Kubernetes default role to use
5641 //
5642 // Possible values:
5643 // "UNKNOWN" - UNKNOWN
5644 // "ADMIN" - ADMIN has EDIT and RBAC permissions
5645 // "EDIT" - EDIT can edit all resources except RBAC
5646 // "VIEW" - VIEW can only read resources
5647 // "ANTHOS_SUPPORT" - ANTHOS_SUPPORT gives Google Support read-only access to
5648 // a number of cluster resources.
5649 PredefinedRole string `json:"predefinedRole,omitempty"`
5650 // ForceSendFields is a list of field names (e.g. "CustomRole") to
5651 // unconditionally include in API requests. By default, fields with empty or
5652 // default values are omitted from API requests. See
5653 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5654 // details.
5655 ForceSendFields []string `json:"-"`
5656 // NullFields is a list of field names (e.g. "CustomRole") to include in API
5657 // requests with the JSON null value. By default, fields with empty values are
5658 // omitted from API requests. See
5659 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5660 NullFields []string `json:"-"`
5661 }
5662
5663 func (s Role) MarshalJSON() ([]byte, error) {
5664 type NoMethod Role
5665 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5666 }
5667
5668 // Rollout: Rollout contains the Rollout metadata and configuration. Next ID:
5669 // 28
5670 type Rollout struct {
5671 // CompleteTime: Output only. The timestamp at which the Rollout was completed.
5672 CompleteTime string `json:"completeTime,omitempty"`
5673 // CreateTime: Output only. The timestamp at which the Rollout was created.
5674 CreateTime string `json:"createTime,omitempty"`
5675 // DeleteTime: Output only. The timestamp at the Rollout was deleted.
5676 DeleteTime string `json:"deleteTime,omitempty"`
5677 // DisplayName: Optional. Human readable display name of the Rollout.
5678 DisplayName string `json:"displayName,omitempty"`
5679 // Etag: Output only. etag of the Rollout Ex. abc1234
5680 Etag string `json:"etag,omitempty"`
5681 // Labels: Optional. Labels for this Rollout.
5682 Labels map[string]string `json:"labels,omitempty"`
5683 // MembershipStates: Output only. States of upgrading control plane or node
5684 // pool targets of a single cluster (GKE Hub membership) that's part of this
5685 // Rollout. The key is the membership name of the cluster. The value is the
5686 // state of the cluster.
5687 MembershipStates map[string]RolloutMembershipState `json:"membershipStates,omitempty"`
5688 // Name: Identifier. The full, unique resource name of this Rollout in the
5689 // format of `projects/{project}/locations/global/rollouts/{rollout}`.
5690 Name string `json:"name,omitempty"`
5691 // RolloutSequence: Optional. Immutable. The full, unique resource name of the
5692 // rollout sequence that initiatied this Rollout. In the format of
5693 // `projects/{project}/locations/global/rolloutSequences/{rollout_sequence}`.
5694 RolloutSequence string `json:"rolloutSequence,omitempty"`
5695 // Stages: Output only. The stages of the Rollout.
5696 Stages []*RolloutStage `json:"stages,omitempty"`
5697 // State: Output only. State specifies various states of the Rollout.
5698 //
5699 // Possible values:
5700 // "STATE_UNSPECIFIED" - Unspecified state.
5701 // "RUNNING" - The Rollout is running.
5702 // "PAUSED" - The Rollout is paused.
5703 // "CANCELLED" - The Rollout is in a failure terminal state.
5704 // "COMPLETED" - The Rollout is in a terminal state.
5705 State string `json:"state,omitempty"`
5706 // StateReason: Output only. A human-readable description explaining the reason
5707 // for the current state.
5708 StateReason string `json:"stateReason,omitempty"`
5709 // StateReasonType: Output only. StateReasonType specifies the reason type of
5710 // the Rollout state.
5711 //
5712 // Possible values:
5713 // "STATE_REASON_TYPE_UNSPECIFIED" - Unspecified state reason.
5714 // "PAUSED_BY_USER" - Paused by the user.
5715 // "PAUSED_BY_SYSTEM_CONFIG" - Paused by the RSv2 Orchestrator due to system
5716 // config(ex. GKE freeze).
5717 // "PAUSED_WAITING_FOR_NEXT_STAGE" - Paused waiting for the next stage to
5718 // start.
5719 StateReasonType string `json:"stateReasonType,omitempty"`
5720 // Uid: Output only. Google-generated UUID for this resource. This is unique
5721 // across all Rollout resources. If a Rollout resource is deleted and another
5722 // resource with the same name is created, it gets a different uid.
5723 Uid string `json:"uid,omitempty"`
5724 // UpdateTime: Output only. The timestamp at which the Rollout was last
5725 // updated.
5726 UpdateTime string `json:"updateTime,omitempty"`
5727 // VersionUpgrade: Optional. Config for version upgrade of clusters.
5728 VersionUpgrade *VersionUpgrade `json:"versionUpgrade,omitempty"`
5729
5730 // ServerResponse contains the HTTP response code and headers from the server.
5731 googleapi.ServerResponse `json:"-"`
5732 // ForceSendFields is a list of field names (e.g. "CompleteTime") to
5733 // unconditionally include in API requests. By default, fields with empty or
5734 // default values are omitted from API requests. See
5735 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5736 // details.
5737 ForceSendFields []string `json:"-"`
5738 // NullFields is a list of field names (e.g. "CompleteTime") to include in API
5739 // requests with the JSON null value. By default, fields with empty values are
5740 // omitted from API requests. See
5741 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5742 NullFields []string `json:"-"`
5743 }
5744
5745 func (s Rollout) MarshalJSON() ([]byte, error) {
5746 type NoMethod Rollout
5747 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5748 }
5749
5750 // RolloutMembershipState: Metadata about single cluster (GKE Hub membership)
5751 // that's part of this Rollout.
5752 type RolloutMembershipState struct {
5753 // LastUpdateTime: Optional. Output only. The time this status and any related
5754 // Rollout-specific details for the membership were updated.
5755 LastUpdateTime string `json:"lastUpdateTime,omitempty"`
5756 // StageAssignment: Output only. The stage assignment of this cluster in this
5757 // rollout.
5758 StageAssignment int64 `json:"stageAssignment,omitempty"`
5759 // Targets: Output only. The targets of the rollout - clusters or node pools
5760 // that are being upgraded. All targets belongs to the same cluster, identified
5761 // by the membership name (key of membership_states map).
5762 Targets []*RolloutTarget `json:"targets,omitempty"`
5763 // ForceSendFields is a list of field names (e.g. "LastUpdateTime") to
5764 // unconditionally include in API requests. By default, fields with empty or
5765 // default values are omitted from API requests. See
5766 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5767 // details.
5768 ForceSendFields []string `json:"-"`
5769 // NullFields is a list of field names (e.g. "LastUpdateTime") to include in
5770 // API requests with the JSON null value. By default, fields with empty values
5771 // are omitted from API requests. See
5772 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5773 NullFields []string `json:"-"`
5774 }
5775
5776 func (s RolloutMembershipState) MarshalJSON() ([]byte, error) {
5777 type NoMethod RolloutMembershipState
5778 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5779 }
5780
5781 // RolloutSequence: RolloutSequence defines the desired order of upgrades.
5782 type RolloutSequence struct {
5783 // CreateTime: Output only. The timestamp at which the Rollout Sequence was
5784 // created.
5785 CreateTime string `json:"createTime,omitempty"`
5786 // DeleteTime: Output only. The timestamp at the Rollout Sequence was deleted.
5787 DeleteTime string `json:"deleteTime,omitempty"`
5788 // DisplayName: Optional. Human readable display name of the Rollout Sequence.
5789 DisplayName string `json:"displayName,omitempty"`
5790 // Etag: Output only. etag of the Rollout Sequence Ex. abc1234
5791 Etag string `json:"etag,omitempty"`
5792 // IgnoredClustersSelector: Optional. Selector for clusters to exclude from the
5793 // Rollout Sequence.
5794 IgnoredClustersSelector *ClusterSelector `json:"ignoredClustersSelector,omitempty"`
5795 // Labels: Optional. Labels for this Rollout Sequence.
5796 Labels map[string]string `json:"labels,omitempty"`
5797 // Name: Identifier. Name of the rollout sequence in the format of:
5798 // projects/{PROJECT_ID}/locations/global/rolloutSequences/{NAME}
5799 Name string `json:"name,omitempty"`
5800 // Stages: Required. Ordered list of stages that constitutes this Rollout.
5801 Stages []*Stage `json:"stages,omitempty"`
5802 // State: Output only. State of the Rollout Sequence as a whole.
5803 State *RolloutSequenceState `json:"state,omitempty"`
5804 // Uid: Output only. Google-generated UUID for this resource. This is unique
5805 // across all Rollout Sequence resources. If a Rollout Sequence resource is
5806 // deleted and another resource with the same name is created, it gets a
5807 // different uid.
5808 Uid string `json:"uid,omitempty"`
5809 // UpdateTime: Output only. The timestamp at which the Rollout Sequence was
5810 // last updated.
5811 UpdateTime string `json:"updateTime,omitempty"`
5812
5813 // ServerResponse contains the HTTP response code and headers from the server.
5814 googleapi.ServerResponse `json:"-"`
5815 // ForceSendFields is a list of field names (e.g. "CreateTime") to
5816 // unconditionally include in API requests. By default, fields with empty or
5817 // default values are omitted from API requests. See
5818 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5819 // details.
5820 ForceSendFields []string `json:"-"`
5821 // NullFields is a list of field names (e.g. "CreateTime") to include in API
5822 // requests with the JSON null value. By default, fields with empty values are
5823 // omitted from API requests. See
5824 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5825 NullFields []string `json:"-"`
5826 }
5827
5828 func (s RolloutSequence) MarshalJSON() ([]byte, error) {
5829 type NoMethod RolloutSequence
5830 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5831 }
5832
5833 // RolloutSequenceState: State and reasons of the Rollout Sequence.
5834 type RolloutSequenceState struct {
5835 // LastStateChangeTime: Output only. The timestamp at which the LifecycleState
5836 // was last changed. Used to track how long it has been in the current state.
5837 LastStateChangeTime string `json:"lastStateChangeTime,omitempty"`
5838 // LifecycleState: Output only. Lifecycle state of the Rollout Sequence.
5839 //
5840 // Possible values:
5841 // "LIFECYCLE_STATE_UNSPECIFIED" - The default value. This value is used if
5842 // the state is omitted.
5843 // "LIFECYCLE_STATE_ACTIVE" - The Rollout Sequence is active.
5844 // "LIFECYCLE_STATE_WARNING" - The Rollout Sequence has warnings.
5845 // "LIFECYCLE_STATE_ERROR" - The Rollout Sequence has errors.
5846 LifecycleState string `json:"lifecycleState,omitempty"`
5847 // StateReasons: Output only. StateReason represents the reason for the Rollout
5848 // Sequence state.
5849 //
5850 // Possible values:
5851 // "STATE_REASON_UNSPECIFIED" - Default unspecified value.
5852 // "FLEET_FEATURE_DELETED_ERROR" - A fleet feature is deleted.
5853 // "FLEET_DELETED_ERROR" - A fleet is deleted.
5854 // "EMPTY_STAGE_WARNING" - A stage is empty.
5855 // "MIXED_RELEASE_CHANNELS_WARNING" - Mixed release channels in the sequence.
5856 // "INTERNAL_ERROR" - Internal error, for example when host project is
5857 // soft-deleted.
5858 StateReasons []string `json:"stateReasons,omitempty"`
5859 // ForceSendFields is a list of field names (e.g. "LastStateChangeTime") to
5860 // unconditionally include in API requests. By default, fields with empty or
5861 // default values are omitted from API requests. See
5862 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5863 // details.
5864 ForceSendFields []string `json:"-"`
5865 // NullFields is a list of field names (e.g. "LastStateChangeTime") to include
5866 // in API requests with the JSON null value. By default, fields with empty
5867 // values are omitted from API requests. See
5868 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5869 NullFields []string `json:"-"`
5870 }
5871
5872 func (s RolloutSequenceState) MarshalJSON() ([]byte, error) {
5873 type NoMethod RolloutSequenceState
5874 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5875 }
5876
5877 // RolloutStage: Stage represents a single stage in the Rollout.
5878 type RolloutStage struct {
5879 // EndTime: Optional. Output only. The time at which the stage ended.
5880 EndTime string `json:"endTime,omitempty"`
5881 // SoakDuration: Optional. Duration to soak after this stage before starting
5882 // the next stage.
5883 SoakDuration string `json:"soakDuration,omitempty"`
5884 // StageNumber: Output only. The stage number to which this status applies.
5885 StageNumber int64 `json:"stageNumber,omitempty"`
5886 // StartTime: Optional. Output only. The time at which the stage started.
5887 StartTime string `json:"startTime,omitempty"`
5888 // State: Output only. The state of the stage.
5889 //
5890 // Possible values:
5891 // "STATE_UNSPECIFIED" - Default value.
5892 // "PENDING" - The stage is pending.
5893 // "RUNNING" - The stage is running.
5894 // "SOAKING" - The stage is soaking.
5895 // "COMPLETED" - The stage is completed.
5896 // "FORCED_SOAKING" - The stage is force soaking.
5897 // "PAUSED" - The stage is paused.
5898 State string `json:"state,omitempty"`
5899 // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
5900 // include in API requests. By default, fields with empty or default values are
5901 // omitted from API requests. See
5902 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5903 // details.
5904 ForceSendFields []string `json:"-"`
5905 // NullFields is a list of field names (e.g. "EndTime") to include in API
5906 // requests with the JSON null value. By default, fields with empty values are
5907 // omitted from API requests. See
5908 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5909 NullFields []string `json:"-"`
5910 }
5911
5912 func (s RolloutStage) MarshalJSON() ([]byte, error) {
5913 type NoMethod RolloutStage
5914 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5915 }
5916
5917 // RolloutTarget: Metadata about the status of targets (clusters or node pools)
5918 // involved in the Rollout.
5919 type RolloutTarget struct {
5920 // Cluster: Optional. Output only. The resource link of the Cluster resource
5921 // upgraded in this Rollout. It is formatted as:
5922 // `//{api_service}/projects/{project_number}/locations/{location}/clusters/{clu
5923 // ster_name}`. .
5924 Cluster string `json:"cluster,omitempty"`
5925 // NodePool: Optional. Output only. The resource link of the NodePool resource
5926 // upgraded in this Rollout. It is formatted as:
5927 // `//{api_service}/projects/{project_number}/locations/{location}/clusters/{clu
5928 // ster_name}/nodePools/{node_pool_name}`.
5929 NodePool string `json:"nodePool,omitempty"`
5930 // Operation: Optional. Output only. The operation resource name performing the
5931 // mutation.
5932 Operation string `json:"operation,omitempty"`
5933 // Reason: Optional. Output only. A human-readable description of the current
5934 // status.
5935 Reason string `json:"reason,omitempty"`
5936 // State: Output only. The high-level, machine-readable status of this Rollout
5937 // for the target.
5938 //
5939 // Possible values:
5940 // "STATE_UNSPECIFIED" - Unspecified state.
5941 // "PENDING" - The Rollout is pending for the target.
5942 // "RUNNING" - The Rollout is running for the target.
5943 // "FAILED" - The Rollout failed for the target.
5944 // "SUCCEEDED" - The Rollout succeeded for the target.
5945 // "PAUSED" - The Rollout is paused for the target.
5946 // "REMOVED" - The target was removed from the Rollout.
5947 // "INELIGIBLE" - The target is ineligible for the Rollout.
5948 State string `json:"state,omitempty"`
5949 // ForceSendFields is a list of field names (e.g. "Cluster") to unconditionally
5950 // include in API requests. By default, fields with empty or default values are
5951 // omitted from API requests. See
5952 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5953 // details.
5954 ForceSendFields []string `json:"-"`
5955 // NullFields is a list of field names (e.g. "Cluster") to include in API
5956 // requests with the JSON null value. By default, fields with empty values are
5957 // omitted from API requests. See
5958 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5959 NullFields []string `json:"-"`
5960 }
5961
5962 func (s RolloutTarget) MarshalJSON() ([]byte, error) {
5963 type NoMethod RolloutTarget
5964 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5965 }
5966
5967 // Scope: Scope represents a Scope in a Fleet.
5968 type Scope struct {
5969 // CreateTime: Output only. When the scope was created.
5970 CreateTime string `json:"createTime,omitempty"`
5971 // DeleteTime: Output only. When the scope was deleted.
5972 DeleteTime string `json:"deleteTime,omitempty"`
5973 // Labels: Optional. Labels for this Scope.
5974 Labels map[string]string `json:"labels,omitempty"`
5975 // Name: The resource name for the scope
5976 // `projects/{project}/locations/{location}/scopes/{scope}`
5977 Name string `json:"name,omitempty"`
5978 // NamespaceLabels: Optional. Scope-level cluster namespace labels. For the
5979 // member clusters bound to the Scope, these labels are applied to each
5980 // namespace under the Scope. Scope-level labels take precedence over
5981 // Namespace-level labels (`namespace_labels` in the Fleet Namespace resource)
5982 // if they share a key. Keys and values must be Kubernetes-conformant.
5983 NamespaceLabels map[string]string `json:"namespaceLabels,omitempty"`
5984 // State: Output only. State of the scope resource.
5985 State *ScopeLifecycleState `json:"state,omitempty"`
5986 // Uid: Output only. Google-generated UUID for this resource. This is unique
5987 // across all scope resources. If a scope resource is deleted and another
5988 // resource with the same name is created, it gets a different uid.
5989 Uid string `json:"uid,omitempty"`
5990 // UpdateTime: Output only. When the scope was last updated.
5991 UpdateTime string `json:"updateTime,omitempty"`
5992
5993 // ServerResponse contains the HTTP response code and headers from the server.
5994 googleapi.ServerResponse `json:"-"`
5995 // ForceSendFields is a list of field names (e.g. "CreateTime") to
5996 // unconditionally include in API requests. By default, fields with empty or
5997 // default values are omitted from API requests. See
5998 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5999 // details.
6000 ForceSendFields []string `json:"-"`
6001 // NullFields is a list of field names (e.g. "CreateTime") to include in API
6002 // requests with the JSON null value. By default, fields with empty values are
6003 // omitted from API requests. See
6004 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6005 NullFields []string `json:"-"`
6006 }
6007
6008 func (s Scope) MarshalJSON() ([]byte, error) {
6009 type NoMethod Scope
6010 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6011 }
6012
6013 // ScopeFeatureSpec: ScopeFeatureSpec contains feature specs for a fleet scope.
6014 type ScopeFeatureSpec struct {
6015 }
6016
6017 // ScopeFeatureState: ScopeFeatureState contains Scope-wide Feature status
6018 // information.
6019 type ScopeFeatureState struct {
6020 // State: Output only. The "running state" of the Feature in this Scope.
6021 State *FeatureState `json:"state,omitempty"`
6022 // ForceSendFields is a list of field names (e.g. "State") to unconditionally
6023 // include in API requests. By default, fields with empty or default values are
6024 // omitted from API requests. See
6025 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6026 // details.
6027 ForceSendFields []string `json:"-"`
6028 // NullFields is a list of field names (e.g. "State") to include in API
6029 // requests with the JSON null value. By default, fields with empty values are
6030 // omitted from API requests. See
6031 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6032 NullFields []string `json:"-"`
6033 }
6034
6035 func (s ScopeFeatureState) MarshalJSON() ([]byte, error) {
6036 type NoMethod ScopeFeatureState
6037 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6038 }
6039
6040 // ScopeLifecycleState: ScopeLifecycleState describes the state of a Scope
6041 // resource.
6042 type ScopeLifecycleState struct {
6043 // Code: Output only. The current state of the scope resource.
6044 //
6045 // Possible values:
6046 // "CODE_UNSPECIFIED" - The code is not set.
6047 // "CREATING" - The scope is being created.
6048 // "READY" - The scope active.
6049 // "DELETING" - The scope is being deleted.
6050 // "UPDATING" - The scope is being updated.
6051 Code string `json:"code,omitempty"`
6052 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
6053 // include in API requests. By default, fields with empty or default values are
6054 // omitted from API requests. See
6055 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6056 // details.
6057 ForceSendFields []string `json:"-"`
6058 // NullFields is a list of field names (e.g. "Code") to include in API requests
6059 // with the JSON null value. By default, fields with empty values are omitted
6060 // from API requests. See
6061 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6062 NullFields []string `json:"-"`
6063 }
6064
6065 func (s ScopeLifecycleState) MarshalJSON() ([]byte, error) {
6066 type NoMethod ScopeLifecycleState
6067 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6068 }
6069
6070 // SecurityPostureConfig: SecurityPostureConfig defines the flags needed to
6071 // enable/disable features for the Security Posture API.
6072 type SecurityPostureConfig struct {
6073 // Mode: Sets which mode to use for Security Posture features.
6074 //
6075 // Possible values:
6076 // "MODE_UNSPECIFIED" - Default value not specified.
6077 // "DISABLED" - Disables Security Posture features on the cluster.
6078 // "BASIC" - Applies Security Posture features on the cluster.
6079 // "ENTERPRISE" - Deprecated: Security Posture Enterprise features are no
6080 // longer supported. For more details, see
6081 // https://cloud.google.com/kubernetes-engine/docs/deprecations/posture-management-deprecation.
6082 // Applies the Security Posture off cluster Enterprise level features.
6083 Mode string `json:"mode,omitempty"`
6084 // VulnerabilityMode: Sets which mode to use for vulnerability scanning.
6085 //
6086 // Possible values:
6087 // "VULNERABILITY_MODE_UNSPECIFIED" - Default value not specified.
6088 // "VULNERABILITY_DISABLED" - Disables vulnerability scanning on the cluster.
6089 // "VULNERABILITY_BASIC" - Deprecated: Basic vulnerability scanning is no
6090 // longer supported. For more details, see
6091 // https://cloud.google.com/kubernetes-engine/docs/deprecations/posture-management-deprecation.
6092 // Applies basic vulnerability scanning on the cluster.
6093 // "VULNERABILITY_ENTERPRISE" - Applies the Security Posture's vulnerability
6094 // on cluster Enterprise level features.
6095 VulnerabilityMode string `json:"vulnerabilityMode,omitempty"`
6096 // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally
6097 // include in API requests. By default, fields with empty or default values are
6098 // omitted from API requests. See
6099 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6100 // details.
6101 ForceSendFields []string `json:"-"`
6102 // NullFields is a list of field names (e.g. "Mode") to include in API requests
6103 // with the JSON null value. By default, fields with empty values are omitted
6104 // from API requests. See
6105 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6106 NullFields []string `json:"-"`
6107 }
6108
6109 func (s SecurityPostureConfig) MarshalJSON() ([]byte, error) {
6110 type NoMethod SecurityPostureConfig
6111 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6112 }
6113
6114 // ServiceMeshCondition: Condition being reported.
6115 type ServiceMeshCondition struct {
6116 // Code: Unique identifier of the condition which describes the condition
6117 // recognizable to the user.
6118 //
6119 // Possible values:
6120 // "CODE_UNSPECIFIED" - Default Unspecified code
6121 // "MESH_IAM_PERMISSION_DENIED" - Mesh IAM permission denied error code
6122 // "MESH_IAM_CROSS_PROJECT_PERMISSION_DENIED" - Permission denied error code
6123 // for cross-project
6124 // "CNI_CONFIG_UNSUPPORTED" - CNI config unsupported error code
6125 // "GKE_SANDBOX_UNSUPPORTED" - GKE sandbox unsupported error code
6126 // "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED" - Nodepool workload
6127 // identity federation required error code
6128 // "CNI_INSTALLATION_FAILED" - CNI installation failed error code
6129 // "CNI_POD_UNSCHEDULABLE" - CNI pod unschedulable error code
6130 // "CLUSTER_HAS_ZERO_NODES" - Cluster has zero node code
6131 // "CANONICAL_SERVICE_ERROR" - Failure to reconcile CanonicalServices
6132 // "UNSUPPORTED_MULTIPLE_CONTROL_PLANES" - Multiple control planes
6133 // unsupported error code
6134 // "VPCSC_GA_SUPPORTED" - VPC-SC GA is supported for this control plane.
6135 // "DEPRECATED_SPEC_CONTROL_PLANE_MANAGEMENT" - User is using deprecated
6136 // ControlPlaneManagement and they have not yet set Management.
6137 // "DEPRECATED_SPEC_CONTROL_PLANE_MANAGEMENT_SAFE" - User is using deprecated
6138 // ControlPlaneManagement and they have already set Management.
6139 // "CONFIG_APPLY_INTERNAL_ERROR" - Configuration (Istio/k8s resources) failed
6140 // to apply due to internal error.
6141 // "CONFIG_VALIDATION_ERROR" - Configuration failed to be applied due to
6142 // being invalid.
6143 // "CONFIG_VALIDATION_WARNING" - Encountered configuration(s) with possible
6144 // unintended behavior or invalid configuration. These configs may not have
6145 // been applied.
6146 // "QUOTA_EXCEEDED_BACKEND_SERVICES" - BackendService quota exceeded error
6147 // code.
6148 // "QUOTA_EXCEEDED_HEALTH_CHECKS" - HealthCheck quota exceeded error code.
6149 // "QUOTA_EXCEEDED_HTTP_ROUTES" - HTTPRoute quota exceeded error code.
6150 // "QUOTA_EXCEEDED_TCP_ROUTES" - TCPRoute quota exceeded error code.
6151 // "QUOTA_EXCEEDED_TLS_ROUTES" - TLS routes quota exceeded error code.
6152 // "QUOTA_EXCEEDED_TRAFFIC_POLICIES" - TrafficPolicy quota exceeded error
6153 // code.
6154 // "QUOTA_EXCEEDED_ENDPOINT_POLICIES" - EndpointPolicy quota exceeded error
6155 // code.
6156 // "QUOTA_EXCEEDED_GATEWAYS" - Gateway quota exceeded error code.
6157 // "QUOTA_EXCEEDED_MESHES" - Mesh quota exceeded error code.
6158 // "QUOTA_EXCEEDED_SERVER_TLS_POLICIES" - ServerTLSPolicy quota exceeded
6159 // error code.
6160 // "QUOTA_EXCEEDED_CLIENT_TLS_POLICIES" - ClientTLSPolicy quota exceeded
6161 // error code.
6162 // "QUOTA_EXCEEDED_SERVICE_LB_POLICIES" - ServiceLBPolicy quota exceeded
6163 // error code.
6164 // "QUOTA_EXCEEDED_HTTP_FILTERS" - HTTPFilter quota exceeded error code.
6165 // "QUOTA_EXCEEDED_TCP_FILTERS" - TCPFilter quota exceeded error code.
6166 // "QUOTA_EXCEEDED_NETWORK_ENDPOINT_GROUPS" - NetworkEndpointGroup quota
6167 // exceeded error code.
6168 // "CONFIG_APPLY_BLOCKED" - Configuration failed to apply due to fleet being
6169 // blocked.
6170 // "LEGACY_MC_SECRETS" - Legacy istio secrets found for multicluster error
6171 // code
6172 // "WORKLOAD_IDENTITY_REQUIRED" - Workload identity required error code
6173 // "NON_STANDARD_BINARY_USAGE" - Non-standard binary usage error code
6174 // "UNSUPPORTED_GATEWAY_CLASS" - Unsupported gateway class error code
6175 // "MANAGED_CNI_NOT_ENABLED" - Managed CNI not enabled error code
6176 // "MODERNIZATION_SCHEDULED" - Modernization is scheduled for a cluster.
6177 // "MODERNIZATION_IN_PROGRESS" - Modernization is in progress for a cluster.
6178 // "MODERNIZATION_COMPLETED" - Modernization is completed for a cluster.
6179 // "MODERNIZATION_ABORTED" - Modernization is aborted for a cluster.
6180 // "MODERNIZATION_PREPARING" - Preparing cluster so that its workloads can be
6181 // migrated.
6182 // "MODERNIZATION_STALLED" - Modernization is stalled for a cluster.
6183 // "MODERNIZATION_PREPARED" - Cluster has been prepared for its workloads to
6184 // be migrated.
6185 // "MODERNIZATION_MIGRATING_WORKLOADS" - Migrating the cluster's workloads to
6186 // the new implementation.
6187 // "MODERNIZATION_ROLLING_BACK_CLUSTER" - Rollback is in progress for
6188 // modernization of a cluster.
6189 // "MODERNIZATION_WILL_BE_SCHEDULED" - Modernization will be scheduled for a
6190 // fleet.
6191 // "MODERNIZATION_MANUAL" - Fleet is opted out from automated modernization.
6192 // "MODERNIZATION_ELIGIBLE" - Fleet is eligible for modernization.
6193 // "MODERNIZATION_MODERNIZING" - Modernization of one or more clusters in a
6194 // fleet is in progress.
6195 // "MODERNIZATION_MODERNIZED_SOAKING" - Modernization of all the fleet's
6196 // clusters is complete. Soaking before finalizing the modernization.
6197 // "MODERNIZATION_FINALIZED" - Modernization is finalized for all clusters in
6198 // a fleet. Rollback is no longer allowed.
6199 // "MODERNIZATION_ROLLING_BACK_FLEET" - Rollback is in progress for
6200 // modernization of all clusters in a fleet.
6201 Code string `json:"code,omitempty"`
6202 // Details: A short summary about the issue.
6203 Details string `json:"details,omitempty"`
6204 // DocumentationLink: Links contains actionable information.
6205 DocumentationLink string `json:"documentationLink,omitempty"`
6206 // Severity: Severity level of the condition.
6207 //
6208 // Possible values:
6209 // "SEVERITY_UNSPECIFIED" - Unspecified severity
6210 // "ERROR" - Indicates an issue that prevents the mesh from operating
6211 // correctly
6212 // "WARNING" - Indicates a setting is likely wrong, but the mesh is still
6213 // able to operate
6214 // "INFO" - An informational message, not requiring any action
6215 Severity string `json:"severity,omitempty"`
6216 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
6217 // include in API requests. By default, fields with empty or default values are
6218 // omitted from API requests. See
6219 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6220 // details.
6221 ForceSendFields []string `json:"-"`
6222 // NullFields is a list of field names (e.g. "Code") to include in API requests
6223 // with the JSON null value. By default, fields with empty values are omitted
6224 // from API requests. See
6225 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6226 NullFields []string `json:"-"`
6227 }
6228
6229 func (s ServiceMeshCondition) MarshalJSON() ([]byte, error) {
6230 type NoMethod ServiceMeshCondition
6231 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6232 }
6233
6234 // ServiceMeshControlPlaneManagement: Status of control plane management.
6235 type ServiceMeshControlPlaneManagement struct {
6236 // Details: Explanation of state.
6237 Details []*ServiceMeshStatusDetails `json:"details,omitempty"`
6238 // Implementation: Output only. Implementation of managed control plane.
6239 //
6240 // Possible values:
6241 // "IMPLEMENTATION_UNSPECIFIED" - Unspecified
6242 // "ISTIOD" - A Google build of istiod is used for the managed control plane.
6243 // "TRAFFIC_DIRECTOR" - Traffic director is used for the managed control
6244 // plane.
6245 // "UPDATING" - The control plane implementation is being updated.
6246 Implementation string `json:"implementation,omitempty"`
6247 // State: LifecycleState of control plane management.
6248 //
6249 // Possible values:
6250 // "LIFECYCLE_STATE_UNSPECIFIED" - Unspecified
6251 // "DISABLED" - DISABLED means that the component is not enabled.
6252 // "FAILED_PRECONDITION" - FAILED_PRECONDITION means that provisioning cannot
6253 // proceed because of some characteristic of the member cluster.
6254 // "PROVISIONING" - PROVISIONING means that provisioning is in progress.
6255 // "ACTIVE" - ACTIVE means that the component is ready for use.
6256 // "STALLED" - STALLED means that provisioning could not be done.
6257 // "NEEDS_ATTENTION" - NEEDS_ATTENTION means that the component is ready, but
6258 // some user intervention is required. (For example that the user should
6259 // migrate workloads to a new control plane revision.)
6260 // "DEGRADED" - DEGRADED means that the component is ready, but operating in
6261 // a degraded state.
6262 // "DEPROVISIONING" - DEPROVISIONING means that deprovisioning is in
6263 // progress.
6264 State string `json:"state,omitempty"`
6265 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally
6266 // include in API requests. By default, fields with empty or default values are
6267 // omitted from API requests. See
6268 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6269 // details.
6270 ForceSendFields []string `json:"-"`
6271 // NullFields is a list of field names (e.g. "Details") to include in API
6272 // requests with the JSON null value. By default, fields with empty values are
6273 // omitted from API requests. See
6274 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6275 NullFields []string `json:"-"`
6276 }
6277
6278 func (s ServiceMeshControlPlaneManagement) MarshalJSON() ([]byte, error) {
6279 type NoMethod ServiceMeshControlPlaneManagement
6280 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6281 }
6282
6283 // ServiceMeshDataPlaneManagement: Status of data plane management. Only
6284 // reported per-member.
6285 type ServiceMeshDataPlaneManagement struct {
6286 // Details: Explanation of the status.
6287 Details []*ServiceMeshStatusDetails `json:"details,omitempty"`
6288 // State: Lifecycle status of data plane management.
6289 //
6290 // Possible values:
6291 // "LIFECYCLE_STATE_UNSPECIFIED" - Unspecified
6292 // "DISABLED" - DISABLED means that the component is not enabled.
6293 // "FAILED_PRECONDITION" - FAILED_PRECONDITION means that provisioning cannot
6294 // proceed because of some characteristic of the member cluster.
6295 // "PROVISIONING" - PROVISIONING means that provisioning is in progress.
6296 // "ACTIVE" - ACTIVE means that the component is ready for use.
6297 // "STALLED" - STALLED means that provisioning could not be done.
6298 // "NEEDS_ATTENTION" - NEEDS_ATTENTION means that the component is ready, but
6299 // some user intervention is required. (For example that the user should
6300 // migrate workloads to a new control plane revision.)
6301 // "DEGRADED" - DEGRADED means that the component is ready, but operating in
6302 // a degraded state.
6303 // "DEPROVISIONING" - DEPROVISIONING means that deprovisioning is in
6304 // progress.
6305 State string `json:"state,omitempty"`
6306 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally
6307 // include in API requests. By default, fields with empty or default values are
6308 // omitted from API requests. See
6309 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6310 // details.
6311 ForceSendFields []string `json:"-"`
6312 // NullFields is a list of field names (e.g. "Details") to include in API
6313 // requests with the JSON null value. By default, fields with empty values are
6314 // omitted from API requests. See
6315 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6316 NullFields []string `json:"-"`
6317 }
6318
6319 func (s ServiceMeshDataPlaneManagement) MarshalJSON() ([]byte, error) {
6320 type NoMethod ServiceMeshDataPlaneManagement
6321 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6322 }
6323
6324 // ServiceMeshMembershipSpec: **Service Mesh**: Spec for a single Membership
6325 // for the servicemesh feature
6326 type ServiceMeshMembershipSpec struct {
6327 // ConfigApi: Optional. Specifies the API that will be used for configuring the
6328 // mesh workloads.
6329 //
6330 // Possible values:
6331 // "CONFIG_API_UNSPECIFIED" - Unspecified
6332 // "CONFIG_API_ISTIO" - Use the Istio API for configuration.
6333 // "CONFIG_API_GATEWAY" - Use the K8s Gateway API for configuration.
6334 ConfigApi string `json:"configApi,omitempty"`
6335 // ControlPlane: Deprecated: use `management` instead Enables automatic control
6336 // plane management.
6337 //
6338 // Possible values:
6339 // "CONTROL_PLANE_MANAGEMENT_UNSPECIFIED" - Unspecified
6340 // "AUTOMATIC" - Google should provision a control plane revision and make it
6341 // available in the cluster. Google will enroll this revision in a release
6342 // channel and keep it up to date. The control plane revision may be a managed
6343 // service, or a managed install.
6344 // "MANUAL" - User will manually configure the control plane (e.g. via CLI,
6345 // or via the ControlPlaneRevision KRM API)
6346 ControlPlane string `json:"controlPlane,omitempty"`
6347 // Management: Optional. Enables automatic Service Mesh management.
6348 //
6349 // Possible values:
6350 // "MANAGEMENT_UNSPECIFIED" - Unspecified
6351 // "MANAGEMENT_AUTOMATIC" - Google should manage my Service Mesh for the
6352 // cluster.
6353 // "MANAGEMENT_MANUAL" - User will manually configure their service mesh
6354 // components.
6355 // "MANAGEMENT_NOT_INSTALLED" - Google should remove any managed Service Mesh
6356 // components from this cluster and deprovision any resources.
6357 Management string `json:"management,omitempty"`
6358 // ForceSendFields is a list of field names (e.g. "ConfigApi") to
6359 // unconditionally include in API requests. By default, fields with empty or
6360 // default values are omitted from API requests. See
6361 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6362 // details.
6363 ForceSendFields []string `json:"-"`
6364 // NullFields is a list of field names (e.g. "ConfigApi") to include in API
6365 // requests with the JSON null value. By default, fields with empty values are
6366 // omitted from API requests. See
6367 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6368 NullFields []string `json:"-"`
6369 }
6370
6371 func (s ServiceMeshMembershipSpec) MarshalJSON() ([]byte, error) {
6372 type NoMethod ServiceMeshMembershipSpec
6373 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6374 }
6375
6376 // ServiceMeshMembershipState: **Service Mesh**: State for a single Membership,
6377 // as analyzed by the Service Mesh Hub Controller.
6378 type ServiceMeshMembershipState struct {
6379 // Conditions: Output only. List of conditions reported for this membership.
6380 Conditions []*ServiceMeshCondition `json:"conditions,omitempty"`
6381 // ControlPlaneManagement: Output only. Status of control plane management
6382 ControlPlaneManagement *ServiceMeshControlPlaneManagement `json:"controlPlaneManagement,omitempty"`
6383 // DataPlaneManagement: Output only. Status of data plane management.
6384 DataPlaneManagement *ServiceMeshDataPlaneManagement `json:"dataPlaneManagement,omitempty"`
6385 // ForceSendFields is a list of field names (e.g. "Conditions") to
6386 // unconditionally include in API requests. By default, fields with empty or
6387 // default values are omitted from API requests. See
6388 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6389 // details.
6390 ForceSendFields []string `json:"-"`
6391 // NullFields is a list of field names (e.g. "Conditions") to include in API
6392 // requests with the JSON null value. By default, fields with empty values are
6393 // omitted from API requests. See
6394 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6395 NullFields []string `json:"-"`
6396 }
6397
6398 func (s ServiceMeshMembershipState) MarshalJSON() ([]byte, error) {
6399 type NoMethod ServiceMeshMembershipState
6400 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6401 }
6402
6403 // ServiceMeshStatusDetails: Structured and human-readable details for a
6404 // status.
6405 type ServiceMeshStatusDetails struct {
6406 // Code: A machine-readable code that further describes a broad status.
6407 Code string `json:"code,omitempty"`
6408 // Details: Human-readable explanation of code.
6409 Details string `json:"details,omitempty"`
6410 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
6411 // include in API requests. By default, fields with empty or default values are
6412 // omitted from API requests. See
6413 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6414 // details.
6415 ForceSendFields []string `json:"-"`
6416 // NullFields is a list of field names (e.g. "Code") to include in API requests
6417 // with the JSON null value. By default, fields with empty values are omitted
6418 // from API requests. See
6419 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6420 NullFields []string `json:"-"`
6421 }
6422
6423 func (s ServiceMeshStatusDetails) MarshalJSON() ([]byte, error) {
6424 type NoMethod ServiceMeshStatusDetails
6425 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6426 }
6427
6428 // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
6429 type SetIamPolicyRequest struct {
6430 // Policy: REQUIRED: The complete policy to be applied to the `resource`. The
6431 // size of the policy is limited to a few 10s of KB. An empty policy is a valid
6432 // policy but certain Google Cloud services (such as Projects) might reject
6433 // them.
6434 Policy *Policy `json:"policy,omitempty"`
6435 // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
6436 // modify. Only the fields in the mask will be modified. If no mask is
6437 // provided, the following default mask is used: `paths: "bindings, etag"
6438 UpdateMask string `json:"updateMask,omitempty"`
6439 // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
6440 // include in API requests. By default, fields with empty or default values are
6441 // omitted from API requests. See
6442 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6443 // details.
6444 ForceSendFields []string `json:"-"`
6445 // NullFields is a list of field names (e.g. "Policy") to include in API
6446 // requests with the JSON null value. By default, fields with empty values are
6447 // omitted from API requests. See
6448 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6449 NullFields []string `json:"-"`
6450 }
6451
6452 func (s SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
6453 type NoMethod SetIamPolicyRequest
6454 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6455 }
6456
6457 // Stage: Rollout stage.
6458 type Stage struct {
6459 // ClusterSelector: Optional. Filter members of fleets (above) to a subset of
6460 // clusters. If not specified, all clusters in the fleets are selected.
6461 ClusterSelector *ClusterSelector `json:"clusterSelector,omitempty"`
6462 // FleetProjects: Required. List of Fleet projects to select the clusters from.
6463 // Expected format: projects/{project}
6464 FleetProjects []string `json:"fleetProjects,omitempty"`
6465 // SoakDuration: Optional. Soak time after upgrading all the clusters in the
6466 // stage.
6467 SoakDuration string `json:"soakDuration,omitempty"`
6468 // ForceSendFields is a list of field names (e.g. "ClusterSelector") to
6469 // unconditionally include in API requests. By default, fields with empty or
6470 // default values are omitted from API requests. See
6471 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6472 // details.
6473 ForceSendFields []string `json:"-"`
6474 // NullFields is a list of field names (e.g. "ClusterSelector") to include in
6475 // API requests with the JSON null value. By default, fields with empty values
6476 // are omitted from API requests. See
6477 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6478 NullFields []string `json:"-"`
6479 }
6480
6481 func (s Stage) MarshalJSON() ([]byte, error) {
6482 type NoMethod Stage
6483 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6484 }
6485
6486 // Status: Status specifies state for the subcomponent.
6487 type Status struct {
6488 // Code: Code specifies AppDevExperienceFeature's subcomponent ready state.
6489 //
6490 // Possible values:
6491 // "CODE_UNSPECIFIED" - Not set.
6492 // "OK" - AppDevExperienceFeature's specified subcomponent is ready.
6493 // "FAILED" - AppDevExperienceFeature's specified subcomponent ready state is
6494 // false. This means AppDevExperienceFeature has encountered an issue that
6495 // blocks all, or a portion, of its normal operation. See the `description` for
6496 // more details.
6497 // "UNKNOWN" - AppDevExperienceFeature's specified subcomponent has a pending
6498 // or unknown state.
6499 Code string `json:"code,omitempty"`
6500 // Description: Description is populated if Code is Failed, explaining why it
6501 // has failed.
6502 Description string `json:"description,omitempty"`
6503 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
6504 // include in API requests. By default, fields with empty or default values are
6505 // omitted from API requests. See
6506 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6507 // details.
6508 ForceSendFields []string `json:"-"`
6509 // NullFields is a list of field names (e.g. "Code") to include in API requests
6510 // with the JSON null value. By default, fields with empty values are omitted
6511 // from API requests. See
6512 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6513 NullFields []string `json:"-"`
6514 }
6515
6516 func (s Status) MarshalJSON() ([]byte, error) {
6517 type NoMethod Status
6518 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6519 }
6520
6521 // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
6522 type TestIamPermissionsRequest struct {
6523 // Permissions: The set of permissions to check for the `resource`. Permissions
6524 // with wildcards (such as `*` or `storage.*`) are not allowed. For more
6525 // information see IAM Overview
6526 // (https://cloud.google.com/iam/docs/overview#permissions).
6527 Permissions []string `json:"permissions,omitempty"`
6528 // ForceSendFields is a list of field names (e.g. "Permissions") to
6529 // unconditionally include in API requests. By default, fields with empty or
6530 // default values are omitted from API requests. See
6531 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6532 // details.
6533 ForceSendFields []string `json:"-"`
6534 // NullFields is a list of field names (e.g. "Permissions") to include in API
6535 // requests with the JSON null value. By default, fields with empty values are
6536 // omitted from API requests. See
6537 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6538 NullFields []string `json:"-"`
6539 }
6540
6541 func (s TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
6542 type NoMethod TestIamPermissionsRequest
6543 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6544 }
6545
6546 // TestIamPermissionsResponse: Response message for `TestIamPermissions`
6547 // method.
6548 type TestIamPermissionsResponse struct {
6549 // Permissions: A subset of `TestPermissionsRequest.permissions` that the
6550 // caller is allowed.
6551 Permissions []string `json:"permissions,omitempty"`
6552
6553 // ServerResponse contains the HTTP response code and headers from the server.
6554 googleapi.ServerResponse `json:"-"`
6555 // ForceSendFields is a list of field names (e.g. "Permissions") to
6556 // unconditionally include in API requests. By default, fields with empty or
6557 // default values are omitted from API requests. See
6558 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6559 // details.
6560 ForceSendFields []string `json:"-"`
6561 // NullFields is a list of field names (e.g. "Permissions") to include in API
6562 // requests with the JSON null value. By default, fields with empty values are
6563 // omitted from API requests. See
6564 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6565 NullFields []string `json:"-"`
6566 }
6567
6568 func (s TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
6569 type NoMethod TestIamPermissionsResponse
6570 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6571 }
6572
6573 // TypeMeta: TypeMeta is the type information needed for content unmarshalling
6574 // of Kubernetes resources in the manifest.
6575 type TypeMeta struct {
6576 // ApiVersion: APIVersion of the resource (e.g. v1).
6577 ApiVersion string `json:"apiVersion,omitempty"`
6578 // Kind: Kind of the resource (e.g. Deployment).
6579 Kind string `json:"kind,omitempty"`
6580 // ForceSendFields is a list of field names (e.g. "ApiVersion") to
6581 // unconditionally include in API requests. By default, fields with empty or
6582 // default values are omitted from API requests. See
6583 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6584 // details.
6585 ForceSendFields []string `json:"-"`
6586 // NullFields is a list of field names (e.g. "ApiVersion") to include in API
6587 // requests with the JSON null value. By default, fields with empty values are
6588 // omitted from API requests. See
6589 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6590 NullFields []string `json:"-"`
6591 }
6592
6593 func (s TypeMeta) MarshalJSON() ([]byte, error) {
6594 type NoMethod TypeMeta
6595 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6596 }
6597
6598 // VersionUpgrade: Config for version upgrade of clusters.
6599 type VersionUpgrade struct {
6600 // DesiredVersion: Optional. Desired version of the component.
6601 DesiredVersion string `json:"desiredVersion,omitempty"`
6602 // Type: Optional. Type of version upgrade specifies which component should be
6603 // upgraded.
6604 //
6605 // Possible values:
6606 // "TYPE_UNSPECIFIED" - Default value.
6607 // "TYPE_CONTROL_PLANE" - Control plane upgrade.
6608 // "TYPE_NODE_POOL" - Node pool upgrade.
6609 Type string `json:"type,omitempty"`
6610 // ForceSendFields is a list of field names (e.g. "DesiredVersion") to
6611 // unconditionally include in API requests. By default, fields with empty or
6612 // default values are omitted from API requests. See
6613 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6614 // details.
6615 ForceSendFields []string `json:"-"`
6616 // NullFields is a list of field names (e.g. "DesiredVersion") to include in
6617 // API requests with the JSON null value. By default, fields with empty values
6618 // are omitted from API requests. See
6619 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6620 NullFields []string `json:"-"`
6621 }
6622
6623 func (s VersionUpgrade) MarshalJSON() ([]byte, error) {
6624 type NoMethod VersionUpgrade
6625 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6626 }
6627
6628 // WorkloadIdentityFeatureSpec: **WorkloadIdentity**: Global feature
6629 // specification.
6630 type WorkloadIdentityFeatureSpec struct {
6631 // ScopeTenancyPool: Pool to be used for Workload Identity. This pool in
6632 // trust-domain mode is used with Fleet Tenancy, so that sameness can be
6633 // enforced. ex:
6634 // projects/example/locations/global/workloadidentitypools/custompool
6635 ScopeTenancyPool string `json:"scopeTenancyPool,omitempty"`
6636 // ForceSendFields is a list of field names (e.g. "ScopeTenancyPool") to
6637 // unconditionally include in API requests. By default, fields with empty or
6638 // default values are omitted from API requests. See
6639 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6640 // details.
6641 ForceSendFields []string `json:"-"`
6642 // NullFields is a list of field names (e.g. "ScopeTenancyPool") to include in
6643 // API requests with the JSON null value. By default, fields with empty values
6644 // are omitted from API requests. See
6645 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6646 NullFields []string `json:"-"`
6647 }
6648
6649 func (s WorkloadIdentityFeatureSpec) MarshalJSON() ([]byte, error) {
6650 type NoMethod WorkloadIdentityFeatureSpec
6651 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6652 }
6653
6654 // WorkloadIdentityFeatureState: **WorkloadIdentity**: Global feature state.
6655 type WorkloadIdentityFeatureState struct {
6656 // NamespaceStateDetails: The state of the IAM namespaces for the fleet.
6657 NamespaceStateDetails map[string]WorkloadIdentityNamespaceStateDetail `json:"namespaceStateDetails,omitempty"`
6658 // NamespaceStates: Deprecated, this field will be erased after code is changed
6659 // to use the new field.
6660 NamespaceStates map[string]string `json:"namespaceStates,omitempty"`
6661 // ScopeTenancyWorkloadIdentityPool: The full name of the scope-tenancy pool
6662 // for the fleet.
6663 ScopeTenancyWorkloadIdentityPool string `json:"scopeTenancyWorkloadIdentityPool,omitempty"`
6664 // WorkloadIdentityPool: The full name of the svc.id.goog pool for the fleet.
6665 WorkloadIdentityPool string `json:"workloadIdentityPool,omitempty"`
6666 // WorkloadIdentityPoolStateDetails: The state of the Workload Identity Pools
6667 // for the fleet.
6668 WorkloadIdentityPoolStateDetails map[string]WorkloadIdentityWorkloadIdentityPoolStateDetail `json:"workloadIdentityPoolStateDetails,omitempty"`
6669 // ForceSendFields is a list of field names (e.g. "NamespaceStateDetails") to
6670 // unconditionally include in API requests. By default, fields with empty or
6671 // default values are omitted from API requests. See
6672 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6673 // details.
6674 ForceSendFields []string `json:"-"`
6675 // NullFields is a list of field names (e.g. "NamespaceStateDetails") to
6676 // include in API requests with the JSON null value. By default, fields with
6677 // empty values are omitted from API requests. See
6678 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6679 NullFields []string `json:"-"`
6680 }
6681
6682 func (s WorkloadIdentityFeatureState) MarshalJSON() ([]byte, error) {
6683 type NoMethod WorkloadIdentityFeatureState
6684 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6685 }
6686
6687 // WorkloadIdentityIdentityProviderStateDetail: IdentityProviderStateDetail
6688 // represents the state of an Identity Provider.
6689 type WorkloadIdentityIdentityProviderStateDetail struct {
6690 // Code: The state of the Identity Provider.
6691 //
6692 // Possible values:
6693 // "IDENTITY_PROVIDER_STATE_UNSPECIFIED" - Unknown state.
6694 // "IDENTITY_PROVIDER_STATE_OK" - The Identity Provider was created/updated
6695 // successfully.
6696 // "IDENTITY_PROVIDER_STATE_ERROR" - The Identity Provider was not
6697 // created/updated successfully. The error message is in the description field.
6698 Code string `json:"code,omitempty"`
6699 // Description: A human-readable description of the current state or returned
6700 // error.
6701 Description string `json:"description,omitempty"`
6702 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
6703 // include in API requests. By default, fields with empty or default values are
6704 // omitted from API requests. See
6705 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6706 // details.
6707 ForceSendFields []string `json:"-"`
6708 // NullFields is a list of field names (e.g. "Code") to include in API requests
6709 // with the JSON null value. By default, fields with empty values are omitted
6710 // from API requests. See
6711 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6712 NullFields []string `json:"-"`
6713 }
6714
6715 func (s WorkloadIdentityIdentityProviderStateDetail) MarshalJSON() ([]byte, error) {
6716 type NoMethod WorkloadIdentityIdentityProviderStateDetail
6717 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6718 }
6719
6720 // WorkloadIdentityMembershipState: **WorkloadIdentity**: The
6721 // membership-specific state for WorkloadIdentity feature.
6722 type WorkloadIdentityMembershipState struct {
6723 // Description: Deprecated, this field will be erased after code is changed to
6724 // use the new field.
6725 Description string `json:"description,omitempty"`
6726 // IdentityProviderStateDetails: The state of the Identity Providers
6727 // corresponding to the membership.
6728 IdentityProviderStateDetails map[string]WorkloadIdentityIdentityProviderStateDetail `json:"identityProviderStateDetails,omitempty"`
6729 // ForceSendFields is a list of field names (e.g. "Description") to
6730 // unconditionally include in API requests. By default, fields with empty or
6731 // default values are omitted from API requests. See
6732 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6733 // details.
6734 ForceSendFields []string `json:"-"`
6735 // NullFields is a list of field names (e.g. "Description") to include in API
6736 // requests with the JSON null value. By default, fields with empty values are
6737 // omitted from API requests. See
6738 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6739 NullFields []string `json:"-"`
6740 }
6741
6742 func (s WorkloadIdentityMembershipState) MarshalJSON() ([]byte, error) {
6743 type NoMethod WorkloadIdentityMembershipState
6744 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6745 }
6746
6747 // WorkloadIdentityNamespaceStateDetail: NamespaceStateDetail represents the
6748 // state of a IAM namespace.
6749 type WorkloadIdentityNamespaceStateDetail struct {
6750 // Code: The state of the IAM namespace.
6751 //
6752 // Possible values:
6753 // "NAMESPACE_STATE_UNSPECIFIED" - Unknown state.
6754 // "NAMESPACE_STATE_OK" - The Namespace was created/updated successfully.
6755 // "NAMESPACE_STATE_ERROR" - The Namespace was not created/updated
6756 // successfully. The error message is in the description field.
6757 Code string `json:"code,omitempty"`
6758 // Description: A human-readable description of the current state or returned
6759 // error.
6760 Description string `json:"description,omitempty"`
6761 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
6762 // include in API requests. By default, fields with empty or default values are
6763 // omitted from API requests. See
6764 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6765 // details.
6766 ForceSendFields []string `json:"-"`
6767 // NullFields is a list of field names (e.g. "Code") to include in API requests
6768 // with the JSON null value. By default, fields with empty values are omitted
6769 // from API requests. See
6770 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6771 NullFields []string `json:"-"`
6772 }
6773
6774 func (s WorkloadIdentityNamespaceStateDetail) MarshalJSON() ([]byte, error) {
6775 type NoMethod WorkloadIdentityNamespaceStateDetail
6776 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6777 }
6778
6779 // WorkloadIdentityWorkloadIdentityPoolStateDetail:
6780 // WorkloadIdentityPoolStateDetail represents the state of the Workload
6781 // Identity Pools for the fleet.
6782 type WorkloadIdentityWorkloadIdentityPoolStateDetail struct {
6783 // Code: The state of the Workload Identity Pool.
6784 //
6785 // Possible values:
6786 // "WORKLOAD_IDENTITY_POOL_STATE_UNSPECIFIED" - Unknown state.
6787 // "WORKLOAD_IDENTITY_POOL_STATE_OK" - The Workload Identity Pool was
6788 // created/updated successfully.
6789 // "WORKLOAD_IDENTITY_POOL_STATE_ERROR" - The Workload Identity Pool was not
6790 // created/updated successfully. The error message is in the description field.
6791 Code string `json:"code,omitempty"`
6792 // Description: A human-readable description of the current state or returned
6793 // error.
6794 Description string `json:"description,omitempty"`
6795 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
6796 // include in API requests. By default, fields with empty or default values are
6797 // omitted from API requests. See
6798 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6799 // details.
6800 ForceSendFields []string `json:"-"`
6801 // NullFields is a list of field names (e.g. "Code") to include in API requests
6802 // with the JSON null value. By default, fields with empty values are omitted
6803 // from API requests. See
6804 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6805 NullFields []string `json:"-"`
6806 }
6807
6808 func (s WorkloadIdentityWorkloadIdentityPoolStateDetail) MarshalJSON() ([]byte, error) {
6809 type NoMethod WorkloadIdentityWorkloadIdentityPoolStateDetail
6810 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6811 }
6812
6813 type OrganizationsLocationsFleetsListCall struct {
6814 s *Service
6815 parent string
6816 urlParams_ gensupport.URLParams
6817 ifNoneMatch_ string
6818 ctx_ context.Context
6819 header_ http.Header
6820 }
6821
6822 // List: Returns all fleets within an organization or a project that the caller
6823 // has access to.
6824 //
6825 // - parent: The organization or project to list for Fleets under, in the
6826 // format `organizations/*/locations/*` or `projects/*/locations/*`.
6827 func (r *OrganizationsLocationsFleetsService) List(parent string) *OrganizationsLocationsFleetsListCall {
6828 c := &OrganizationsLocationsFleetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6829 c.parent = parent
6830 return c
6831 }
6832
6833 // PageSize sets the optional parameter "pageSize": The maximum number of
6834 // fleets to return. The service may return fewer than this value. If
6835 // unspecified, at most 200 fleets will be returned. The maximum value is 1000;
6836 // values above 1000 will be coerced to 1000.
6837 func (c *OrganizationsLocationsFleetsListCall) PageSize(pageSize int64) *OrganizationsLocationsFleetsListCall {
6838 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6839 return c
6840 }
6841
6842 // PageToken sets the optional parameter "pageToken": A page token, received
6843 // from a previous `ListFleets` call. Provide this to retrieve the subsequent
6844 // page. When paginating, all other parameters provided to `ListFleets` must
6845 // match the call that provided the page token.
6846 func (c *OrganizationsLocationsFleetsListCall) PageToken(pageToken string) *OrganizationsLocationsFleetsListCall {
6847 c.urlParams_.Set("pageToken", pageToken)
6848 return c
6849 }
6850
6851 // Fields allows partial responses to be retrieved. See
6852 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6853 // details.
6854 func (c *OrganizationsLocationsFleetsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsFleetsListCall {
6855 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6856 return c
6857 }
6858
6859 // IfNoneMatch sets an optional parameter which makes the operation fail if the
6860 // object's ETag matches the given value. This is useful for getting updates
6861 // only after the object has changed since the last request.
6862 func (c *OrganizationsLocationsFleetsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsFleetsListCall {
6863 c.ifNoneMatch_ = entityTag
6864 return c
6865 }
6866
6867 // Context sets the context to be used in this call's Do method.
6868 func (c *OrganizationsLocationsFleetsListCall) Context(ctx context.Context) *OrganizationsLocationsFleetsListCall {
6869 c.ctx_ = ctx
6870 return c
6871 }
6872
6873 // Header returns a http.Header that can be modified by the caller to add
6874 // headers to the request.
6875 func (c *OrganizationsLocationsFleetsListCall) Header() http.Header {
6876 if c.header_ == nil {
6877 c.header_ = make(http.Header)
6878 }
6879 return c.header_
6880 }
6881
6882 func (c *OrganizationsLocationsFleetsListCall) doRequest(alt string) (*http.Response, error) {
6883 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6884 if c.ifNoneMatch_ != "" {
6885 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6886 }
6887 c.urlParams_.Set("alt", alt)
6888 c.urlParams_.Set("prettyPrint", "false")
6889 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/fleets")
6890 urls += "?" + c.urlParams_.Encode()
6891 req, err := http.NewRequest("GET", urls, nil)
6892 if err != nil {
6893 return nil, err
6894 }
6895 req.Header = reqHeaders
6896 googleapi.Expand(req.URL, map[string]string{
6897 "parent": c.parent,
6898 })
6899 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.organizations.locations.fleets.list", "request", internallog.HTTPRequest(req, nil))
6900 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6901 }
6902
6903 // Do executes the "gkehub.organizations.locations.fleets.list" call.
6904 // Any non-2xx status code is an error. Response headers are in either
6905 // *ListFleetsResponse.ServerResponse.Header or (if a response was returned at
6906 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6907 // check whether the returned error was because http.StatusNotModified was
6908 // returned.
6909 func (c *OrganizationsLocationsFleetsListCall) Do(opts ...googleapi.CallOption) (*ListFleetsResponse, error) {
6910 gensupport.SetOptions(c.urlParams_, opts...)
6911 res, err := c.doRequest("json")
6912 if res != nil && res.StatusCode == http.StatusNotModified {
6913 if res.Body != nil {
6914 res.Body.Close()
6915 }
6916 return nil, gensupport.WrapError(&googleapi.Error{
6917 Code: res.StatusCode,
6918 Header: res.Header,
6919 })
6920 }
6921 if err != nil {
6922 return nil, err
6923 }
6924 defer googleapi.CloseBody(res)
6925 if err := googleapi.CheckResponse(res); err != nil {
6926 return nil, gensupport.WrapError(err)
6927 }
6928 ret := &ListFleetsResponse{
6929 ServerResponse: googleapi.ServerResponse{
6930 Header: res.Header,
6931 HTTPStatusCode: res.StatusCode,
6932 },
6933 }
6934 target := &ret
6935 b, err := gensupport.DecodeResponseBytes(target, res)
6936 if err != nil {
6937 return nil, err
6938 }
6939 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.organizations.locations.fleets.list", "response", internallog.HTTPResponse(res, b))
6940 return ret, nil
6941 }
6942
6943 // Pages invokes f for each page of results.
6944 // A non-nil error returned from f will halt the iteration.
6945 // The provided context supersedes any context provided to the Context method.
6946 func (c *OrganizationsLocationsFleetsListCall) Pages(ctx context.Context, f func(*ListFleetsResponse) error) error {
6947 c.ctx_ = ctx
6948 defer c.PageToken(c.urlParams_.Get("pageToken"))
6949 for {
6950 x, err := c.Do()
6951 if err != nil {
6952 return err
6953 }
6954 if err := f(x); err != nil {
6955 return err
6956 }
6957 if x.NextPageToken == "" {
6958 return nil
6959 }
6960 c.PageToken(x.NextPageToken)
6961 }
6962 }
6963
6964 type ProjectsLocationsGetCall struct {
6965 s *Service
6966 name string
6967 urlParams_ gensupport.URLParams
6968 ifNoneMatch_ string
6969 ctx_ context.Context
6970 header_ http.Header
6971 }
6972
6973 // Get: Gets information about a location.
6974 //
6975 // - name: Resource name for the location.
6976 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
6977 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6978 c.name = name
6979 return c
6980 }
6981
6982 // Fields allows partial responses to be retrieved. See
6983 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6984 // details.
6985 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
6986 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6987 return c
6988 }
6989
6990 // IfNoneMatch sets an optional parameter which makes the operation fail if the
6991 // object's ETag matches the given value. This is useful for getting updates
6992 // only after the object has changed since the last request.
6993 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
6994 c.ifNoneMatch_ = entityTag
6995 return c
6996 }
6997
6998 // Context sets the context to be used in this call's Do method.
6999 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
7000 c.ctx_ = ctx
7001 return c
7002 }
7003
7004 // Header returns a http.Header that can be modified by the caller to add
7005 // headers to the request.
7006 func (c *ProjectsLocationsGetCall) Header() http.Header {
7007 if c.header_ == nil {
7008 c.header_ = make(http.Header)
7009 }
7010 return c.header_
7011 }
7012
7013 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
7014 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7015 if c.ifNoneMatch_ != "" {
7016 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7017 }
7018 c.urlParams_.Set("alt", alt)
7019 c.urlParams_.Set("prettyPrint", "false")
7020 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
7021 urls += "?" + c.urlParams_.Encode()
7022 req, err := http.NewRequest("GET", urls, nil)
7023 if err != nil {
7024 return nil, err
7025 }
7026 req.Header = reqHeaders
7027 googleapi.Expand(req.URL, map[string]string{
7028 "name": c.name,
7029 })
7030 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.get", "request", internallog.HTTPRequest(req, nil))
7031 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7032 }
7033
7034 // Do executes the "gkehub.projects.locations.get" call.
7035 // Any non-2xx status code is an error. Response headers are in either
7036 // *Location.ServerResponse.Header or (if a response was returned at all) in
7037 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7038 // whether the returned error was because http.StatusNotModified was returned.
7039 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
7040 gensupport.SetOptions(c.urlParams_, opts...)
7041 res, err := c.doRequest("json")
7042 if res != nil && res.StatusCode == http.StatusNotModified {
7043 if res.Body != nil {
7044 res.Body.Close()
7045 }
7046 return nil, gensupport.WrapError(&googleapi.Error{
7047 Code: res.StatusCode,
7048 Header: res.Header,
7049 })
7050 }
7051 if err != nil {
7052 return nil, err
7053 }
7054 defer googleapi.CloseBody(res)
7055 if err := googleapi.CheckResponse(res); err != nil {
7056 return nil, gensupport.WrapError(err)
7057 }
7058 ret := &Location{
7059 ServerResponse: googleapi.ServerResponse{
7060 Header: res.Header,
7061 HTTPStatusCode: res.StatusCode,
7062 },
7063 }
7064 target := &ret
7065 b, err := gensupport.DecodeResponseBytes(target, res)
7066 if err != nil {
7067 return nil, err
7068 }
7069 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.get", "response", internallog.HTTPResponse(res, b))
7070 return ret, nil
7071 }
7072
7073 type ProjectsLocationsListCall struct {
7074 s *Service
7075 name string
7076 urlParams_ gensupport.URLParams
7077 ifNoneMatch_ string
7078 ctx_ context.Context
7079 header_ http.Header
7080 }
7081
7082 // List: Lists information about the supported locations for this service. This
7083 // method lists locations based on the resource scope provided in the
7084 // [ListLocationsRequest.name] field: * **Global locations**: If `name` is
7085 // empty, the method lists the public locations available to all projects. *
7086 // **Project-specific locations**: If `name` follows the format
7087 // `projects/{project}`, the method lists locations visible to that specific
7088 // project. This includes public, private, or other project-specific locations
7089 // enabled for the project. For gRPC and client library implementations, the
7090 // resource name is passed as the `name` field. For direct service calls, the
7091 // resource name is incorporated into the request path based on the specific
7092 // service implementation and version.
7093 //
7094 // - name: The resource that owns the locations collection, if applicable.
7095 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
7096 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7097 c.name = name
7098 return c
7099 }
7100
7101 // ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not
7102 // use this field. It is unsupported and is ignored unless explicitly
7103 // documented otherwise. This is primarily for internal usage.
7104 func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall {
7105 c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...))
7106 return c
7107 }
7108
7109 // Filter sets the optional parameter "filter": A filter to narrow down results
7110 // to a preferred subset. The filtering language accepts strings like
7111 // "displayName=tokyo", and is documented in more detail in AIP-160
7112 // (https://google.aip.dev/160).
7113 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
7114 c.urlParams_.Set("filter", filter)
7115 return c
7116 }
7117
7118 // PageSize sets the optional parameter "pageSize": The maximum number of
7119 // results to return. If not set, the service selects a default.
7120 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
7121 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7122 return c
7123 }
7124
7125 // PageToken sets the optional parameter "pageToken": A page token received
7126 // from the `next_page_token` field in the response. Send that page token to
7127 // receive the subsequent page.
7128 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
7129 c.urlParams_.Set("pageToken", pageToken)
7130 return c
7131 }
7132
7133 // Fields allows partial responses to be retrieved. See
7134 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7135 // details.
7136 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
7137 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7138 return c
7139 }
7140
7141 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7142 // object's ETag matches the given value. This is useful for getting updates
7143 // only after the object has changed since the last request.
7144 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
7145 c.ifNoneMatch_ = entityTag
7146 return c
7147 }
7148
7149 // Context sets the context to be used in this call's Do method.
7150 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
7151 c.ctx_ = ctx
7152 return c
7153 }
7154
7155 // Header returns a http.Header that can be modified by the caller to add
7156 // headers to the request.
7157 func (c *ProjectsLocationsListCall) Header() http.Header {
7158 if c.header_ == nil {
7159 c.header_ = make(http.Header)
7160 }
7161 return c.header_
7162 }
7163
7164 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
7165 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7166 if c.ifNoneMatch_ != "" {
7167 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7168 }
7169 c.urlParams_.Set("alt", alt)
7170 c.urlParams_.Set("prettyPrint", "false")
7171 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/locations")
7172 urls += "?" + c.urlParams_.Encode()
7173 req, err := http.NewRequest("GET", urls, nil)
7174 if err != nil {
7175 return nil, err
7176 }
7177 req.Header = reqHeaders
7178 googleapi.Expand(req.URL, map[string]string{
7179 "name": c.name,
7180 })
7181 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.list", "request", internallog.HTTPRequest(req, nil))
7182 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7183 }
7184
7185 // Do executes the "gkehub.projects.locations.list" call.
7186 // Any non-2xx status code is an error. Response headers are in either
7187 // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
7188 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7189 // check whether the returned error was because http.StatusNotModified was
7190 // returned.
7191 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
7192 gensupport.SetOptions(c.urlParams_, opts...)
7193 res, err := c.doRequest("json")
7194 if res != nil && res.StatusCode == http.StatusNotModified {
7195 if res.Body != nil {
7196 res.Body.Close()
7197 }
7198 return nil, gensupport.WrapError(&googleapi.Error{
7199 Code: res.StatusCode,
7200 Header: res.Header,
7201 })
7202 }
7203 if err != nil {
7204 return nil, err
7205 }
7206 defer googleapi.CloseBody(res)
7207 if err := googleapi.CheckResponse(res); err != nil {
7208 return nil, gensupport.WrapError(err)
7209 }
7210 ret := &ListLocationsResponse{
7211 ServerResponse: googleapi.ServerResponse{
7212 Header: res.Header,
7213 HTTPStatusCode: res.StatusCode,
7214 },
7215 }
7216 target := &ret
7217 b, err := gensupport.DecodeResponseBytes(target, res)
7218 if err != nil {
7219 return nil, err
7220 }
7221 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.list", "response", internallog.HTTPResponse(res, b))
7222 return ret, nil
7223 }
7224
7225 // Pages invokes f for each page of results.
7226 // A non-nil error returned from f will halt the iteration.
7227 // The provided context supersedes any context provided to the Context method.
7228 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
7229 c.ctx_ = ctx
7230 defer c.PageToken(c.urlParams_.Get("pageToken"))
7231 for {
7232 x, err := c.Do()
7233 if err != nil {
7234 return err
7235 }
7236 if err := f(x); err != nil {
7237 return err
7238 }
7239 if x.NextPageToken == "" {
7240 return nil
7241 }
7242 c.PageToken(x.NextPageToken)
7243 }
7244 }
7245
7246 type ProjectsLocationsFeaturesCreateCall struct {
7247 s *Service
7248 parent string
7249 feature *Feature
7250 urlParams_ gensupport.URLParams
7251 ctx_ context.Context
7252 header_ http.Header
7253 }
7254
7255 // Create: Adds a new Feature.
7256 //
7257 // - parent: The parent (project and location) where the Feature will be
7258 // created. Specified in the format `projects/*/locations/*`.
7259 func (r *ProjectsLocationsFeaturesService) Create(parent string, feature *Feature) *ProjectsLocationsFeaturesCreateCall {
7260 c := &ProjectsLocationsFeaturesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7261 c.parent = parent
7262 c.feature = feature
7263 return c
7264 }
7265
7266 // FeatureId sets the optional parameter "featureId": The ID of the feature to
7267 // create.
7268 func (c *ProjectsLocationsFeaturesCreateCall) FeatureId(featureId string) *ProjectsLocationsFeaturesCreateCall {
7269 c.urlParams_.Set("featureId", featureId)
7270 return c
7271 }
7272
7273 // RequestId sets the optional parameter "requestId": A request ID to identify
7274 // requests. Specify a unique request ID so that if you must retry your
7275 // request, the server will know to ignore the request if it has already been
7276 // completed. The server will guarantee that for at least 60 minutes after the
7277 // first request. For example, consider a situation where you make an initial
7278 // request and the request times out. If you make the request again with the
7279 // same request ID, the server can check if original operation with the same
7280 // request ID was received, and if so, will ignore the second request. This
7281 // prevents clients from accidentally creating duplicate commitments. The
7282 // request ID must be a valid UUID with the exception that zero UUID is not
7283 // supported (00000000-0000-0000-0000-000000000000).
7284 func (c *ProjectsLocationsFeaturesCreateCall) RequestId(requestId string) *ProjectsLocationsFeaturesCreateCall {
7285 c.urlParams_.Set("requestId", requestId)
7286 return c
7287 }
7288
7289 // Fields allows partial responses to be retrieved. See
7290 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7291 // details.
7292 func (c *ProjectsLocationsFeaturesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesCreateCall {
7293 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7294 return c
7295 }
7296
7297 // Context sets the context to be used in this call's Do method.
7298 func (c *ProjectsLocationsFeaturesCreateCall) Context(ctx context.Context) *ProjectsLocationsFeaturesCreateCall {
7299 c.ctx_ = ctx
7300 return c
7301 }
7302
7303 // Header returns a http.Header that can be modified by the caller to add
7304 // headers to the request.
7305 func (c *ProjectsLocationsFeaturesCreateCall) Header() http.Header {
7306 if c.header_ == nil {
7307 c.header_ = make(http.Header)
7308 }
7309 return c.header_
7310 }
7311
7312 func (c *ProjectsLocationsFeaturesCreateCall) doRequest(alt string) (*http.Response, error) {
7313 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7314 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.feature)
7315 if err != nil {
7316 return nil, err
7317 }
7318 c.urlParams_.Set("alt", alt)
7319 c.urlParams_.Set("prettyPrint", "false")
7320 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/features")
7321 urls += "?" + c.urlParams_.Encode()
7322 req, err := http.NewRequest("POST", urls, body)
7323 if err != nil {
7324 return nil, err
7325 }
7326 req.Header = reqHeaders
7327 googleapi.Expand(req.URL, map[string]string{
7328 "parent": c.parent,
7329 })
7330 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.create", "request", internallog.HTTPRequest(req, body.Bytes()))
7331 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7332 }
7333
7334 // Do executes the "gkehub.projects.locations.features.create" call.
7335 // Any non-2xx status code is an error. Response headers are in either
7336 // *Operation.ServerResponse.Header or (if a response was returned at all) in
7337 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7338 // whether the returned error was because http.StatusNotModified was returned.
7339 func (c *ProjectsLocationsFeaturesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7340 gensupport.SetOptions(c.urlParams_, opts...)
7341 res, err := c.doRequest("json")
7342 if res != nil && res.StatusCode == http.StatusNotModified {
7343 if res.Body != nil {
7344 res.Body.Close()
7345 }
7346 return nil, gensupport.WrapError(&googleapi.Error{
7347 Code: res.StatusCode,
7348 Header: res.Header,
7349 })
7350 }
7351 if err != nil {
7352 return nil, err
7353 }
7354 defer googleapi.CloseBody(res)
7355 if err := googleapi.CheckResponse(res); err != nil {
7356 return nil, gensupport.WrapError(err)
7357 }
7358 ret := &Operation{
7359 ServerResponse: googleapi.ServerResponse{
7360 Header: res.Header,
7361 HTTPStatusCode: res.StatusCode,
7362 },
7363 }
7364 target := &ret
7365 b, err := gensupport.DecodeResponseBytes(target, res)
7366 if err != nil {
7367 return nil, err
7368 }
7369 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.create", "response", internallog.HTTPResponse(res, b))
7370 return ret, nil
7371 }
7372
7373 type ProjectsLocationsFeaturesDeleteCall struct {
7374 s *Service
7375 name string
7376 urlParams_ gensupport.URLParams
7377 ctx_ context.Context
7378 header_ http.Header
7379 }
7380
7381 // Delete: Removes a Feature.
7382 //
7383 // - name: The Feature resource name in the format
7384 // `projects/*/locations/*/features/*`.
7385 func (r *ProjectsLocationsFeaturesService) Delete(name string) *ProjectsLocationsFeaturesDeleteCall {
7386 c := &ProjectsLocationsFeaturesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7387 c.name = name
7388 return c
7389 }
7390
7391 // Force sets the optional parameter "force": If set to true, the delete will
7392 // ignore any outstanding resources for this Feature (that is,
7393 // `FeatureState.has_resources` is set to true). These resources will NOT be
7394 // cleaned up or modified in any way.
7395 func (c *ProjectsLocationsFeaturesDeleteCall) Force(force bool) *ProjectsLocationsFeaturesDeleteCall {
7396 c.urlParams_.Set("force", fmt.Sprint(force))
7397 return c
7398 }
7399
7400 // RequestId sets the optional parameter "requestId": A request ID to identify
7401 // requests. Specify a unique request ID so that if you must retry your
7402 // request, the server will know to ignore the request if it has already been
7403 // completed. The server will guarantee that for at least 60 minutes after the
7404 // first request. For example, consider a situation where you make an initial
7405 // request and the request times out. If you make the request again with the
7406 // same request ID, the server can check if original operation with the same
7407 // request ID was received, and if so, will ignore the second request. This
7408 // prevents clients from accidentally creating duplicate commitments. The
7409 // request ID must be a valid UUID with the exception that zero UUID is not
7410 // supported (00000000-0000-0000-0000-000000000000).
7411 func (c *ProjectsLocationsFeaturesDeleteCall) RequestId(requestId string) *ProjectsLocationsFeaturesDeleteCall {
7412 c.urlParams_.Set("requestId", requestId)
7413 return c
7414 }
7415
7416 // Fields allows partial responses to be retrieved. See
7417 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7418 // details.
7419 func (c *ProjectsLocationsFeaturesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesDeleteCall {
7420 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7421 return c
7422 }
7423
7424 // Context sets the context to be used in this call's Do method.
7425 func (c *ProjectsLocationsFeaturesDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturesDeleteCall {
7426 c.ctx_ = ctx
7427 return c
7428 }
7429
7430 // Header returns a http.Header that can be modified by the caller to add
7431 // headers to the request.
7432 func (c *ProjectsLocationsFeaturesDeleteCall) Header() http.Header {
7433 if c.header_ == nil {
7434 c.header_ = make(http.Header)
7435 }
7436 return c.header_
7437 }
7438
7439 func (c *ProjectsLocationsFeaturesDeleteCall) doRequest(alt string) (*http.Response, error) {
7440 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7441 c.urlParams_.Set("alt", alt)
7442 c.urlParams_.Set("prettyPrint", "false")
7443 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
7444 urls += "?" + c.urlParams_.Encode()
7445 req, err := http.NewRequest("DELETE", urls, nil)
7446 if err != nil {
7447 return nil, err
7448 }
7449 req.Header = reqHeaders
7450 googleapi.Expand(req.URL, map[string]string{
7451 "name": c.name,
7452 })
7453 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.delete", "request", internallog.HTTPRequest(req, nil))
7454 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7455 }
7456
7457 // Do executes the "gkehub.projects.locations.features.delete" call.
7458 // Any non-2xx status code is an error. Response headers are in either
7459 // *Operation.ServerResponse.Header or (if a response was returned at all) in
7460 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7461 // whether the returned error was because http.StatusNotModified was returned.
7462 func (c *ProjectsLocationsFeaturesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7463 gensupport.SetOptions(c.urlParams_, opts...)
7464 res, err := c.doRequest("json")
7465 if res != nil && res.StatusCode == http.StatusNotModified {
7466 if res.Body != nil {
7467 res.Body.Close()
7468 }
7469 return nil, gensupport.WrapError(&googleapi.Error{
7470 Code: res.StatusCode,
7471 Header: res.Header,
7472 })
7473 }
7474 if err != nil {
7475 return nil, err
7476 }
7477 defer googleapi.CloseBody(res)
7478 if err := googleapi.CheckResponse(res); err != nil {
7479 return nil, gensupport.WrapError(err)
7480 }
7481 ret := &Operation{
7482 ServerResponse: googleapi.ServerResponse{
7483 Header: res.Header,
7484 HTTPStatusCode: res.StatusCode,
7485 },
7486 }
7487 target := &ret
7488 b, err := gensupport.DecodeResponseBytes(target, res)
7489 if err != nil {
7490 return nil, err
7491 }
7492 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.delete", "response", internallog.HTTPResponse(res, b))
7493 return ret, nil
7494 }
7495
7496 type ProjectsLocationsFeaturesGetCall struct {
7497 s *Service
7498 name string
7499 urlParams_ gensupport.URLParams
7500 ifNoneMatch_ string
7501 ctx_ context.Context
7502 header_ http.Header
7503 }
7504
7505 // Get: Gets details of a single Feature.
7506 //
7507 // - name: The Feature resource name in the format
7508 // `projects/*/locations/*/features/*`.
7509 func (r *ProjectsLocationsFeaturesService) Get(name string) *ProjectsLocationsFeaturesGetCall {
7510 c := &ProjectsLocationsFeaturesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7511 c.name = name
7512 return c
7513 }
7514
7515 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If
7516 // set to true, the response will return partial results when some regions are
7517 // unreachable and the unreachable field in Feature proto will be populated. If
7518 // set to false, the request will fail when some regions are unreachable.
7519 func (c *ProjectsLocationsFeaturesGetCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsFeaturesGetCall {
7520 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
7521 return c
7522 }
7523
7524 // Fields allows partial responses to be retrieved. See
7525 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7526 // details.
7527 func (c *ProjectsLocationsFeaturesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesGetCall {
7528 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7529 return c
7530 }
7531
7532 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7533 // object's ETag matches the given value. This is useful for getting updates
7534 // only after the object has changed since the last request.
7535 func (c *ProjectsLocationsFeaturesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturesGetCall {
7536 c.ifNoneMatch_ = entityTag
7537 return c
7538 }
7539
7540 // Context sets the context to be used in this call's Do method.
7541 func (c *ProjectsLocationsFeaturesGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturesGetCall {
7542 c.ctx_ = ctx
7543 return c
7544 }
7545
7546 // Header returns a http.Header that can be modified by the caller to add
7547 // headers to the request.
7548 func (c *ProjectsLocationsFeaturesGetCall) Header() http.Header {
7549 if c.header_ == nil {
7550 c.header_ = make(http.Header)
7551 }
7552 return c.header_
7553 }
7554
7555 func (c *ProjectsLocationsFeaturesGetCall) doRequest(alt string) (*http.Response, error) {
7556 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7557 if c.ifNoneMatch_ != "" {
7558 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7559 }
7560 c.urlParams_.Set("alt", alt)
7561 c.urlParams_.Set("prettyPrint", "false")
7562 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
7563 urls += "?" + c.urlParams_.Encode()
7564 req, err := http.NewRequest("GET", urls, nil)
7565 if err != nil {
7566 return nil, err
7567 }
7568 req.Header = reqHeaders
7569 googleapi.Expand(req.URL, map[string]string{
7570 "name": c.name,
7571 })
7572 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.get", "request", internallog.HTTPRequest(req, nil))
7573 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7574 }
7575
7576 // Do executes the "gkehub.projects.locations.features.get" call.
7577 // Any non-2xx status code is an error. Response headers are in either
7578 // *Feature.ServerResponse.Header or (if a response was returned at all) in
7579 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7580 // whether the returned error was because http.StatusNotModified was returned.
7581 func (c *ProjectsLocationsFeaturesGetCall) Do(opts ...googleapi.CallOption) (*Feature, error) {
7582 gensupport.SetOptions(c.urlParams_, opts...)
7583 res, err := c.doRequest("json")
7584 if res != nil && res.StatusCode == http.StatusNotModified {
7585 if res.Body != nil {
7586 res.Body.Close()
7587 }
7588 return nil, gensupport.WrapError(&googleapi.Error{
7589 Code: res.StatusCode,
7590 Header: res.Header,
7591 })
7592 }
7593 if err != nil {
7594 return nil, err
7595 }
7596 defer googleapi.CloseBody(res)
7597 if err := googleapi.CheckResponse(res); err != nil {
7598 return nil, gensupport.WrapError(err)
7599 }
7600 ret := &Feature{
7601 ServerResponse: googleapi.ServerResponse{
7602 Header: res.Header,
7603 HTTPStatusCode: res.StatusCode,
7604 },
7605 }
7606 target := &ret
7607 b, err := gensupport.DecodeResponseBytes(target, res)
7608 if err != nil {
7609 return nil, err
7610 }
7611 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.get", "response", internallog.HTTPResponse(res, b))
7612 return ret, nil
7613 }
7614
7615 type ProjectsLocationsFeaturesGetIamPolicyCall struct {
7616 s *Service
7617 resource string
7618 urlParams_ gensupport.URLParams
7619 ifNoneMatch_ string
7620 ctx_ context.Context
7621 header_ http.Header
7622 }
7623
7624 // GetIamPolicy: Gets the access control policy for a resource. Returns an
7625 // empty policy if the resource exists and does not have a policy set.
7626 //
7627 // - resource: REQUIRED: The resource for which the policy is being requested.
7628 // See Resource names (https://cloud.google.com/apis/design/resource_names)
7629 // for the appropriate value for this field.
7630 func (r *ProjectsLocationsFeaturesService) GetIamPolicy(resource string) *ProjectsLocationsFeaturesGetIamPolicyCall {
7631 c := &ProjectsLocationsFeaturesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7632 c.resource = resource
7633 return c
7634 }
7635
7636 // OptionsRequestedPolicyVersion sets the optional parameter
7637 // "options.requestedPolicyVersion": The maximum policy version that will be
7638 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
7639 // an invalid value will be rejected. Requests for policies with any
7640 // conditional role bindings must specify version 3. Policies with no
7641 // conditional role bindings may specify any valid value or leave the field
7642 // unset. The policy in the response might use the policy version that you
7643 // specified, or it might use a lower policy version. For example, if you
7644 // specify version 3, but the policy has no conditional role bindings, the
7645 // response uses version 1. To learn which resources support conditions in
7646 // their IAM policies, see the IAM documentation
7647 // (https://cloud.google.com/iam/help/conditions/resource-policies).
7648 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFeaturesGetIamPolicyCall {
7649 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
7650 return c
7651 }
7652
7653 // Fields allows partial responses to be retrieved. See
7654 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7655 // details.
7656 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesGetIamPolicyCall {
7657 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7658 return c
7659 }
7660
7661 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7662 // object's ETag matches the given value. This is useful for getting updates
7663 // only after the object has changed since the last request.
7664 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturesGetIamPolicyCall {
7665 c.ifNoneMatch_ = entityTag
7666 return c
7667 }
7668
7669 // Context sets the context to be used in this call's Do method.
7670 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturesGetIamPolicyCall {
7671 c.ctx_ = ctx
7672 return c
7673 }
7674
7675 // Header returns a http.Header that can be modified by the caller to add
7676 // headers to the request.
7677 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) Header() http.Header {
7678 if c.header_ == nil {
7679 c.header_ = make(http.Header)
7680 }
7681 return c.header_
7682 }
7683
7684 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7685 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7686 if c.ifNoneMatch_ != "" {
7687 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7688 }
7689 c.urlParams_.Set("alt", alt)
7690 c.urlParams_.Set("prettyPrint", "false")
7691 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:getIamPolicy")
7692 urls += "?" + c.urlParams_.Encode()
7693 req, err := http.NewRequest("GET", urls, nil)
7694 if err != nil {
7695 return nil, err
7696 }
7697 req.Header = reqHeaders
7698 googleapi.Expand(req.URL, map[string]string{
7699 "resource": c.resource,
7700 })
7701 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
7702 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7703 }
7704
7705 // Do executes the "gkehub.projects.locations.features.getIamPolicy" call.
7706 // Any non-2xx status code is an error. Response headers are in either
7707 // *Policy.ServerResponse.Header or (if a response was returned at all) in
7708 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7709 // whether the returned error was because http.StatusNotModified was returned.
7710 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
7711 gensupport.SetOptions(c.urlParams_, opts...)
7712 res, err := c.doRequest("json")
7713 if res != nil && res.StatusCode == http.StatusNotModified {
7714 if res.Body != nil {
7715 res.Body.Close()
7716 }
7717 return nil, gensupport.WrapError(&googleapi.Error{
7718 Code: res.StatusCode,
7719 Header: res.Header,
7720 })
7721 }
7722 if err != nil {
7723 return nil, err
7724 }
7725 defer googleapi.CloseBody(res)
7726 if err := googleapi.CheckResponse(res); err != nil {
7727 return nil, gensupport.WrapError(err)
7728 }
7729 ret := &Policy{
7730 ServerResponse: googleapi.ServerResponse{
7731 Header: res.Header,
7732 HTTPStatusCode: res.StatusCode,
7733 },
7734 }
7735 target := &ret
7736 b, err := gensupport.DecodeResponseBytes(target, res)
7737 if err != nil {
7738 return nil, err
7739 }
7740 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.getIamPolicy", "response", internallog.HTTPResponse(res, b))
7741 return ret, nil
7742 }
7743
7744 type ProjectsLocationsFeaturesListCall struct {
7745 s *Service
7746 parent string
7747 urlParams_ gensupport.URLParams
7748 ifNoneMatch_ string
7749 ctx_ context.Context
7750 header_ http.Header
7751 }
7752
7753 // List: Lists Features in a given project and location.
7754 //
7755 // - parent: The parent (project and location) where the Features will be
7756 // listed. Specified in the format `projects/*/locations/*`.
7757 func (r *ProjectsLocationsFeaturesService) List(parent string) *ProjectsLocationsFeaturesListCall {
7758 c := &ProjectsLocationsFeaturesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7759 c.parent = parent
7760 return c
7761 }
7762
7763 // Filter sets the optional parameter "filter": Lists Features that match the
7764 // filter expression, following the syntax outlined in
7765 // https://google.aip.dev/160. Examples: - Feature with the name "servicemesh"
7766 // in project "foo-proj": name =
7767 // "projects/foo-proj/locations/global/features/servicemesh" - Features that
7768 // have a label called `foo`: labels.foo:* - Features that have a label called
7769 // `foo` whose value is `bar`: labels.foo = bar
7770 func (c *ProjectsLocationsFeaturesListCall) Filter(filter string) *ProjectsLocationsFeaturesListCall {
7771 c.urlParams_.Set("filter", filter)
7772 return c
7773 }
7774
7775 // OrderBy sets the optional parameter "orderBy": One or more fields to compare
7776 // and use to sort the output. See https://google.aip.dev/132#ordering.
7777 func (c *ProjectsLocationsFeaturesListCall) OrderBy(orderBy string) *ProjectsLocationsFeaturesListCall {
7778 c.urlParams_.Set("orderBy", orderBy)
7779 return c
7780 }
7781
7782 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
7783 // resources, `page_size` specifies number of resources to return. If
7784 // unspecified or set to 0, all resources will be returned.
7785 func (c *ProjectsLocationsFeaturesListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturesListCall {
7786 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7787 return c
7788 }
7789
7790 // PageToken sets the optional parameter "pageToken": Token returned by
7791 // previous call to `ListFeatures` which specifies the position in the list
7792 // from where to continue listing the resources.
7793 func (c *ProjectsLocationsFeaturesListCall) PageToken(pageToken string) *ProjectsLocationsFeaturesListCall {
7794 c.urlParams_.Set("pageToken", pageToken)
7795 return c
7796 }
7797
7798 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If
7799 // set to true, the response will return partial results when some regions are
7800 // unreachable and the unreachable field in Feature proto will be populated. If
7801 // set to false, the request will fail when some regions are unreachable.
7802 func (c *ProjectsLocationsFeaturesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsFeaturesListCall {
7803 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
7804 return c
7805 }
7806
7807 // Fields allows partial responses to be retrieved. See
7808 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7809 // details.
7810 func (c *ProjectsLocationsFeaturesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesListCall {
7811 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7812 return c
7813 }
7814
7815 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7816 // object's ETag matches the given value. This is useful for getting updates
7817 // only after the object has changed since the last request.
7818 func (c *ProjectsLocationsFeaturesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturesListCall {
7819 c.ifNoneMatch_ = entityTag
7820 return c
7821 }
7822
7823 // Context sets the context to be used in this call's Do method.
7824 func (c *ProjectsLocationsFeaturesListCall) Context(ctx context.Context) *ProjectsLocationsFeaturesListCall {
7825 c.ctx_ = ctx
7826 return c
7827 }
7828
7829 // Header returns a http.Header that can be modified by the caller to add
7830 // headers to the request.
7831 func (c *ProjectsLocationsFeaturesListCall) Header() http.Header {
7832 if c.header_ == nil {
7833 c.header_ = make(http.Header)
7834 }
7835 return c.header_
7836 }
7837
7838 func (c *ProjectsLocationsFeaturesListCall) doRequest(alt string) (*http.Response, error) {
7839 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7840 if c.ifNoneMatch_ != "" {
7841 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7842 }
7843 c.urlParams_.Set("alt", alt)
7844 c.urlParams_.Set("prettyPrint", "false")
7845 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/features")
7846 urls += "?" + c.urlParams_.Encode()
7847 req, err := http.NewRequest("GET", urls, nil)
7848 if err != nil {
7849 return nil, err
7850 }
7851 req.Header = reqHeaders
7852 googleapi.Expand(req.URL, map[string]string{
7853 "parent": c.parent,
7854 })
7855 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.list", "request", internallog.HTTPRequest(req, nil))
7856 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7857 }
7858
7859 // Do executes the "gkehub.projects.locations.features.list" call.
7860 // Any non-2xx status code is an error. Response headers are in either
7861 // *ListFeaturesResponse.ServerResponse.Header or (if a response was returned
7862 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7863 // check whether the returned error was because http.StatusNotModified was
7864 // returned.
7865 func (c *ProjectsLocationsFeaturesListCall) Do(opts ...googleapi.CallOption) (*ListFeaturesResponse, error) {
7866 gensupport.SetOptions(c.urlParams_, opts...)
7867 res, err := c.doRequest("json")
7868 if res != nil && res.StatusCode == http.StatusNotModified {
7869 if res.Body != nil {
7870 res.Body.Close()
7871 }
7872 return nil, gensupport.WrapError(&googleapi.Error{
7873 Code: res.StatusCode,
7874 Header: res.Header,
7875 })
7876 }
7877 if err != nil {
7878 return nil, err
7879 }
7880 defer googleapi.CloseBody(res)
7881 if err := googleapi.CheckResponse(res); err != nil {
7882 return nil, gensupport.WrapError(err)
7883 }
7884 ret := &ListFeaturesResponse{
7885 ServerResponse: googleapi.ServerResponse{
7886 Header: res.Header,
7887 HTTPStatusCode: res.StatusCode,
7888 },
7889 }
7890 target := &ret
7891 b, err := gensupport.DecodeResponseBytes(target, res)
7892 if err != nil {
7893 return nil, err
7894 }
7895 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.list", "response", internallog.HTTPResponse(res, b))
7896 return ret, nil
7897 }
7898
7899 // Pages invokes f for each page of results.
7900 // A non-nil error returned from f will halt the iteration.
7901 // The provided context supersedes any context provided to the Context method.
7902 func (c *ProjectsLocationsFeaturesListCall) Pages(ctx context.Context, f func(*ListFeaturesResponse) error) error {
7903 c.ctx_ = ctx
7904 defer c.PageToken(c.urlParams_.Get("pageToken"))
7905 for {
7906 x, err := c.Do()
7907 if err != nil {
7908 return err
7909 }
7910 if err := f(x); err != nil {
7911 return err
7912 }
7913 if x.NextPageToken == "" {
7914 return nil
7915 }
7916 c.PageToken(x.NextPageToken)
7917 }
7918 }
7919
7920 type ProjectsLocationsFeaturesPatchCall struct {
7921 s *Service
7922 name string
7923 feature *Feature
7924 urlParams_ gensupport.URLParams
7925 ctx_ context.Context
7926 header_ http.Header
7927 }
7928
7929 // Patch: Updates an existing Feature.
7930 //
7931 // - name: The Feature resource name in the format
7932 // `projects/*/locations/*/features/*`.
7933 func (r *ProjectsLocationsFeaturesService) Patch(name string, feature *Feature) *ProjectsLocationsFeaturesPatchCall {
7934 c := &ProjectsLocationsFeaturesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7935 c.name = name
7936 c.feature = feature
7937 return c
7938 }
7939
7940 // RequestId sets the optional parameter "requestId": A request ID to identify
7941 // requests. Specify a unique request ID so that if you must retry your
7942 // request, the server will know to ignore the request if it has already been
7943 // completed. The server will guarantee that for at least 60 minutes after the
7944 // first request. For example, consider a situation where you make an initial
7945 // request and the request times out. If you make the request again with the
7946 // same request ID, the server can check if original operation with the same
7947 // request ID was received, and if so, will ignore the second request. This
7948 // prevents clients from accidentally creating duplicate commitments. The
7949 // request ID must be a valid UUID with the exception that zero UUID is not
7950 // supported (00000000-0000-0000-0000-000000000000).
7951 func (c *ProjectsLocationsFeaturesPatchCall) RequestId(requestId string) *ProjectsLocationsFeaturesPatchCall {
7952 c.urlParams_.Set("requestId", requestId)
7953 return c
7954 }
7955
7956 // UpdateMask sets the optional parameter "updateMask": Mask of fields to
7957 // update.
7958 func (c *ProjectsLocationsFeaturesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeaturesPatchCall {
7959 c.urlParams_.Set("updateMask", updateMask)
7960 return c
7961 }
7962
7963 // Fields allows partial responses to be retrieved. See
7964 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7965 // details.
7966 func (c *ProjectsLocationsFeaturesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesPatchCall {
7967 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7968 return c
7969 }
7970
7971 // Context sets the context to be used in this call's Do method.
7972 func (c *ProjectsLocationsFeaturesPatchCall) Context(ctx context.Context) *ProjectsLocationsFeaturesPatchCall {
7973 c.ctx_ = ctx
7974 return c
7975 }
7976
7977 // Header returns a http.Header that can be modified by the caller to add
7978 // headers to the request.
7979 func (c *ProjectsLocationsFeaturesPatchCall) Header() http.Header {
7980 if c.header_ == nil {
7981 c.header_ = make(http.Header)
7982 }
7983 return c.header_
7984 }
7985
7986 func (c *ProjectsLocationsFeaturesPatchCall) doRequest(alt string) (*http.Response, error) {
7987 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7988 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.feature)
7989 if err != nil {
7990 return nil, err
7991 }
7992 c.urlParams_.Set("alt", alt)
7993 c.urlParams_.Set("prettyPrint", "false")
7994 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
7995 urls += "?" + c.urlParams_.Encode()
7996 req, err := http.NewRequest("PATCH", urls, body)
7997 if err != nil {
7998 return nil, err
7999 }
8000 req.Header = reqHeaders
8001 googleapi.Expand(req.URL, map[string]string{
8002 "name": c.name,
8003 })
8004 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
8005 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8006 }
8007
8008 // Do executes the "gkehub.projects.locations.features.patch" call.
8009 // Any non-2xx status code is an error. Response headers are in either
8010 // *Operation.ServerResponse.Header or (if a response was returned at all) in
8011 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8012 // whether the returned error was because http.StatusNotModified was returned.
8013 func (c *ProjectsLocationsFeaturesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8014 gensupport.SetOptions(c.urlParams_, opts...)
8015 res, err := c.doRequest("json")
8016 if res != nil && res.StatusCode == http.StatusNotModified {
8017 if res.Body != nil {
8018 res.Body.Close()
8019 }
8020 return nil, gensupport.WrapError(&googleapi.Error{
8021 Code: res.StatusCode,
8022 Header: res.Header,
8023 })
8024 }
8025 if err != nil {
8026 return nil, err
8027 }
8028 defer googleapi.CloseBody(res)
8029 if err := googleapi.CheckResponse(res); err != nil {
8030 return nil, gensupport.WrapError(err)
8031 }
8032 ret := &Operation{
8033 ServerResponse: googleapi.ServerResponse{
8034 Header: res.Header,
8035 HTTPStatusCode: res.StatusCode,
8036 },
8037 }
8038 target := &ret
8039 b, err := gensupport.DecodeResponseBytes(target, res)
8040 if err != nil {
8041 return nil, err
8042 }
8043 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.patch", "response", internallog.HTTPResponse(res, b))
8044 return ret, nil
8045 }
8046
8047 type ProjectsLocationsFeaturesSetIamPolicyCall struct {
8048 s *Service
8049 resource string
8050 setiampolicyrequest *SetIamPolicyRequest
8051 urlParams_ gensupport.URLParams
8052 ctx_ context.Context
8053 header_ http.Header
8054 }
8055
8056 // SetIamPolicy: Sets the access control policy on the specified resource.
8057 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
8058 // and `PERMISSION_DENIED` errors.
8059 //
8060 // - resource: REQUIRED: The resource for which the policy is being specified.
8061 // See Resource names (https://cloud.google.com/apis/design/resource_names)
8062 // for the appropriate value for this field.
8063 func (r *ProjectsLocationsFeaturesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsFeaturesSetIamPolicyCall {
8064 c := &ProjectsLocationsFeaturesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8065 c.resource = resource
8066 c.setiampolicyrequest = setiampolicyrequest
8067 return c
8068 }
8069
8070 // Fields allows partial responses to be retrieved. See
8071 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8072 // details.
8073 func (c *ProjectsLocationsFeaturesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesSetIamPolicyCall {
8074 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8075 return c
8076 }
8077
8078 // Context sets the context to be used in this call's Do method.
8079 func (c *ProjectsLocationsFeaturesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturesSetIamPolicyCall {
8080 c.ctx_ = ctx
8081 return c
8082 }
8083
8084 // Header returns a http.Header that can be modified by the caller to add
8085 // headers to the request.
8086 func (c *ProjectsLocationsFeaturesSetIamPolicyCall) Header() http.Header {
8087 if c.header_ == nil {
8088 c.header_ = make(http.Header)
8089 }
8090 return c.header_
8091 }
8092
8093 func (c *ProjectsLocationsFeaturesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8094 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8095 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
8096 if err != nil {
8097 return nil, err
8098 }
8099 c.urlParams_.Set("alt", alt)
8100 c.urlParams_.Set("prettyPrint", "false")
8101 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:setIamPolicy")
8102 urls += "?" + c.urlParams_.Encode()
8103 req, err := http.NewRequest("POST", urls, body)
8104 if err != nil {
8105 return nil, err
8106 }
8107 req.Header = reqHeaders
8108 googleapi.Expand(req.URL, map[string]string{
8109 "resource": c.resource,
8110 })
8111 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
8112 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8113 }
8114
8115 // Do executes the "gkehub.projects.locations.features.setIamPolicy" call.
8116 // Any non-2xx status code is an error. Response headers are in either
8117 // *Policy.ServerResponse.Header or (if a response was returned at all) in
8118 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8119 // whether the returned error was because http.StatusNotModified was returned.
8120 func (c *ProjectsLocationsFeaturesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8121 gensupport.SetOptions(c.urlParams_, opts...)
8122 res, err := c.doRequest("json")
8123 if res != nil && res.StatusCode == http.StatusNotModified {
8124 if res.Body != nil {
8125 res.Body.Close()
8126 }
8127 return nil, gensupport.WrapError(&googleapi.Error{
8128 Code: res.StatusCode,
8129 Header: res.Header,
8130 })
8131 }
8132 if err != nil {
8133 return nil, err
8134 }
8135 defer googleapi.CloseBody(res)
8136 if err := googleapi.CheckResponse(res); err != nil {
8137 return nil, gensupport.WrapError(err)
8138 }
8139 ret := &Policy{
8140 ServerResponse: googleapi.ServerResponse{
8141 Header: res.Header,
8142 HTTPStatusCode: res.StatusCode,
8143 },
8144 }
8145 target := &ret
8146 b, err := gensupport.DecodeResponseBytes(target, res)
8147 if err != nil {
8148 return nil, err
8149 }
8150 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.setIamPolicy", "response", internallog.HTTPResponse(res, b))
8151 return ret, nil
8152 }
8153
8154 type ProjectsLocationsFeaturesTestIamPermissionsCall struct {
8155 s *Service
8156 resource string
8157 testiampermissionsrequest *TestIamPermissionsRequest
8158 urlParams_ gensupport.URLParams
8159 ctx_ context.Context
8160 header_ http.Header
8161 }
8162
8163 // TestIamPermissions: Returns permissions that a caller has on the specified
8164 // resource. If the resource does not exist, this will return an empty set of
8165 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
8166 // used for building permission-aware UIs and command-line tools, not for
8167 // authorization checking. This operation may "fail open" without warning.
8168 //
8169 // - resource: REQUIRED: The resource for which the policy detail is being
8170 // requested. See Resource names
8171 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
8172 // value for this field.
8173 func (r *ProjectsLocationsFeaturesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsFeaturesTestIamPermissionsCall {
8174 c := &ProjectsLocationsFeaturesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8175 c.resource = resource
8176 c.testiampermissionsrequest = testiampermissionsrequest
8177 return c
8178 }
8179
8180 // Fields allows partial responses to be retrieved. See
8181 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8182 // details.
8183 func (c *ProjectsLocationsFeaturesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesTestIamPermissionsCall {
8184 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8185 return c
8186 }
8187
8188 // Context sets the context to be used in this call's Do method.
8189 func (c *ProjectsLocationsFeaturesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFeaturesTestIamPermissionsCall {
8190 c.ctx_ = ctx
8191 return c
8192 }
8193
8194 // Header returns a http.Header that can be modified by the caller to add
8195 // headers to the request.
8196 func (c *ProjectsLocationsFeaturesTestIamPermissionsCall) Header() http.Header {
8197 if c.header_ == nil {
8198 c.header_ = make(http.Header)
8199 }
8200 return c.header_
8201 }
8202
8203 func (c *ProjectsLocationsFeaturesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
8204 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8205 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
8206 if err != nil {
8207 return nil, err
8208 }
8209 c.urlParams_.Set("alt", alt)
8210 c.urlParams_.Set("prettyPrint", "false")
8211 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:testIamPermissions")
8212 urls += "?" + c.urlParams_.Encode()
8213 req, err := http.NewRequest("POST", urls, body)
8214 if err != nil {
8215 return nil, err
8216 }
8217 req.Header = reqHeaders
8218 googleapi.Expand(req.URL, map[string]string{
8219 "resource": c.resource,
8220 })
8221 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
8222 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8223 }
8224
8225 // Do executes the "gkehub.projects.locations.features.testIamPermissions" call.
8226 // Any non-2xx status code is an error. Response headers are in either
8227 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
8228 // returned at all) in error.(*googleapi.Error).Header. Use
8229 // googleapi.IsNotModified to check whether the returned error was because
8230 // http.StatusNotModified was returned.
8231 func (c *ProjectsLocationsFeaturesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
8232 gensupport.SetOptions(c.urlParams_, opts...)
8233 res, err := c.doRequest("json")
8234 if res != nil && res.StatusCode == http.StatusNotModified {
8235 if res.Body != nil {
8236 res.Body.Close()
8237 }
8238 return nil, gensupport.WrapError(&googleapi.Error{
8239 Code: res.StatusCode,
8240 Header: res.Header,
8241 })
8242 }
8243 if err != nil {
8244 return nil, err
8245 }
8246 defer googleapi.CloseBody(res)
8247 if err := googleapi.CheckResponse(res); err != nil {
8248 return nil, gensupport.WrapError(err)
8249 }
8250 ret := &TestIamPermissionsResponse{
8251 ServerResponse: googleapi.ServerResponse{
8252 Header: res.Header,
8253 HTTPStatusCode: res.StatusCode,
8254 },
8255 }
8256 target := &ret
8257 b, err := gensupport.DecodeResponseBytes(target, res)
8258 if err != nil {
8259 return nil, err
8260 }
8261 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.testIamPermissions", "response", internallog.HTTPResponse(res, b))
8262 return ret, nil
8263 }
8264
8265 type ProjectsLocationsFleetsCreateCall struct {
8266 s *Service
8267 parent string
8268 fleet *Fleet
8269 urlParams_ gensupport.URLParams
8270 ctx_ context.Context
8271 header_ http.Header
8272 }
8273
8274 // Create: Creates a fleet.
8275 //
8276 // - parent: The parent (project and location) where the Fleet will be created.
8277 // Specified in the format `projects/*/locations/*`.
8278 func (r *ProjectsLocationsFleetsService) Create(parent string, fleet *Fleet) *ProjectsLocationsFleetsCreateCall {
8279 c := &ProjectsLocationsFleetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8280 c.parent = parent
8281 c.fleet = fleet
8282 return c
8283 }
8284
8285 // Fields allows partial responses to be retrieved. See
8286 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8287 // details.
8288 func (c *ProjectsLocationsFleetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFleetsCreateCall {
8289 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8290 return c
8291 }
8292
8293 // Context sets the context to be used in this call's Do method.
8294 func (c *ProjectsLocationsFleetsCreateCall) Context(ctx context.Context) *ProjectsLocationsFleetsCreateCall {
8295 c.ctx_ = ctx
8296 return c
8297 }
8298
8299 // Header returns a http.Header that can be modified by the caller to add
8300 // headers to the request.
8301 func (c *ProjectsLocationsFleetsCreateCall) Header() http.Header {
8302 if c.header_ == nil {
8303 c.header_ = make(http.Header)
8304 }
8305 return c.header_
8306 }
8307
8308 func (c *ProjectsLocationsFleetsCreateCall) doRequest(alt string) (*http.Response, error) {
8309 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8310 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.fleet)
8311 if err != nil {
8312 return nil, err
8313 }
8314 c.urlParams_.Set("alt", alt)
8315 c.urlParams_.Set("prettyPrint", "false")
8316 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/fleets")
8317 urls += "?" + c.urlParams_.Encode()
8318 req, err := http.NewRequest("POST", urls, body)
8319 if err != nil {
8320 return nil, err
8321 }
8322 req.Header = reqHeaders
8323 googleapi.Expand(req.URL, map[string]string{
8324 "parent": c.parent,
8325 })
8326 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.create", "request", internallog.HTTPRequest(req, body.Bytes()))
8327 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8328 }
8329
8330 // Do executes the "gkehub.projects.locations.fleets.create" call.
8331 // Any non-2xx status code is an error. Response headers are in either
8332 // *Operation.ServerResponse.Header or (if a response was returned at all) in
8333 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8334 // whether the returned error was because http.StatusNotModified was returned.
8335 func (c *ProjectsLocationsFleetsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8336 gensupport.SetOptions(c.urlParams_, opts...)
8337 res, err := c.doRequest("json")
8338 if res != nil && res.StatusCode == http.StatusNotModified {
8339 if res.Body != nil {
8340 res.Body.Close()
8341 }
8342 return nil, gensupport.WrapError(&googleapi.Error{
8343 Code: res.StatusCode,
8344 Header: res.Header,
8345 })
8346 }
8347 if err != nil {
8348 return nil, err
8349 }
8350 defer googleapi.CloseBody(res)
8351 if err := googleapi.CheckResponse(res); err != nil {
8352 return nil, gensupport.WrapError(err)
8353 }
8354 ret := &Operation{
8355 ServerResponse: googleapi.ServerResponse{
8356 Header: res.Header,
8357 HTTPStatusCode: res.StatusCode,
8358 },
8359 }
8360 target := &ret
8361 b, err := gensupport.DecodeResponseBytes(target, res)
8362 if err != nil {
8363 return nil, err
8364 }
8365 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.create", "response", internallog.HTTPResponse(res, b))
8366 return ret, nil
8367 }
8368
8369 type ProjectsLocationsFleetsDeleteCall struct {
8370 s *Service
8371 name string
8372 urlParams_ gensupport.URLParams
8373 ctx_ context.Context
8374 header_ http.Header
8375 }
8376
8377 // Delete: Removes a Fleet. There must be no memberships remaining in the
8378 // Fleet.
8379 //
8380 // - name: The Fleet resource name in the format
8381 // `projects/*/locations/*/fleets/*`.
8382 func (r *ProjectsLocationsFleetsService) Delete(name string) *ProjectsLocationsFleetsDeleteCall {
8383 c := &ProjectsLocationsFleetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8384 c.name = name
8385 return c
8386 }
8387
8388 // Fields allows partial responses to be retrieved. See
8389 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8390 // details.
8391 func (c *ProjectsLocationsFleetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFleetsDeleteCall {
8392 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8393 return c
8394 }
8395
8396 // Context sets the context to be used in this call's Do method.
8397 func (c *ProjectsLocationsFleetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFleetsDeleteCall {
8398 c.ctx_ = ctx
8399 return c
8400 }
8401
8402 // Header returns a http.Header that can be modified by the caller to add
8403 // headers to the request.
8404 func (c *ProjectsLocationsFleetsDeleteCall) Header() http.Header {
8405 if c.header_ == nil {
8406 c.header_ = make(http.Header)
8407 }
8408 return c.header_
8409 }
8410
8411 func (c *ProjectsLocationsFleetsDeleteCall) doRequest(alt string) (*http.Response, error) {
8412 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8413 c.urlParams_.Set("alt", alt)
8414 c.urlParams_.Set("prettyPrint", "false")
8415 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
8416 urls += "?" + c.urlParams_.Encode()
8417 req, err := http.NewRequest("DELETE", urls, nil)
8418 if err != nil {
8419 return nil, err
8420 }
8421 req.Header = reqHeaders
8422 googleapi.Expand(req.URL, map[string]string{
8423 "name": c.name,
8424 })
8425 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.delete", "request", internallog.HTTPRequest(req, nil))
8426 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8427 }
8428
8429 // Do executes the "gkehub.projects.locations.fleets.delete" call.
8430 // Any non-2xx status code is an error. Response headers are in either
8431 // *Operation.ServerResponse.Header or (if a response was returned at all) in
8432 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8433 // whether the returned error was because http.StatusNotModified was returned.
8434 func (c *ProjectsLocationsFleetsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8435 gensupport.SetOptions(c.urlParams_, opts...)
8436 res, err := c.doRequest("json")
8437 if res != nil && res.StatusCode == http.StatusNotModified {
8438 if res.Body != nil {
8439 res.Body.Close()
8440 }
8441 return nil, gensupport.WrapError(&googleapi.Error{
8442 Code: res.StatusCode,
8443 Header: res.Header,
8444 })
8445 }
8446 if err != nil {
8447 return nil, err
8448 }
8449 defer googleapi.CloseBody(res)
8450 if err := googleapi.CheckResponse(res); err != nil {
8451 return nil, gensupport.WrapError(err)
8452 }
8453 ret := &Operation{
8454 ServerResponse: googleapi.ServerResponse{
8455 Header: res.Header,
8456 HTTPStatusCode: res.StatusCode,
8457 },
8458 }
8459 target := &ret
8460 b, err := gensupport.DecodeResponseBytes(target, res)
8461 if err != nil {
8462 return nil, err
8463 }
8464 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.delete", "response", internallog.HTTPResponse(res, b))
8465 return ret, nil
8466 }
8467
8468 type ProjectsLocationsFleetsGetCall struct {
8469 s *Service
8470 name string
8471 urlParams_ gensupport.URLParams
8472 ifNoneMatch_ string
8473 ctx_ context.Context
8474 header_ http.Header
8475 }
8476
8477 // Get: Returns the details of a fleet.
8478 //
8479 // - name: The Fleet resource name in the format
8480 // `projects/*/locations/*/fleets/*`.
8481 func (r *ProjectsLocationsFleetsService) Get(name string) *ProjectsLocationsFleetsGetCall {
8482 c := &ProjectsLocationsFleetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8483 c.name = name
8484 return c
8485 }
8486
8487 // Fields allows partial responses to be retrieved. See
8488 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8489 // details.
8490 func (c *ProjectsLocationsFleetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFleetsGetCall {
8491 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8492 return c
8493 }
8494
8495 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8496 // object's ETag matches the given value. This is useful for getting updates
8497 // only after the object has changed since the last request.
8498 func (c *ProjectsLocationsFleetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFleetsGetCall {
8499 c.ifNoneMatch_ = entityTag
8500 return c
8501 }
8502
8503 // Context sets the context to be used in this call's Do method.
8504 func (c *ProjectsLocationsFleetsGetCall) Context(ctx context.Context) *ProjectsLocationsFleetsGetCall {
8505 c.ctx_ = ctx
8506 return c
8507 }
8508
8509 // Header returns a http.Header that can be modified by the caller to add
8510 // headers to the request.
8511 func (c *ProjectsLocationsFleetsGetCall) Header() http.Header {
8512 if c.header_ == nil {
8513 c.header_ = make(http.Header)
8514 }
8515 return c.header_
8516 }
8517
8518 func (c *ProjectsLocationsFleetsGetCall) doRequest(alt string) (*http.Response, error) {
8519 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8520 if c.ifNoneMatch_ != "" {
8521 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8522 }
8523 c.urlParams_.Set("alt", alt)
8524 c.urlParams_.Set("prettyPrint", "false")
8525 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
8526 urls += "?" + c.urlParams_.Encode()
8527 req, err := http.NewRequest("GET", urls, nil)
8528 if err != nil {
8529 return nil, err
8530 }
8531 req.Header = reqHeaders
8532 googleapi.Expand(req.URL, map[string]string{
8533 "name": c.name,
8534 })
8535 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.get", "request", internallog.HTTPRequest(req, nil))
8536 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8537 }
8538
8539 // Do executes the "gkehub.projects.locations.fleets.get" call.
8540 // Any non-2xx status code is an error. Response headers are in either
8541 // *Fleet.ServerResponse.Header or (if a response was returned at all) in
8542 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8543 // whether the returned error was because http.StatusNotModified was returned.
8544 func (c *ProjectsLocationsFleetsGetCall) Do(opts ...googleapi.CallOption) (*Fleet, error) {
8545 gensupport.SetOptions(c.urlParams_, opts...)
8546 res, err := c.doRequest("json")
8547 if res != nil && res.StatusCode == http.StatusNotModified {
8548 if res.Body != nil {
8549 res.Body.Close()
8550 }
8551 return nil, gensupport.WrapError(&googleapi.Error{
8552 Code: res.StatusCode,
8553 Header: res.Header,
8554 })
8555 }
8556 if err != nil {
8557 return nil, err
8558 }
8559 defer googleapi.CloseBody(res)
8560 if err := googleapi.CheckResponse(res); err != nil {
8561 return nil, gensupport.WrapError(err)
8562 }
8563 ret := &Fleet{
8564 ServerResponse: googleapi.ServerResponse{
8565 Header: res.Header,
8566 HTTPStatusCode: res.StatusCode,
8567 },
8568 }
8569 target := &ret
8570 b, err := gensupport.DecodeResponseBytes(target, res)
8571 if err != nil {
8572 return nil, err
8573 }
8574 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.get", "response", internallog.HTTPResponse(res, b))
8575 return ret, nil
8576 }
8577
8578 type ProjectsLocationsFleetsListCall struct {
8579 s *Service
8580 parent string
8581 urlParams_ gensupport.URLParams
8582 ifNoneMatch_ string
8583 ctx_ context.Context
8584 header_ http.Header
8585 }
8586
8587 // List: Returns all fleets within an organization or a project that the caller
8588 // has access to.
8589 //
8590 // - parent: The organization or project to list for Fleets under, in the
8591 // format `organizations/*/locations/*` or `projects/*/locations/*`.
8592 func (r *ProjectsLocationsFleetsService) List(parent string) *ProjectsLocationsFleetsListCall {
8593 c := &ProjectsLocationsFleetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8594 c.parent = parent
8595 return c
8596 }
8597
8598 // PageSize sets the optional parameter "pageSize": The maximum number of
8599 // fleets to return. The service may return fewer than this value. If
8600 // unspecified, at most 200 fleets will be returned. The maximum value is 1000;
8601 // values above 1000 will be coerced to 1000.
8602 func (c *ProjectsLocationsFleetsListCall) PageSize(pageSize int64) *ProjectsLocationsFleetsListCall {
8603 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8604 return c
8605 }
8606
8607 // PageToken sets the optional parameter "pageToken": A page token, received
8608 // from a previous `ListFleets` call. Provide this to retrieve the subsequent
8609 // page. When paginating, all other parameters provided to `ListFleets` must
8610 // match the call that provided the page token.
8611 func (c *ProjectsLocationsFleetsListCall) PageToken(pageToken string) *ProjectsLocationsFleetsListCall {
8612 c.urlParams_.Set("pageToken", pageToken)
8613 return c
8614 }
8615
8616 // Fields allows partial responses to be retrieved. See
8617 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8618 // details.
8619 func (c *ProjectsLocationsFleetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFleetsListCall {
8620 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8621 return c
8622 }
8623
8624 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8625 // object's ETag matches the given value. This is useful for getting updates
8626 // only after the object has changed since the last request.
8627 func (c *ProjectsLocationsFleetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFleetsListCall {
8628 c.ifNoneMatch_ = entityTag
8629 return c
8630 }
8631
8632 // Context sets the context to be used in this call's Do method.
8633 func (c *ProjectsLocationsFleetsListCall) Context(ctx context.Context) *ProjectsLocationsFleetsListCall {
8634 c.ctx_ = ctx
8635 return c
8636 }
8637
8638 // Header returns a http.Header that can be modified by the caller to add
8639 // headers to the request.
8640 func (c *ProjectsLocationsFleetsListCall) Header() http.Header {
8641 if c.header_ == nil {
8642 c.header_ = make(http.Header)
8643 }
8644 return c.header_
8645 }
8646
8647 func (c *ProjectsLocationsFleetsListCall) doRequest(alt string) (*http.Response, error) {
8648 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8649 if c.ifNoneMatch_ != "" {
8650 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8651 }
8652 c.urlParams_.Set("alt", alt)
8653 c.urlParams_.Set("prettyPrint", "false")
8654 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/fleets")
8655 urls += "?" + c.urlParams_.Encode()
8656 req, err := http.NewRequest("GET", urls, nil)
8657 if err != nil {
8658 return nil, err
8659 }
8660 req.Header = reqHeaders
8661 googleapi.Expand(req.URL, map[string]string{
8662 "parent": c.parent,
8663 })
8664 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.list", "request", internallog.HTTPRequest(req, nil))
8665 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8666 }
8667
8668 // Do executes the "gkehub.projects.locations.fleets.list" call.
8669 // Any non-2xx status code is an error. Response headers are in either
8670 // *ListFleetsResponse.ServerResponse.Header or (if a response was returned at
8671 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8672 // check whether the returned error was because http.StatusNotModified was
8673 // returned.
8674 func (c *ProjectsLocationsFleetsListCall) Do(opts ...googleapi.CallOption) (*ListFleetsResponse, error) {
8675 gensupport.SetOptions(c.urlParams_, opts...)
8676 res, err := c.doRequest("json")
8677 if res != nil && res.StatusCode == http.StatusNotModified {
8678 if res.Body != nil {
8679 res.Body.Close()
8680 }
8681 return nil, gensupport.WrapError(&googleapi.Error{
8682 Code: res.StatusCode,
8683 Header: res.Header,
8684 })
8685 }
8686 if err != nil {
8687 return nil, err
8688 }
8689 defer googleapi.CloseBody(res)
8690 if err := googleapi.CheckResponse(res); err != nil {
8691 return nil, gensupport.WrapError(err)
8692 }
8693 ret := &ListFleetsResponse{
8694 ServerResponse: googleapi.ServerResponse{
8695 Header: res.Header,
8696 HTTPStatusCode: res.StatusCode,
8697 },
8698 }
8699 target := &ret
8700 b, err := gensupport.DecodeResponseBytes(target, res)
8701 if err != nil {
8702 return nil, err
8703 }
8704 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.list", "response", internallog.HTTPResponse(res, b))
8705 return ret, nil
8706 }
8707
8708 // Pages invokes f for each page of results.
8709 // A non-nil error returned from f will halt the iteration.
8710 // The provided context supersedes any context provided to the Context method.
8711 func (c *ProjectsLocationsFleetsListCall) Pages(ctx context.Context, f func(*ListFleetsResponse) error) error {
8712 c.ctx_ = ctx
8713 defer c.PageToken(c.urlParams_.Get("pageToken"))
8714 for {
8715 x, err := c.Do()
8716 if err != nil {
8717 return err
8718 }
8719 if err := f(x); err != nil {
8720 return err
8721 }
8722 if x.NextPageToken == "" {
8723 return nil
8724 }
8725 c.PageToken(x.NextPageToken)
8726 }
8727 }
8728
8729 type ProjectsLocationsFleetsPatchCall struct {
8730 s *Service
8731 name string
8732 fleet *Fleet
8733 urlParams_ gensupport.URLParams
8734 ctx_ context.Context
8735 header_ http.Header
8736 }
8737
8738 // Patch: Updates a fleet.
8739 //
8740 // - name: Output only. The full, unique resource name of this fleet in the
8741 // format of `projects/{project}/locations/{location}/fleets/{fleet}`. Each
8742 // Google Cloud project can have at most one fleet resource, named "default".
8743 func (r *ProjectsLocationsFleetsService) Patch(name string, fleet *Fleet) *ProjectsLocationsFleetsPatchCall {
8744 c := &ProjectsLocationsFleetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8745 c.name = name
8746 c.fleet = fleet
8747 return c
8748 }
8749
8750 // UpdateMask sets the optional parameter "updateMask": Required. The fields to
8751 // be updated;
8752 func (c *ProjectsLocationsFleetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFleetsPatchCall {
8753 c.urlParams_.Set("updateMask", updateMask)
8754 return c
8755 }
8756
8757 // Fields allows partial responses to be retrieved. See
8758 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8759 // details.
8760 func (c *ProjectsLocationsFleetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFleetsPatchCall {
8761 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8762 return c
8763 }
8764
8765 // Context sets the context to be used in this call's Do method.
8766 func (c *ProjectsLocationsFleetsPatchCall) Context(ctx context.Context) *ProjectsLocationsFleetsPatchCall {
8767 c.ctx_ = ctx
8768 return c
8769 }
8770
8771 // Header returns a http.Header that can be modified by the caller to add
8772 // headers to the request.
8773 func (c *ProjectsLocationsFleetsPatchCall) Header() http.Header {
8774 if c.header_ == nil {
8775 c.header_ = make(http.Header)
8776 }
8777 return c.header_
8778 }
8779
8780 func (c *ProjectsLocationsFleetsPatchCall) doRequest(alt string) (*http.Response, error) {
8781 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8782 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.fleet)
8783 if err != nil {
8784 return nil, err
8785 }
8786 c.urlParams_.Set("alt", alt)
8787 c.urlParams_.Set("prettyPrint", "false")
8788 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
8789 urls += "?" + c.urlParams_.Encode()
8790 req, err := http.NewRequest("PATCH", urls, body)
8791 if err != nil {
8792 return nil, err
8793 }
8794 req.Header = reqHeaders
8795 googleapi.Expand(req.URL, map[string]string{
8796 "name": c.name,
8797 })
8798 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
8799 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8800 }
8801
8802 // Do executes the "gkehub.projects.locations.fleets.patch" call.
8803 // Any non-2xx status code is an error. Response headers are in either
8804 // *Operation.ServerResponse.Header or (if a response was returned at all) in
8805 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8806 // whether the returned error was because http.StatusNotModified was returned.
8807 func (c *ProjectsLocationsFleetsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8808 gensupport.SetOptions(c.urlParams_, opts...)
8809 res, err := c.doRequest("json")
8810 if res != nil && res.StatusCode == http.StatusNotModified {
8811 if res.Body != nil {
8812 res.Body.Close()
8813 }
8814 return nil, gensupport.WrapError(&googleapi.Error{
8815 Code: res.StatusCode,
8816 Header: res.Header,
8817 })
8818 }
8819 if err != nil {
8820 return nil, err
8821 }
8822 defer googleapi.CloseBody(res)
8823 if err := googleapi.CheckResponse(res); err != nil {
8824 return nil, gensupport.WrapError(err)
8825 }
8826 ret := &Operation{
8827 ServerResponse: googleapi.ServerResponse{
8828 Header: res.Header,
8829 HTTPStatusCode: res.StatusCode,
8830 },
8831 }
8832 target := &ret
8833 b, err := gensupport.DecodeResponseBytes(target, res)
8834 if err != nil {
8835 return nil, err
8836 }
8837 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.patch", "response", internallog.HTTPResponse(res, b))
8838 return ret, nil
8839 }
8840
8841 type ProjectsLocationsMembershipsCreateCall struct {
8842 s *Service
8843 parent string
8844 membership *Membership
8845 urlParams_ gensupport.URLParams
8846 ctx_ context.Context
8847 header_ http.Header
8848 }
8849
8850 // Create: Creates a new Membership. **This is currently only supported for GKE
8851 // clusters on Google Cloud**. To register other clusters, follow the
8852 // instructions at
8853 // https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
8854 //
8855 // - parent: The parent (project and location) where the Memberships will be
8856 // created. Specified in the format `projects/*/locations/*`.
8857 func (r *ProjectsLocationsMembershipsService) Create(parent string, membership *Membership) *ProjectsLocationsMembershipsCreateCall {
8858 c := &ProjectsLocationsMembershipsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8859 c.parent = parent
8860 c.membership = membership
8861 return c
8862 }
8863
8864 // MembershipId sets the optional parameter "membershipId": Required. Client
8865 // chosen ID for the membership. `membership_id` must be a valid RFC 1123
8866 // compliant DNS label: 1. At most 63 characters in length 2. It must consist
8867 // of lower case alphanumeric characters or `-` 3. It must start and end with
8868 // an alphanumeric character Which can be expressed as the regex:
8869 // `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
8870 func (c *ProjectsLocationsMembershipsCreateCall) MembershipId(membershipId string) *ProjectsLocationsMembershipsCreateCall {
8871 c.urlParams_.Set("membershipId", membershipId)
8872 return c
8873 }
8874
8875 // RequestId sets the optional parameter "requestId": A request ID to identify
8876 // requests. Specify a unique request ID so that if you must retry your
8877 // request, the server will know to ignore the request if it has already been
8878 // completed. The server will guarantee that for at least 60 minutes after the
8879 // first request. For example, consider a situation where you make an initial
8880 // request and the request times out. If you make the request again with the
8881 // same request ID, the server can check if original operation with the same
8882 // request ID was received, and if so, will ignore the second request. This
8883 // prevents clients from accidentally creating duplicate commitments. The
8884 // request ID must be a valid UUID with the exception that zero UUID is not
8885 // supported (00000000-0000-0000-0000-000000000000).
8886 func (c *ProjectsLocationsMembershipsCreateCall) RequestId(requestId string) *ProjectsLocationsMembershipsCreateCall {
8887 c.urlParams_.Set("requestId", requestId)
8888 return c
8889 }
8890
8891 // Fields allows partial responses to be retrieved. See
8892 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8893 // details.
8894 func (c *ProjectsLocationsMembershipsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsCreateCall {
8895 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8896 return c
8897 }
8898
8899 // Context sets the context to be used in this call's Do method.
8900 func (c *ProjectsLocationsMembershipsCreateCall) Context(ctx context.Context) *ProjectsLocationsMembershipsCreateCall {
8901 c.ctx_ = ctx
8902 return c
8903 }
8904
8905 // Header returns a http.Header that can be modified by the caller to add
8906 // headers to the request.
8907 func (c *ProjectsLocationsMembershipsCreateCall) Header() http.Header {
8908 if c.header_ == nil {
8909 c.header_ = make(http.Header)
8910 }
8911 return c.header_
8912 }
8913
8914 func (c *ProjectsLocationsMembershipsCreateCall) doRequest(alt string) (*http.Response, error) {
8915 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8916 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.membership)
8917 if err != nil {
8918 return nil, err
8919 }
8920 c.urlParams_.Set("alt", alt)
8921 c.urlParams_.Set("prettyPrint", "false")
8922 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/memberships")
8923 urls += "?" + c.urlParams_.Encode()
8924 req, err := http.NewRequest("POST", urls, body)
8925 if err != nil {
8926 return nil, err
8927 }
8928 req.Header = reqHeaders
8929 googleapi.Expand(req.URL, map[string]string{
8930 "parent": c.parent,
8931 })
8932 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.create", "request", internallog.HTTPRequest(req, body.Bytes()))
8933 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8934 }
8935
8936 // Do executes the "gkehub.projects.locations.memberships.create" call.
8937 // Any non-2xx status code is an error. Response headers are in either
8938 // *Operation.ServerResponse.Header or (if a response was returned at all) in
8939 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8940 // whether the returned error was because http.StatusNotModified was returned.
8941 func (c *ProjectsLocationsMembershipsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8942 gensupport.SetOptions(c.urlParams_, opts...)
8943 res, err := c.doRequest("json")
8944 if res != nil && res.StatusCode == http.StatusNotModified {
8945 if res.Body != nil {
8946 res.Body.Close()
8947 }
8948 return nil, gensupport.WrapError(&googleapi.Error{
8949 Code: res.StatusCode,
8950 Header: res.Header,
8951 })
8952 }
8953 if err != nil {
8954 return nil, err
8955 }
8956 defer googleapi.CloseBody(res)
8957 if err := googleapi.CheckResponse(res); err != nil {
8958 return nil, gensupport.WrapError(err)
8959 }
8960 ret := &Operation{
8961 ServerResponse: googleapi.ServerResponse{
8962 Header: res.Header,
8963 HTTPStatusCode: res.StatusCode,
8964 },
8965 }
8966 target := &ret
8967 b, err := gensupport.DecodeResponseBytes(target, res)
8968 if err != nil {
8969 return nil, err
8970 }
8971 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.create", "response", internallog.HTTPResponse(res, b))
8972 return ret, nil
8973 }
8974
8975 type ProjectsLocationsMembershipsDeleteCall struct {
8976 s *Service
8977 name string
8978 urlParams_ gensupport.URLParams
8979 ctx_ context.Context
8980 header_ http.Header
8981 }
8982
8983 // Delete: Removes a Membership. **This is currently only supported for GKE
8984 // clusters on Google Cloud**. To unregister other clusters, follow the
8985 // instructions at
8986 // https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
8987 //
8988 // - name: The Membership resource name in the format
8989 // `projects/*/locations/*/memberships/*`.
8990 func (r *ProjectsLocationsMembershipsService) Delete(name string) *ProjectsLocationsMembershipsDeleteCall {
8991 c := &ProjectsLocationsMembershipsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8992 c.name = name
8993 return c
8994 }
8995
8996 // Force sets the optional parameter "force": If set to true, any subresource
8997 // from this Membership will also be deleted. Otherwise, the request will only
8998 // work if the Membership has no subresource.
8999 func (c *ProjectsLocationsMembershipsDeleteCall) Force(force bool) *ProjectsLocationsMembershipsDeleteCall {
9000 c.urlParams_.Set("force", fmt.Sprint(force))
9001 return c
9002 }
9003
9004 // RequestId sets the optional parameter "requestId": A request ID to identify
9005 // requests. Specify a unique request ID so that if you must retry your
9006 // request, the server will know to ignore the request if it has already been
9007 // completed. The server will guarantee that for at least 60 minutes after the
9008 // first request. For example, consider a situation where you make an initial
9009 // request and the request times out. If you make the request again with the
9010 // same request ID, the server can check if original operation with the same
9011 // request ID was received, and if so, will ignore the second request. This
9012 // prevents clients from accidentally creating duplicate commitments. The
9013 // request ID must be a valid UUID with the exception that zero UUID is not
9014 // supported (00000000-0000-0000-0000-000000000000).
9015 func (c *ProjectsLocationsMembershipsDeleteCall) RequestId(requestId string) *ProjectsLocationsMembershipsDeleteCall {
9016 c.urlParams_.Set("requestId", requestId)
9017 return c
9018 }
9019
9020 // Fields allows partial responses to be retrieved. See
9021 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9022 // details.
9023 func (c *ProjectsLocationsMembershipsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsDeleteCall {
9024 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9025 return c
9026 }
9027
9028 // Context sets the context to be used in this call's Do method.
9029 func (c *ProjectsLocationsMembershipsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMembershipsDeleteCall {
9030 c.ctx_ = ctx
9031 return c
9032 }
9033
9034 // Header returns a http.Header that can be modified by the caller to add
9035 // headers to the request.
9036 func (c *ProjectsLocationsMembershipsDeleteCall) Header() http.Header {
9037 if c.header_ == nil {
9038 c.header_ = make(http.Header)
9039 }
9040 return c.header_
9041 }
9042
9043 func (c *ProjectsLocationsMembershipsDeleteCall) doRequest(alt string) (*http.Response, error) {
9044 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9045 c.urlParams_.Set("alt", alt)
9046 c.urlParams_.Set("prettyPrint", "false")
9047 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
9048 urls += "?" + c.urlParams_.Encode()
9049 req, err := http.NewRequest("DELETE", urls, nil)
9050 if err != nil {
9051 return nil, err
9052 }
9053 req.Header = reqHeaders
9054 googleapi.Expand(req.URL, map[string]string{
9055 "name": c.name,
9056 })
9057 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.delete", "request", internallog.HTTPRequest(req, nil))
9058 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9059 }
9060
9061 // Do executes the "gkehub.projects.locations.memberships.delete" call.
9062 // Any non-2xx status code is an error. Response headers are in either
9063 // *Operation.ServerResponse.Header or (if a response was returned at all) in
9064 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9065 // whether the returned error was because http.StatusNotModified was returned.
9066 func (c *ProjectsLocationsMembershipsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9067 gensupport.SetOptions(c.urlParams_, opts...)
9068 res, err := c.doRequest("json")
9069 if res != nil && res.StatusCode == http.StatusNotModified {
9070 if res.Body != nil {
9071 res.Body.Close()
9072 }
9073 return nil, gensupport.WrapError(&googleapi.Error{
9074 Code: res.StatusCode,
9075 Header: res.Header,
9076 })
9077 }
9078 if err != nil {
9079 return nil, err
9080 }
9081 defer googleapi.CloseBody(res)
9082 if err := googleapi.CheckResponse(res); err != nil {
9083 return nil, gensupport.WrapError(err)
9084 }
9085 ret := &Operation{
9086 ServerResponse: googleapi.ServerResponse{
9087 Header: res.Header,
9088 HTTPStatusCode: res.StatusCode,
9089 },
9090 }
9091 target := &ret
9092 b, err := gensupport.DecodeResponseBytes(target, res)
9093 if err != nil {
9094 return nil, err
9095 }
9096 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.delete", "response", internallog.HTTPResponse(res, b))
9097 return ret, nil
9098 }
9099
9100 type ProjectsLocationsMembershipsGenerateConnectManifestCall struct {
9101 s *Service
9102 name string
9103 urlParams_ gensupport.URLParams
9104 ifNoneMatch_ string
9105 ctx_ context.Context
9106 header_ http.Header
9107 }
9108
9109 // GenerateConnectManifest: Generates the manifest for deployment of the GKE
9110 // connect agent. **This method is used internally by Google-provided
9111 // libraries.** Most clients should not need to call this method directly.
9112 //
9113 // - name: The Membership resource name the Agent will associate with, in the
9114 // format `projects/*/locations/*/memberships/*`.
9115 func (r *ProjectsLocationsMembershipsService) GenerateConnectManifest(name string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9116 c := &ProjectsLocationsMembershipsGenerateConnectManifestCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9117 c.name = name
9118 return c
9119 }
9120
9121 // ImagePullSecretContent sets the optional parameter "imagePullSecretContent":
9122 // The image pull secret content for the registry, if not public.
9123 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) ImagePullSecretContent(imagePullSecretContent string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9124 c.urlParams_.Set("imagePullSecretContent", imagePullSecretContent)
9125 return c
9126 }
9127
9128 // IsUpgrade sets the optional parameter "isUpgrade": If true, generate the
9129 // resources for upgrade only. Some resources generated only for installation
9130 // (e.g. secrets) will be excluded.
9131 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) IsUpgrade(isUpgrade bool) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9132 c.urlParams_.Set("isUpgrade", fmt.Sprint(isUpgrade))
9133 return c
9134 }
9135
9136 // Namespace sets the optional parameter "namespace": Namespace for GKE Connect
9137 // agent resources. Defaults to `gke-connect`. The Connect Agent is authorized
9138 // automatically when run in the default namespace. Otherwise, explicit
9139 // authorization must be granted with an additional IAM binding.
9140 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Namespace(namespace string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9141 c.urlParams_.Set("namespace", namespace)
9142 return c
9143 }
9144
9145 // Proxy sets the optional parameter "proxy": URI of a proxy if connectivity
9146 // from the agent to gkeconnect.googleapis.com requires the use of a proxy.
9147 // Format must be in the form `http(s)://{proxy_address}`, depending on the
9148 // HTTP/HTTPS protocol supported by the proxy. This will direct the connect
9149 // agent's outbound traffic through a HTTP(S) proxy.
9150 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Proxy(proxy string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9151 c.urlParams_.Set("proxy", proxy)
9152 return c
9153 }
9154
9155 // Registry sets the optional parameter "registry": The registry to fetch the
9156 // connect agent image from. Defaults to gcr.io/gkeconnect.
9157 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Registry(registry string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9158 c.urlParams_.Set("registry", registry)
9159 return c
9160 }
9161
9162 // Version sets the optional parameter "version": The Connect agent version to
9163 // use. Defaults to the most current version.
9164 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Version(version string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9165 c.urlParams_.Set("version", version)
9166 return c
9167 }
9168
9169 // Fields allows partial responses to be retrieved. See
9170 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9171 // details.
9172 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9173 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9174 return c
9175 }
9176
9177 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9178 // object's ETag matches the given value. This is useful for getting updates
9179 // only after the object has changed since the last request.
9180 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9181 c.ifNoneMatch_ = entityTag
9182 return c
9183 }
9184
9185 // Context sets the context to be used in this call's Do method.
9186 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Context(ctx context.Context) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9187 c.ctx_ = ctx
9188 return c
9189 }
9190
9191 // Header returns a http.Header that can be modified by the caller to add
9192 // headers to the request.
9193 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Header() http.Header {
9194 if c.header_ == nil {
9195 c.header_ = make(http.Header)
9196 }
9197 return c.header_
9198 }
9199
9200 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) doRequest(alt string) (*http.Response, error) {
9201 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9202 if c.ifNoneMatch_ != "" {
9203 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9204 }
9205 c.urlParams_.Set("alt", alt)
9206 c.urlParams_.Set("prettyPrint", "false")
9207 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:generateConnectManifest")
9208 urls += "?" + c.urlParams_.Encode()
9209 req, err := http.NewRequest("GET", urls, nil)
9210 if err != nil {
9211 return nil, err
9212 }
9213 req.Header = reqHeaders
9214 googleapi.Expand(req.URL, map[string]string{
9215 "name": c.name,
9216 })
9217 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.generateConnectManifest", "request", internallog.HTTPRequest(req, nil))
9218 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9219 }
9220
9221 // Do executes the "gkehub.projects.locations.memberships.generateConnectManifest" call.
9222 // Any non-2xx status code is an error. Response headers are in either
9223 // *GenerateConnectManifestResponse.ServerResponse.Header or (if a response was
9224 // returned at all) in error.(*googleapi.Error).Header. Use
9225 // googleapi.IsNotModified to check whether the returned error was because
9226 // http.StatusNotModified was returned.
9227 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Do(opts ...googleapi.CallOption) (*GenerateConnectManifestResponse, error) {
9228 gensupport.SetOptions(c.urlParams_, opts...)
9229 res, err := c.doRequest("json")
9230 if res != nil && res.StatusCode == http.StatusNotModified {
9231 if res.Body != nil {
9232 res.Body.Close()
9233 }
9234 return nil, gensupport.WrapError(&googleapi.Error{
9235 Code: res.StatusCode,
9236 Header: res.Header,
9237 })
9238 }
9239 if err != nil {
9240 return nil, err
9241 }
9242 defer googleapi.CloseBody(res)
9243 if err := googleapi.CheckResponse(res); err != nil {
9244 return nil, gensupport.WrapError(err)
9245 }
9246 ret := &GenerateConnectManifestResponse{
9247 ServerResponse: googleapi.ServerResponse{
9248 Header: res.Header,
9249 HTTPStatusCode: res.StatusCode,
9250 },
9251 }
9252 target := &ret
9253 b, err := gensupport.DecodeResponseBytes(target, res)
9254 if err != nil {
9255 return nil, err
9256 }
9257 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.generateConnectManifest", "response", internallog.HTTPResponse(res, b))
9258 return ret, nil
9259 }
9260
9261 type ProjectsLocationsMembershipsGetCall struct {
9262 s *Service
9263 name string
9264 urlParams_ gensupport.URLParams
9265 ifNoneMatch_ string
9266 ctx_ context.Context
9267 header_ http.Header
9268 }
9269
9270 // Get: Gets the details of a Membership.
9271 //
9272 // - name: The Membership resource name in the format
9273 // `projects/*/locations/*/memberships/*`.
9274 func (r *ProjectsLocationsMembershipsService) Get(name string) *ProjectsLocationsMembershipsGetCall {
9275 c := &ProjectsLocationsMembershipsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9276 c.name = name
9277 return c
9278 }
9279
9280 // Fields allows partial responses to be retrieved. See
9281 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9282 // details.
9283 func (c *ProjectsLocationsMembershipsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsGetCall {
9284 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9285 return c
9286 }
9287
9288 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9289 // object's ETag matches the given value. This is useful for getting updates
9290 // only after the object has changed since the last request.
9291 func (c *ProjectsLocationsMembershipsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsGetCall {
9292 c.ifNoneMatch_ = entityTag
9293 return c
9294 }
9295
9296 // Context sets the context to be used in this call's Do method.
9297 func (c *ProjectsLocationsMembershipsGetCall) Context(ctx context.Context) *ProjectsLocationsMembershipsGetCall {
9298 c.ctx_ = ctx
9299 return c
9300 }
9301
9302 // Header returns a http.Header that can be modified by the caller to add
9303 // headers to the request.
9304 func (c *ProjectsLocationsMembershipsGetCall) Header() http.Header {
9305 if c.header_ == nil {
9306 c.header_ = make(http.Header)
9307 }
9308 return c.header_
9309 }
9310
9311 func (c *ProjectsLocationsMembershipsGetCall) doRequest(alt string) (*http.Response, error) {
9312 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9313 if c.ifNoneMatch_ != "" {
9314 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9315 }
9316 c.urlParams_.Set("alt", alt)
9317 c.urlParams_.Set("prettyPrint", "false")
9318 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
9319 urls += "?" + c.urlParams_.Encode()
9320 req, err := http.NewRequest("GET", urls, nil)
9321 if err != nil {
9322 return nil, err
9323 }
9324 req.Header = reqHeaders
9325 googleapi.Expand(req.URL, map[string]string{
9326 "name": c.name,
9327 })
9328 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.get", "request", internallog.HTTPRequest(req, nil))
9329 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9330 }
9331
9332 // Do executes the "gkehub.projects.locations.memberships.get" call.
9333 // Any non-2xx status code is an error. Response headers are in either
9334 // *Membership.ServerResponse.Header or (if a response was returned at all) in
9335 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9336 // whether the returned error was because http.StatusNotModified was returned.
9337 func (c *ProjectsLocationsMembershipsGetCall) Do(opts ...googleapi.CallOption) (*Membership, error) {
9338 gensupport.SetOptions(c.urlParams_, opts...)
9339 res, err := c.doRequest("json")
9340 if res != nil && res.StatusCode == http.StatusNotModified {
9341 if res.Body != nil {
9342 res.Body.Close()
9343 }
9344 return nil, gensupport.WrapError(&googleapi.Error{
9345 Code: res.StatusCode,
9346 Header: res.Header,
9347 })
9348 }
9349 if err != nil {
9350 return nil, err
9351 }
9352 defer googleapi.CloseBody(res)
9353 if err := googleapi.CheckResponse(res); err != nil {
9354 return nil, gensupport.WrapError(err)
9355 }
9356 ret := &Membership{
9357 ServerResponse: googleapi.ServerResponse{
9358 Header: res.Header,
9359 HTTPStatusCode: res.StatusCode,
9360 },
9361 }
9362 target := &ret
9363 b, err := gensupport.DecodeResponseBytes(target, res)
9364 if err != nil {
9365 return nil, err
9366 }
9367 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.get", "response", internallog.HTTPResponse(res, b))
9368 return ret, nil
9369 }
9370
9371 type ProjectsLocationsMembershipsGetIamPolicyCall struct {
9372 s *Service
9373 resource string
9374 urlParams_ gensupport.URLParams
9375 ifNoneMatch_ string
9376 ctx_ context.Context
9377 header_ http.Header
9378 }
9379
9380 // GetIamPolicy: Gets the access control policy for a resource. Returns an
9381 // empty policy if the resource exists and does not have a policy set.
9382 //
9383 // - resource: REQUIRED: The resource for which the policy is being requested.
9384 // See Resource names (https://cloud.google.com/apis/design/resource_names)
9385 // for the appropriate value for this field.
9386 func (r *ProjectsLocationsMembershipsService) GetIamPolicy(resource string) *ProjectsLocationsMembershipsGetIamPolicyCall {
9387 c := &ProjectsLocationsMembershipsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9388 c.resource = resource
9389 return c
9390 }
9391
9392 // OptionsRequestedPolicyVersion sets the optional parameter
9393 // "options.requestedPolicyVersion": The maximum policy version that will be
9394 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
9395 // an invalid value will be rejected. Requests for policies with any
9396 // conditional role bindings must specify version 3. Policies with no
9397 // conditional role bindings may specify any valid value or leave the field
9398 // unset. The policy in the response might use the policy version that you
9399 // specified, or it might use a lower policy version. For example, if you
9400 // specify version 3, but the policy has no conditional role bindings, the
9401 // response uses version 1. To learn which resources support conditions in
9402 // their IAM policies, see the IAM documentation
9403 // (https://cloud.google.com/iam/help/conditions/resource-policies).
9404 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsMembershipsGetIamPolicyCall {
9405 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
9406 return c
9407 }
9408
9409 // Fields allows partial responses to be retrieved. See
9410 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9411 // details.
9412 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsGetIamPolicyCall {
9413 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9414 return c
9415 }
9416
9417 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9418 // object's ETag matches the given value. This is useful for getting updates
9419 // only after the object has changed since the last request.
9420 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsGetIamPolicyCall {
9421 c.ifNoneMatch_ = entityTag
9422 return c
9423 }
9424
9425 // Context sets the context to be used in this call's Do method.
9426 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMembershipsGetIamPolicyCall {
9427 c.ctx_ = ctx
9428 return c
9429 }
9430
9431 // Header returns a http.Header that can be modified by the caller to add
9432 // headers to the request.
9433 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) Header() http.Header {
9434 if c.header_ == nil {
9435 c.header_ = make(http.Header)
9436 }
9437 return c.header_
9438 }
9439
9440 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9441 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9442 if c.ifNoneMatch_ != "" {
9443 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9444 }
9445 c.urlParams_.Set("alt", alt)
9446 c.urlParams_.Set("prettyPrint", "false")
9447 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:getIamPolicy")
9448 urls += "?" + c.urlParams_.Encode()
9449 req, err := http.NewRequest("GET", urls, nil)
9450 if err != nil {
9451 return nil, err
9452 }
9453 req.Header = reqHeaders
9454 googleapi.Expand(req.URL, map[string]string{
9455 "resource": c.resource,
9456 })
9457 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
9458 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9459 }
9460
9461 // Do executes the "gkehub.projects.locations.memberships.getIamPolicy" call.
9462 // Any non-2xx status code is an error. Response headers are in either
9463 // *Policy.ServerResponse.Header or (if a response was returned at all) in
9464 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9465 // whether the returned error was because http.StatusNotModified was returned.
9466 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
9467 gensupport.SetOptions(c.urlParams_, opts...)
9468 res, err := c.doRequest("json")
9469 if res != nil && res.StatusCode == http.StatusNotModified {
9470 if res.Body != nil {
9471 res.Body.Close()
9472 }
9473 return nil, gensupport.WrapError(&googleapi.Error{
9474 Code: res.StatusCode,
9475 Header: res.Header,
9476 })
9477 }
9478 if err != nil {
9479 return nil, err
9480 }
9481 defer googleapi.CloseBody(res)
9482 if err := googleapi.CheckResponse(res); err != nil {
9483 return nil, gensupport.WrapError(err)
9484 }
9485 ret := &Policy{
9486 ServerResponse: googleapi.ServerResponse{
9487 Header: res.Header,
9488 HTTPStatusCode: res.StatusCode,
9489 },
9490 }
9491 target := &ret
9492 b, err := gensupport.DecodeResponseBytes(target, res)
9493 if err != nil {
9494 return nil, err
9495 }
9496 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.getIamPolicy", "response", internallog.HTTPResponse(res, b))
9497 return ret, nil
9498 }
9499
9500 type ProjectsLocationsMembershipsListCall struct {
9501 s *Service
9502 parent string
9503 urlParams_ gensupport.URLParams
9504 ifNoneMatch_ string
9505 ctx_ context.Context
9506 header_ http.Header
9507 }
9508
9509 // List: Lists Memberships in a given project and location.
9510 //
9511 // - parent: The parent (project and location) where the Memberships will be
9512 // listed. Specified in the format `projects/*/locations/*`.
9513 // `projects/*/locations/-` list memberships in all the regions.
9514 func (r *ProjectsLocationsMembershipsService) List(parent string) *ProjectsLocationsMembershipsListCall {
9515 c := &ProjectsLocationsMembershipsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9516 c.parent = parent
9517 return c
9518 }
9519
9520 // Filter sets the optional parameter "filter": Lists Memberships that match
9521 // the filter expression, following the syntax outlined in
9522 // https://google.aip.dev/160. Examples: - Name is `bar` in project `foo-proj`
9523 // and location `global`: name =
9524 // "projects/foo-proj/locations/global/membership/bar" - Memberships that have
9525 // a label called `foo`: labels.foo:* - Memberships that have a label called
9526 // `foo` whose value is `bar`: labels.foo = bar - Memberships in the CREATING
9527 // state: state = CREATING
9528 func (c *ProjectsLocationsMembershipsListCall) Filter(filter string) *ProjectsLocationsMembershipsListCall {
9529 c.urlParams_.Set("filter", filter)
9530 return c
9531 }
9532
9533 // OrderBy sets the optional parameter "orderBy": One or more fields to compare
9534 // and use to sort the output. See https://google.aip.dev/132#ordering.
9535 func (c *ProjectsLocationsMembershipsListCall) OrderBy(orderBy string) *ProjectsLocationsMembershipsListCall {
9536 c.urlParams_.Set("orderBy", orderBy)
9537 return c
9538 }
9539
9540 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
9541 // resources, `page_size` specifies number of resources to return. If
9542 // unspecified or set to 0, all resources will be returned.
9543 func (c *ProjectsLocationsMembershipsListCall) PageSize(pageSize int64) *ProjectsLocationsMembershipsListCall {
9544 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9545 return c
9546 }
9547
9548 // PageToken sets the optional parameter "pageToken": Token returned by
9549 // previous call to `ListMemberships` which specifies the position in the list
9550 // from where to continue listing the resources.
9551 func (c *ProjectsLocationsMembershipsListCall) PageToken(pageToken string) *ProjectsLocationsMembershipsListCall {
9552 c.urlParams_.Set("pageToken", pageToken)
9553 return c
9554 }
9555
9556 // Fields allows partial responses to be retrieved. See
9557 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9558 // details.
9559 func (c *ProjectsLocationsMembershipsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsListCall {
9560 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9561 return c
9562 }
9563
9564 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9565 // object's ETag matches the given value. This is useful for getting updates
9566 // only after the object has changed since the last request.
9567 func (c *ProjectsLocationsMembershipsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsListCall {
9568 c.ifNoneMatch_ = entityTag
9569 return c
9570 }
9571
9572 // Context sets the context to be used in this call's Do method.
9573 func (c *ProjectsLocationsMembershipsListCall) Context(ctx context.Context) *ProjectsLocationsMembershipsListCall {
9574 c.ctx_ = ctx
9575 return c
9576 }
9577
9578 // Header returns a http.Header that can be modified by the caller to add
9579 // headers to the request.
9580 func (c *ProjectsLocationsMembershipsListCall) Header() http.Header {
9581 if c.header_ == nil {
9582 c.header_ = make(http.Header)
9583 }
9584 return c.header_
9585 }
9586
9587 func (c *ProjectsLocationsMembershipsListCall) doRequest(alt string) (*http.Response, error) {
9588 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9589 if c.ifNoneMatch_ != "" {
9590 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9591 }
9592 c.urlParams_.Set("alt", alt)
9593 c.urlParams_.Set("prettyPrint", "false")
9594 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/memberships")
9595 urls += "?" + c.urlParams_.Encode()
9596 req, err := http.NewRequest("GET", urls, nil)
9597 if err != nil {
9598 return nil, err
9599 }
9600 req.Header = reqHeaders
9601 googleapi.Expand(req.URL, map[string]string{
9602 "parent": c.parent,
9603 })
9604 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.list", "request", internallog.HTTPRequest(req, nil))
9605 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9606 }
9607
9608 // Do executes the "gkehub.projects.locations.memberships.list" call.
9609 // Any non-2xx status code is an error. Response headers are in either
9610 // *ListMembershipsResponse.ServerResponse.Header or (if a response was
9611 // returned at all) in error.(*googleapi.Error).Header. Use
9612 // googleapi.IsNotModified to check whether the returned error was because
9613 // http.StatusNotModified was returned.
9614 func (c *ProjectsLocationsMembershipsListCall) Do(opts ...googleapi.CallOption) (*ListMembershipsResponse, error) {
9615 gensupport.SetOptions(c.urlParams_, opts...)
9616 res, err := c.doRequest("json")
9617 if res != nil && res.StatusCode == http.StatusNotModified {
9618 if res.Body != nil {
9619 res.Body.Close()
9620 }
9621 return nil, gensupport.WrapError(&googleapi.Error{
9622 Code: res.StatusCode,
9623 Header: res.Header,
9624 })
9625 }
9626 if err != nil {
9627 return nil, err
9628 }
9629 defer googleapi.CloseBody(res)
9630 if err := googleapi.CheckResponse(res); err != nil {
9631 return nil, gensupport.WrapError(err)
9632 }
9633 ret := &ListMembershipsResponse{
9634 ServerResponse: googleapi.ServerResponse{
9635 Header: res.Header,
9636 HTTPStatusCode: res.StatusCode,
9637 },
9638 }
9639 target := &ret
9640 b, err := gensupport.DecodeResponseBytes(target, res)
9641 if err != nil {
9642 return nil, err
9643 }
9644 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.list", "response", internallog.HTTPResponse(res, b))
9645 return ret, nil
9646 }
9647
9648 // Pages invokes f for each page of results.
9649 // A non-nil error returned from f will halt the iteration.
9650 // The provided context supersedes any context provided to the Context method.
9651 func (c *ProjectsLocationsMembershipsListCall) Pages(ctx context.Context, f func(*ListMembershipsResponse) error) error {
9652 c.ctx_ = ctx
9653 defer c.PageToken(c.urlParams_.Get("pageToken"))
9654 for {
9655 x, err := c.Do()
9656 if err != nil {
9657 return err
9658 }
9659 if err := f(x); err != nil {
9660 return err
9661 }
9662 if x.NextPageToken == "" {
9663 return nil
9664 }
9665 c.PageToken(x.NextPageToken)
9666 }
9667 }
9668
9669 type ProjectsLocationsMembershipsPatchCall struct {
9670 s *Service
9671 name string
9672 membership *Membership
9673 urlParams_ gensupport.URLParams
9674 ctx_ context.Context
9675 header_ http.Header
9676 }
9677
9678 // Patch: Updates an existing Membership.
9679 //
9680 // - name: The Membership resource name in the format
9681 // `projects/*/locations/*/memberships/*`.
9682 func (r *ProjectsLocationsMembershipsService) Patch(name string, membership *Membership) *ProjectsLocationsMembershipsPatchCall {
9683 c := &ProjectsLocationsMembershipsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9684 c.name = name
9685 c.membership = membership
9686 return c
9687 }
9688
9689 // RequestId sets the optional parameter "requestId": A request ID to identify
9690 // requests. Specify a unique request ID so that if you must retry your
9691 // request, the server will know to ignore the request if it has already been
9692 // completed. The server will guarantee that for at least 60 minutes after the
9693 // first request. For example, consider a situation where you make an initial
9694 // request and the request times out. If you make the request again with the
9695 // same request ID, the server can check if original operation with the same
9696 // request ID was received, and if so, will ignore the second request. This
9697 // prevents clients from accidentally creating duplicate commitments. The
9698 // request ID must be a valid UUID with the exception that zero UUID is not
9699 // supported (00000000-0000-0000-0000-000000000000).
9700 func (c *ProjectsLocationsMembershipsPatchCall) RequestId(requestId string) *ProjectsLocationsMembershipsPatchCall {
9701 c.urlParams_.Set("requestId", requestId)
9702 return c
9703 }
9704
9705 // UpdateMask sets the optional parameter "updateMask": Required. Mask of
9706 // fields to update.
9707 func (c *ProjectsLocationsMembershipsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMembershipsPatchCall {
9708 c.urlParams_.Set("updateMask", updateMask)
9709 return c
9710 }
9711
9712 // Fields allows partial responses to be retrieved. See
9713 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9714 // details.
9715 func (c *ProjectsLocationsMembershipsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsPatchCall {
9716 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9717 return c
9718 }
9719
9720 // Context sets the context to be used in this call's Do method.
9721 func (c *ProjectsLocationsMembershipsPatchCall) Context(ctx context.Context) *ProjectsLocationsMembershipsPatchCall {
9722 c.ctx_ = ctx
9723 return c
9724 }
9725
9726 // Header returns a http.Header that can be modified by the caller to add
9727 // headers to the request.
9728 func (c *ProjectsLocationsMembershipsPatchCall) Header() http.Header {
9729 if c.header_ == nil {
9730 c.header_ = make(http.Header)
9731 }
9732 return c.header_
9733 }
9734
9735 func (c *ProjectsLocationsMembershipsPatchCall) doRequest(alt string) (*http.Response, error) {
9736 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9737 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.membership)
9738 if err != nil {
9739 return nil, err
9740 }
9741 c.urlParams_.Set("alt", alt)
9742 c.urlParams_.Set("prettyPrint", "false")
9743 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
9744 urls += "?" + c.urlParams_.Encode()
9745 req, err := http.NewRequest("PATCH", urls, body)
9746 if err != nil {
9747 return nil, err
9748 }
9749 req.Header = reqHeaders
9750 googleapi.Expand(req.URL, map[string]string{
9751 "name": c.name,
9752 })
9753 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
9754 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9755 }
9756
9757 // Do executes the "gkehub.projects.locations.memberships.patch" call.
9758 // Any non-2xx status code is an error. Response headers are in either
9759 // *Operation.ServerResponse.Header or (if a response was returned at all) in
9760 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9761 // whether the returned error was because http.StatusNotModified was returned.
9762 func (c *ProjectsLocationsMembershipsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9763 gensupport.SetOptions(c.urlParams_, opts...)
9764 res, err := c.doRequest("json")
9765 if res != nil && res.StatusCode == http.StatusNotModified {
9766 if res.Body != nil {
9767 res.Body.Close()
9768 }
9769 return nil, gensupport.WrapError(&googleapi.Error{
9770 Code: res.StatusCode,
9771 Header: res.Header,
9772 })
9773 }
9774 if err != nil {
9775 return nil, err
9776 }
9777 defer googleapi.CloseBody(res)
9778 if err := googleapi.CheckResponse(res); err != nil {
9779 return nil, gensupport.WrapError(err)
9780 }
9781 ret := &Operation{
9782 ServerResponse: googleapi.ServerResponse{
9783 Header: res.Header,
9784 HTTPStatusCode: res.StatusCode,
9785 },
9786 }
9787 target := &ret
9788 b, err := gensupport.DecodeResponseBytes(target, res)
9789 if err != nil {
9790 return nil, err
9791 }
9792 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.patch", "response", internallog.HTTPResponse(res, b))
9793 return ret, nil
9794 }
9795
9796 type ProjectsLocationsMembershipsSetIamPolicyCall struct {
9797 s *Service
9798 resource string
9799 setiampolicyrequest *SetIamPolicyRequest
9800 urlParams_ gensupport.URLParams
9801 ctx_ context.Context
9802 header_ http.Header
9803 }
9804
9805 // SetIamPolicy: Sets the access control policy on the specified resource.
9806 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
9807 // and `PERMISSION_DENIED` errors.
9808 //
9809 // - resource: REQUIRED: The resource for which the policy is being specified.
9810 // See Resource names (https://cloud.google.com/apis/design/resource_names)
9811 // for the appropriate value for this field.
9812 func (r *ProjectsLocationsMembershipsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsMembershipsSetIamPolicyCall {
9813 c := &ProjectsLocationsMembershipsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9814 c.resource = resource
9815 c.setiampolicyrequest = setiampolicyrequest
9816 return c
9817 }
9818
9819 // Fields allows partial responses to be retrieved. See
9820 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9821 // details.
9822 func (c *ProjectsLocationsMembershipsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsSetIamPolicyCall {
9823 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9824 return c
9825 }
9826
9827 // Context sets the context to be used in this call's Do method.
9828 func (c *ProjectsLocationsMembershipsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMembershipsSetIamPolicyCall {
9829 c.ctx_ = ctx
9830 return c
9831 }
9832
9833 // Header returns a http.Header that can be modified by the caller to add
9834 // headers to the request.
9835 func (c *ProjectsLocationsMembershipsSetIamPolicyCall) Header() http.Header {
9836 if c.header_ == nil {
9837 c.header_ = make(http.Header)
9838 }
9839 return c.header_
9840 }
9841
9842 func (c *ProjectsLocationsMembershipsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9843 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9844 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
9845 if err != nil {
9846 return nil, err
9847 }
9848 c.urlParams_.Set("alt", alt)
9849 c.urlParams_.Set("prettyPrint", "false")
9850 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:setIamPolicy")
9851 urls += "?" + c.urlParams_.Encode()
9852 req, err := http.NewRequest("POST", urls, body)
9853 if err != nil {
9854 return nil, err
9855 }
9856 req.Header = reqHeaders
9857 googleapi.Expand(req.URL, map[string]string{
9858 "resource": c.resource,
9859 })
9860 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
9861 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9862 }
9863
9864 // Do executes the "gkehub.projects.locations.memberships.setIamPolicy" call.
9865 // Any non-2xx status code is an error. Response headers are in either
9866 // *Policy.ServerResponse.Header or (if a response was returned at all) in
9867 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9868 // whether the returned error was because http.StatusNotModified was returned.
9869 func (c *ProjectsLocationsMembershipsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
9870 gensupport.SetOptions(c.urlParams_, opts...)
9871 res, err := c.doRequest("json")
9872 if res != nil && res.StatusCode == http.StatusNotModified {
9873 if res.Body != nil {
9874 res.Body.Close()
9875 }
9876 return nil, gensupport.WrapError(&googleapi.Error{
9877 Code: res.StatusCode,
9878 Header: res.Header,
9879 })
9880 }
9881 if err != nil {
9882 return nil, err
9883 }
9884 defer googleapi.CloseBody(res)
9885 if err := googleapi.CheckResponse(res); err != nil {
9886 return nil, gensupport.WrapError(err)
9887 }
9888 ret := &Policy{
9889 ServerResponse: googleapi.ServerResponse{
9890 Header: res.Header,
9891 HTTPStatusCode: res.StatusCode,
9892 },
9893 }
9894 target := &ret
9895 b, err := gensupport.DecodeResponseBytes(target, res)
9896 if err != nil {
9897 return nil, err
9898 }
9899 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.setIamPolicy", "response", internallog.HTTPResponse(res, b))
9900 return ret, nil
9901 }
9902
9903 type ProjectsLocationsMembershipsTestIamPermissionsCall struct {
9904 s *Service
9905 resource string
9906 testiampermissionsrequest *TestIamPermissionsRequest
9907 urlParams_ gensupport.URLParams
9908 ctx_ context.Context
9909 header_ http.Header
9910 }
9911
9912 // TestIamPermissions: Returns permissions that a caller has on the specified
9913 // resource. If the resource does not exist, this will return an empty set of
9914 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
9915 // used for building permission-aware UIs and command-line tools, not for
9916 // authorization checking. This operation may "fail open" without warning.
9917 //
9918 // - resource: REQUIRED: The resource for which the policy detail is being
9919 // requested. See Resource names
9920 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
9921 // value for this field.
9922 func (r *ProjectsLocationsMembershipsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsMembershipsTestIamPermissionsCall {
9923 c := &ProjectsLocationsMembershipsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9924 c.resource = resource
9925 c.testiampermissionsrequest = testiampermissionsrequest
9926 return c
9927 }
9928
9929 // Fields allows partial responses to be retrieved. See
9930 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9931 // details.
9932 func (c *ProjectsLocationsMembershipsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsTestIamPermissionsCall {
9933 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9934 return c
9935 }
9936
9937 // Context sets the context to be used in this call's Do method.
9938 func (c *ProjectsLocationsMembershipsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsMembershipsTestIamPermissionsCall {
9939 c.ctx_ = ctx
9940 return c
9941 }
9942
9943 // Header returns a http.Header that can be modified by the caller to add
9944 // headers to the request.
9945 func (c *ProjectsLocationsMembershipsTestIamPermissionsCall) Header() http.Header {
9946 if c.header_ == nil {
9947 c.header_ = make(http.Header)
9948 }
9949 return c.header_
9950 }
9951
9952 func (c *ProjectsLocationsMembershipsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
9953 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9954 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
9955 if err != nil {
9956 return nil, err
9957 }
9958 c.urlParams_.Set("alt", alt)
9959 c.urlParams_.Set("prettyPrint", "false")
9960 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:testIamPermissions")
9961 urls += "?" + c.urlParams_.Encode()
9962 req, err := http.NewRequest("POST", urls, body)
9963 if err != nil {
9964 return nil, err
9965 }
9966 req.Header = reqHeaders
9967 googleapi.Expand(req.URL, map[string]string{
9968 "resource": c.resource,
9969 })
9970 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
9971 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9972 }
9973
9974 // Do executes the "gkehub.projects.locations.memberships.testIamPermissions" call.
9975 // Any non-2xx status code is an error. Response headers are in either
9976 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
9977 // returned at all) in error.(*googleapi.Error).Header. Use
9978 // googleapi.IsNotModified to check whether the returned error was because
9979 // http.StatusNotModified was returned.
9980 func (c *ProjectsLocationsMembershipsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
9981 gensupport.SetOptions(c.urlParams_, opts...)
9982 res, err := c.doRequest("json")
9983 if res != nil && res.StatusCode == http.StatusNotModified {
9984 if res.Body != nil {
9985 res.Body.Close()
9986 }
9987 return nil, gensupport.WrapError(&googleapi.Error{
9988 Code: res.StatusCode,
9989 Header: res.Header,
9990 })
9991 }
9992 if err != nil {
9993 return nil, err
9994 }
9995 defer googleapi.CloseBody(res)
9996 if err := googleapi.CheckResponse(res); err != nil {
9997 return nil, gensupport.WrapError(err)
9998 }
9999 ret := &TestIamPermissionsResponse{
10000 ServerResponse: googleapi.ServerResponse{
10001 Header: res.Header,
10002 HTTPStatusCode: res.StatusCode,
10003 },
10004 }
10005 target := &ret
10006 b, err := gensupport.DecodeResponseBytes(target, res)
10007 if err != nil {
10008 return nil, err
10009 }
10010 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.testIamPermissions", "response", internallog.HTTPResponse(res, b))
10011 return ret, nil
10012 }
10013
10014 type ProjectsLocationsMembershipsBindingsCreateCall struct {
10015 s *Service
10016 parent string
10017 membershipbinding *MembershipBinding
10018 urlParams_ gensupport.URLParams
10019 ctx_ context.Context
10020 header_ http.Header
10021 }
10022
10023 // Create: Creates a MembershipBinding.
10024 //
10025 // - parent: The parent (project and location) where the MembershipBinding will
10026 // be created. Specified in the format
10027 // `projects/*/locations/*/memberships/*`.
10028 func (r *ProjectsLocationsMembershipsBindingsService) Create(parent string, membershipbinding *MembershipBinding) *ProjectsLocationsMembershipsBindingsCreateCall {
10029 c := &ProjectsLocationsMembershipsBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10030 c.parent = parent
10031 c.membershipbinding = membershipbinding
10032 return c
10033 }
10034
10035 // MembershipBindingId sets the optional parameter "membershipBindingId":
10036 // Required. The ID to use for the MembershipBinding.
10037 func (c *ProjectsLocationsMembershipsBindingsCreateCall) MembershipBindingId(membershipBindingId string) *ProjectsLocationsMembershipsBindingsCreateCall {
10038 c.urlParams_.Set("membershipBindingId", membershipBindingId)
10039 return c
10040 }
10041
10042 // Fields allows partial responses to be retrieved. See
10043 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10044 // details.
10045 func (c *ProjectsLocationsMembershipsBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsBindingsCreateCall {
10046 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10047 return c
10048 }
10049
10050 // Context sets the context to be used in this call's Do method.
10051 func (c *ProjectsLocationsMembershipsBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsMembershipsBindingsCreateCall {
10052 c.ctx_ = ctx
10053 return c
10054 }
10055
10056 // Header returns a http.Header that can be modified by the caller to add
10057 // headers to the request.
10058 func (c *ProjectsLocationsMembershipsBindingsCreateCall) Header() http.Header {
10059 if c.header_ == nil {
10060 c.header_ = make(http.Header)
10061 }
10062 return c.header_
10063 }
10064
10065 func (c *ProjectsLocationsMembershipsBindingsCreateCall) doRequest(alt string) (*http.Response, error) {
10066 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10067 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.membershipbinding)
10068 if err != nil {
10069 return nil, err
10070 }
10071 c.urlParams_.Set("alt", alt)
10072 c.urlParams_.Set("prettyPrint", "false")
10073 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/bindings")
10074 urls += "?" + c.urlParams_.Encode()
10075 req, err := http.NewRequest("POST", urls, body)
10076 if err != nil {
10077 return nil, err
10078 }
10079 req.Header = reqHeaders
10080 googleapi.Expand(req.URL, map[string]string{
10081 "parent": c.parent,
10082 })
10083 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.create", "request", internallog.HTTPRequest(req, body.Bytes()))
10084 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10085 }
10086
10087 // Do executes the "gkehub.projects.locations.memberships.bindings.create" call.
10088 // Any non-2xx status code is an error. Response headers are in either
10089 // *Operation.ServerResponse.Header or (if a response was returned at all) in
10090 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10091 // whether the returned error was because http.StatusNotModified was returned.
10092 func (c *ProjectsLocationsMembershipsBindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10093 gensupport.SetOptions(c.urlParams_, opts...)
10094 res, err := c.doRequest("json")
10095 if res != nil && res.StatusCode == http.StatusNotModified {
10096 if res.Body != nil {
10097 res.Body.Close()
10098 }
10099 return nil, gensupport.WrapError(&googleapi.Error{
10100 Code: res.StatusCode,
10101 Header: res.Header,
10102 })
10103 }
10104 if err != nil {
10105 return nil, err
10106 }
10107 defer googleapi.CloseBody(res)
10108 if err := googleapi.CheckResponse(res); err != nil {
10109 return nil, gensupport.WrapError(err)
10110 }
10111 ret := &Operation{
10112 ServerResponse: googleapi.ServerResponse{
10113 Header: res.Header,
10114 HTTPStatusCode: res.StatusCode,
10115 },
10116 }
10117 target := &ret
10118 b, err := gensupport.DecodeResponseBytes(target, res)
10119 if err != nil {
10120 return nil, err
10121 }
10122 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.create", "response", internallog.HTTPResponse(res, b))
10123 return ret, nil
10124 }
10125
10126 type ProjectsLocationsMembershipsBindingsDeleteCall struct {
10127 s *Service
10128 name string
10129 urlParams_ gensupport.URLParams
10130 ctx_ context.Context
10131 header_ http.Header
10132 }
10133
10134 // Delete: Deletes a MembershipBinding.
10135 //
10136 // - name: The MembershipBinding resource name in the format
10137 // `projects/*/locations/*/memberships/*/bindings/*`.
10138 func (r *ProjectsLocationsMembershipsBindingsService) Delete(name string) *ProjectsLocationsMembershipsBindingsDeleteCall {
10139 c := &ProjectsLocationsMembershipsBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10140 c.name = name
10141 return c
10142 }
10143
10144 // Fields allows partial responses to be retrieved. See
10145 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10146 // details.
10147 func (c *ProjectsLocationsMembershipsBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsBindingsDeleteCall {
10148 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10149 return c
10150 }
10151
10152 // Context sets the context to be used in this call's Do method.
10153 func (c *ProjectsLocationsMembershipsBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMembershipsBindingsDeleteCall {
10154 c.ctx_ = ctx
10155 return c
10156 }
10157
10158 // Header returns a http.Header that can be modified by the caller to add
10159 // headers to the request.
10160 func (c *ProjectsLocationsMembershipsBindingsDeleteCall) Header() http.Header {
10161 if c.header_ == nil {
10162 c.header_ = make(http.Header)
10163 }
10164 return c.header_
10165 }
10166
10167 func (c *ProjectsLocationsMembershipsBindingsDeleteCall) doRequest(alt string) (*http.Response, error) {
10168 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10169 c.urlParams_.Set("alt", alt)
10170 c.urlParams_.Set("prettyPrint", "false")
10171 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
10172 urls += "?" + c.urlParams_.Encode()
10173 req, err := http.NewRequest("DELETE", urls, nil)
10174 if err != nil {
10175 return nil, err
10176 }
10177 req.Header = reqHeaders
10178 googleapi.Expand(req.URL, map[string]string{
10179 "name": c.name,
10180 })
10181 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.delete", "request", internallog.HTTPRequest(req, nil))
10182 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10183 }
10184
10185 // Do executes the "gkehub.projects.locations.memberships.bindings.delete" call.
10186 // Any non-2xx status code is an error. Response headers are in either
10187 // *Operation.ServerResponse.Header or (if a response was returned at all) in
10188 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10189 // whether the returned error was because http.StatusNotModified was returned.
10190 func (c *ProjectsLocationsMembershipsBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10191 gensupport.SetOptions(c.urlParams_, opts...)
10192 res, err := c.doRequest("json")
10193 if res != nil && res.StatusCode == http.StatusNotModified {
10194 if res.Body != nil {
10195 res.Body.Close()
10196 }
10197 return nil, gensupport.WrapError(&googleapi.Error{
10198 Code: res.StatusCode,
10199 Header: res.Header,
10200 })
10201 }
10202 if err != nil {
10203 return nil, err
10204 }
10205 defer googleapi.CloseBody(res)
10206 if err := googleapi.CheckResponse(res); err != nil {
10207 return nil, gensupport.WrapError(err)
10208 }
10209 ret := &Operation{
10210 ServerResponse: googleapi.ServerResponse{
10211 Header: res.Header,
10212 HTTPStatusCode: res.StatusCode,
10213 },
10214 }
10215 target := &ret
10216 b, err := gensupport.DecodeResponseBytes(target, res)
10217 if err != nil {
10218 return nil, err
10219 }
10220 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.delete", "response", internallog.HTTPResponse(res, b))
10221 return ret, nil
10222 }
10223
10224 type ProjectsLocationsMembershipsBindingsGetCall struct {
10225 s *Service
10226 name string
10227 urlParams_ gensupport.URLParams
10228 ifNoneMatch_ string
10229 ctx_ context.Context
10230 header_ http.Header
10231 }
10232
10233 // Get: Returns the details of a MembershipBinding.
10234 //
10235 // - name: The MembershipBinding resource name in the format
10236 // `projects/*/locations/*/memberships/*/bindings/*`.
10237 func (r *ProjectsLocationsMembershipsBindingsService) Get(name string) *ProjectsLocationsMembershipsBindingsGetCall {
10238 c := &ProjectsLocationsMembershipsBindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10239 c.name = name
10240 return c
10241 }
10242
10243 // Fields allows partial responses to be retrieved. See
10244 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10245 // details.
10246 func (c *ProjectsLocationsMembershipsBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsBindingsGetCall {
10247 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10248 return c
10249 }
10250
10251 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10252 // object's ETag matches the given value. This is useful for getting updates
10253 // only after the object has changed since the last request.
10254 func (c *ProjectsLocationsMembershipsBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsBindingsGetCall {
10255 c.ifNoneMatch_ = entityTag
10256 return c
10257 }
10258
10259 // Context sets the context to be used in this call's Do method.
10260 func (c *ProjectsLocationsMembershipsBindingsGetCall) Context(ctx context.Context) *ProjectsLocationsMembershipsBindingsGetCall {
10261 c.ctx_ = ctx
10262 return c
10263 }
10264
10265 // Header returns a http.Header that can be modified by the caller to add
10266 // headers to the request.
10267 func (c *ProjectsLocationsMembershipsBindingsGetCall) Header() http.Header {
10268 if c.header_ == nil {
10269 c.header_ = make(http.Header)
10270 }
10271 return c.header_
10272 }
10273
10274 func (c *ProjectsLocationsMembershipsBindingsGetCall) doRequest(alt string) (*http.Response, error) {
10275 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10276 if c.ifNoneMatch_ != "" {
10277 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10278 }
10279 c.urlParams_.Set("alt", alt)
10280 c.urlParams_.Set("prettyPrint", "false")
10281 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
10282 urls += "?" + c.urlParams_.Encode()
10283 req, err := http.NewRequest("GET", urls, nil)
10284 if err != nil {
10285 return nil, err
10286 }
10287 req.Header = reqHeaders
10288 googleapi.Expand(req.URL, map[string]string{
10289 "name": c.name,
10290 })
10291 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.get", "request", internallog.HTTPRequest(req, nil))
10292 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10293 }
10294
10295 // Do executes the "gkehub.projects.locations.memberships.bindings.get" call.
10296 // Any non-2xx status code is an error. Response headers are in either
10297 // *MembershipBinding.ServerResponse.Header or (if a response was returned at
10298 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10299 // check whether the returned error was because http.StatusNotModified was
10300 // returned.
10301 func (c *ProjectsLocationsMembershipsBindingsGetCall) Do(opts ...googleapi.CallOption) (*MembershipBinding, error) {
10302 gensupport.SetOptions(c.urlParams_, opts...)
10303 res, err := c.doRequest("json")
10304 if res != nil && res.StatusCode == http.StatusNotModified {
10305 if res.Body != nil {
10306 res.Body.Close()
10307 }
10308 return nil, gensupport.WrapError(&googleapi.Error{
10309 Code: res.StatusCode,
10310 Header: res.Header,
10311 })
10312 }
10313 if err != nil {
10314 return nil, err
10315 }
10316 defer googleapi.CloseBody(res)
10317 if err := googleapi.CheckResponse(res); err != nil {
10318 return nil, gensupport.WrapError(err)
10319 }
10320 ret := &MembershipBinding{
10321 ServerResponse: googleapi.ServerResponse{
10322 Header: res.Header,
10323 HTTPStatusCode: res.StatusCode,
10324 },
10325 }
10326 target := &ret
10327 b, err := gensupport.DecodeResponseBytes(target, res)
10328 if err != nil {
10329 return nil, err
10330 }
10331 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.get", "response", internallog.HTTPResponse(res, b))
10332 return ret, nil
10333 }
10334
10335 type ProjectsLocationsMembershipsBindingsListCall struct {
10336 s *Service
10337 parent string
10338 urlParams_ gensupport.URLParams
10339 ifNoneMatch_ string
10340 ctx_ context.Context
10341 header_ http.Header
10342 }
10343
10344 // List: Lists MembershipBindings.
10345 //
10346 // - parent: The parent Membership for which the MembershipBindings will be
10347 // listed. Specified in the format `projects/*/locations/*/memberships/*`.
10348 func (r *ProjectsLocationsMembershipsBindingsService) List(parent string) *ProjectsLocationsMembershipsBindingsListCall {
10349 c := &ProjectsLocationsMembershipsBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10350 c.parent = parent
10351 return c
10352 }
10353
10354 // Filter sets the optional parameter "filter": Lists MembershipBindings that
10355 // match the filter expression, following the syntax outlined in
10356 // https://google.aip.dev/160.
10357 func (c *ProjectsLocationsMembershipsBindingsListCall) Filter(filter string) *ProjectsLocationsMembershipsBindingsListCall {
10358 c.urlParams_.Set("filter", filter)
10359 return c
10360 }
10361
10362 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
10363 // resources, `page_size` specifies number of resources to return. If
10364 // unspecified or set to 0, all resources will be returned.
10365 func (c *ProjectsLocationsMembershipsBindingsListCall) PageSize(pageSize int64) *ProjectsLocationsMembershipsBindingsListCall {
10366 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10367 return c
10368 }
10369
10370 // PageToken sets the optional parameter "pageToken": Token returned by
10371 // previous call to `ListMembershipBindings` which specifies the position in
10372 // the list from where to continue listing the resources.
10373 func (c *ProjectsLocationsMembershipsBindingsListCall) PageToken(pageToken string) *ProjectsLocationsMembershipsBindingsListCall {
10374 c.urlParams_.Set("pageToken", pageToken)
10375 return c
10376 }
10377
10378 // Fields allows partial responses to be retrieved. See
10379 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10380 // details.
10381 func (c *ProjectsLocationsMembershipsBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsBindingsListCall {
10382 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10383 return c
10384 }
10385
10386 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10387 // object's ETag matches the given value. This is useful for getting updates
10388 // only after the object has changed since the last request.
10389 func (c *ProjectsLocationsMembershipsBindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsBindingsListCall {
10390 c.ifNoneMatch_ = entityTag
10391 return c
10392 }
10393
10394 // Context sets the context to be used in this call's Do method.
10395 func (c *ProjectsLocationsMembershipsBindingsListCall) Context(ctx context.Context) *ProjectsLocationsMembershipsBindingsListCall {
10396 c.ctx_ = ctx
10397 return c
10398 }
10399
10400 // Header returns a http.Header that can be modified by the caller to add
10401 // headers to the request.
10402 func (c *ProjectsLocationsMembershipsBindingsListCall) Header() http.Header {
10403 if c.header_ == nil {
10404 c.header_ = make(http.Header)
10405 }
10406 return c.header_
10407 }
10408
10409 func (c *ProjectsLocationsMembershipsBindingsListCall) doRequest(alt string) (*http.Response, error) {
10410 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10411 if c.ifNoneMatch_ != "" {
10412 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10413 }
10414 c.urlParams_.Set("alt", alt)
10415 c.urlParams_.Set("prettyPrint", "false")
10416 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/bindings")
10417 urls += "?" + c.urlParams_.Encode()
10418 req, err := http.NewRequest("GET", urls, nil)
10419 if err != nil {
10420 return nil, err
10421 }
10422 req.Header = reqHeaders
10423 googleapi.Expand(req.URL, map[string]string{
10424 "parent": c.parent,
10425 })
10426 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.list", "request", internallog.HTTPRequest(req, nil))
10427 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10428 }
10429
10430 // Do executes the "gkehub.projects.locations.memberships.bindings.list" call.
10431 // Any non-2xx status code is an error. Response headers are in either
10432 // *ListMembershipBindingsResponse.ServerResponse.Header or (if a response was
10433 // returned at all) in error.(*googleapi.Error).Header. Use
10434 // googleapi.IsNotModified to check whether the returned error was because
10435 // http.StatusNotModified was returned.
10436 func (c *ProjectsLocationsMembershipsBindingsListCall) Do(opts ...googleapi.CallOption) (*ListMembershipBindingsResponse, error) {
10437 gensupport.SetOptions(c.urlParams_, opts...)
10438 res, err := c.doRequest("json")
10439 if res != nil && res.StatusCode == http.StatusNotModified {
10440 if res.Body != nil {
10441 res.Body.Close()
10442 }
10443 return nil, gensupport.WrapError(&googleapi.Error{
10444 Code: res.StatusCode,
10445 Header: res.Header,
10446 })
10447 }
10448 if err != nil {
10449 return nil, err
10450 }
10451 defer googleapi.CloseBody(res)
10452 if err := googleapi.CheckResponse(res); err != nil {
10453 return nil, gensupport.WrapError(err)
10454 }
10455 ret := &ListMembershipBindingsResponse{
10456 ServerResponse: googleapi.ServerResponse{
10457 Header: res.Header,
10458 HTTPStatusCode: res.StatusCode,
10459 },
10460 }
10461 target := &ret
10462 b, err := gensupport.DecodeResponseBytes(target, res)
10463 if err != nil {
10464 return nil, err
10465 }
10466 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.list", "response", internallog.HTTPResponse(res, b))
10467 return ret, nil
10468 }
10469
10470 // Pages invokes f for each page of results.
10471 // A non-nil error returned from f will halt the iteration.
10472 // The provided context supersedes any context provided to the Context method.
10473 func (c *ProjectsLocationsMembershipsBindingsListCall) Pages(ctx context.Context, f func(*ListMembershipBindingsResponse) error) error {
10474 c.ctx_ = ctx
10475 defer c.PageToken(c.urlParams_.Get("pageToken"))
10476 for {
10477 x, err := c.Do()
10478 if err != nil {
10479 return err
10480 }
10481 if err := f(x); err != nil {
10482 return err
10483 }
10484 if x.NextPageToken == "" {
10485 return nil
10486 }
10487 c.PageToken(x.NextPageToken)
10488 }
10489 }
10490
10491 type ProjectsLocationsMembershipsBindingsPatchCall struct {
10492 s *Service
10493 name string
10494 membershipbinding *MembershipBinding
10495 urlParams_ gensupport.URLParams
10496 ctx_ context.Context
10497 header_ http.Header
10498 }
10499
10500 // Patch: Updates a MembershipBinding.
10501 //
10502 // - name: The resource name for the membershipbinding itself
10503 // `projects/{project}/locations/{location}/memberships/{membership}/bindings/
10504 // {membershipbinding}`.
10505 func (r *ProjectsLocationsMembershipsBindingsService) Patch(name string, membershipbinding *MembershipBinding) *ProjectsLocationsMembershipsBindingsPatchCall {
10506 c := &ProjectsLocationsMembershipsBindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10507 c.name = name
10508 c.membershipbinding = membershipbinding
10509 return c
10510 }
10511
10512 // UpdateMask sets the optional parameter "updateMask": Required. The fields to
10513 // be updated.
10514 func (c *ProjectsLocationsMembershipsBindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMembershipsBindingsPatchCall {
10515 c.urlParams_.Set("updateMask", updateMask)
10516 return c
10517 }
10518
10519 // Fields allows partial responses to be retrieved. See
10520 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10521 // details.
10522 func (c *ProjectsLocationsMembershipsBindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsBindingsPatchCall {
10523 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10524 return c
10525 }
10526
10527 // Context sets the context to be used in this call's Do method.
10528 func (c *ProjectsLocationsMembershipsBindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsMembershipsBindingsPatchCall {
10529 c.ctx_ = ctx
10530 return c
10531 }
10532
10533 // Header returns a http.Header that can be modified by the caller to add
10534 // headers to the request.
10535 func (c *ProjectsLocationsMembershipsBindingsPatchCall) Header() http.Header {
10536 if c.header_ == nil {
10537 c.header_ = make(http.Header)
10538 }
10539 return c.header_
10540 }
10541
10542 func (c *ProjectsLocationsMembershipsBindingsPatchCall) doRequest(alt string) (*http.Response, error) {
10543 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10544 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.membershipbinding)
10545 if err != nil {
10546 return nil, err
10547 }
10548 c.urlParams_.Set("alt", alt)
10549 c.urlParams_.Set("prettyPrint", "false")
10550 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
10551 urls += "?" + c.urlParams_.Encode()
10552 req, err := http.NewRequest("PATCH", urls, body)
10553 if err != nil {
10554 return nil, err
10555 }
10556 req.Header = reqHeaders
10557 googleapi.Expand(req.URL, map[string]string{
10558 "name": c.name,
10559 })
10560 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
10561 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10562 }
10563
10564 // Do executes the "gkehub.projects.locations.memberships.bindings.patch" call.
10565 // Any non-2xx status code is an error. Response headers are in either
10566 // *Operation.ServerResponse.Header or (if a response was returned at all) in
10567 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10568 // whether the returned error was because http.StatusNotModified was returned.
10569 func (c *ProjectsLocationsMembershipsBindingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10570 gensupport.SetOptions(c.urlParams_, opts...)
10571 res, err := c.doRequest("json")
10572 if res != nil && res.StatusCode == http.StatusNotModified {
10573 if res.Body != nil {
10574 res.Body.Close()
10575 }
10576 return nil, gensupport.WrapError(&googleapi.Error{
10577 Code: res.StatusCode,
10578 Header: res.Header,
10579 })
10580 }
10581 if err != nil {
10582 return nil, err
10583 }
10584 defer googleapi.CloseBody(res)
10585 if err := googleapi.CheckResponse(res); err != nil {
10586 return nil, gensupport.WrapError(err)
10587 }
10588 ret := &Operation{
10589 ServerResponse: googleapi.ServerResponse{
10590 Header: res.Header,
10591 HTTPStatusCode: res.StatusCode,
10592 },
10593 }
10594 target := &ret
10595 b, err := gensupport.DecodeResponseBytes(target, res)
10596 if err != nil {
10597 return nil, err
10598 }
10599 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.patch", "response", internallog.HTTPResponse(res, b))
10600 return ret, nil
10601 }
10602
10603 type ProjectsLocationsMembershipsRbacrolebindingsCreateCall struct {
10604 s *Service
10605 parent string
10606 rbacrolebinding *RBACRoleBinding
10607 urlParams_ gensupport.URLParams
10608 ctx_ context.Context
10609 header_ http.Header
10610 }
10611
10612 // Create: Creates a Membership RBACRoleBinding.
10613 //
10614 // - parent: The parent (project and location) where the RBACRoleBinding will
10615 // be created. Specified in the format
10616 // `projects/*/locations/*/memberships/*`.
10617 func (r *ProjectsLocationsMembershipsRbacrolebindingsService) Create(parent string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsMembershipsRbacrolebindingsCreateCall {
10618 c := &ProjectsLocationsMembershipsRbacrolebindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10619 c.parent = parent
10620 c.rbacrolebinding = rbacrolebinding
10621 return c
10622 }
10623
10624 // RbacrolebindingId sets the optional parameter "rbacrolebindingId": Required.
10625 // Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a
10626 // valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It
10627 // must consist of lower case alphanumeric characters or `-` 3. It must start
10628 // and end with an alphanumeric character Which can be expressed as the regex:
10629 // `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
10630 func (c *ProjectsLocationsMembershipsRbacrolebindingsCreateCall) RbacrolebindingId(rbacrolebindingId string) *ProjectsLocationsMembershipsRbacrolebindingsCreateCall {
10631 c.urlParams_.Set("rbacrolebindingId", rbacrolebindingId)
10632 return c
10633 }
10634
10635 // Fields allows partial responses to be retrieved. See
10636 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10637 // details.
10638 func (c *ProjectsLocationsMembershipsRbacrolebindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsRbacrolebindingsCreateCall {
10639 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10640 return c
10641 }
10642
10643 // Context sets the context to be used in this call's Do method.
10644 func (c *ProjectsLocationsMembershipsRbacrolebindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsMembershipsRbacrolebindingsCreateCall {
10645 c.ctx_ = ctx
10646 return c
10647 }
10648
10649 // Header returns a http.Header that can be modified by the caller to add
10650 // headers to the request.
10651 func (c *ProjectsLocationsMembershipsRbacrolebindingsCreateCall) Header() http.Header {
10652 if c.header_ == nil {
10653 c.header_ = make(http.Header)
10654 }
10655 return c.header_
10656 }
10657
10658 func (c *ProjectsLocationsMembershipsRbacrolebindingsCreateCall) doRequest(alt string) (*http.Response, error) {
10659 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10660 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rbacrolebinding)
10661 if err != nil {
10662 return nil, err
10663 }
10664 c.urlParams_.Set("alt", alt)
10665 c.urlParams_.Set("prettyPrint", "false")
10666 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/rbacrolebindings")
10667 urls += "?" + c.urlParams_.Encode()
10668 req, err := http.NewRequest("POST", urls, body)
10669 if err != nil {
10670 return nil, err
10671 }
10672 req.Header = reqHeaders
10673 googleapi.Expand(req.URL, map[string]string{
10674 "parent": c.parent,
10675 })
10676 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.create", "request", internallog.HTTPRequest(req, body.Bytes()))
10677 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10678 }
10679
10680 // Do executes the "gkehub.projects.locations.memberships.rbacrolebindings.create" call.
10681 // Any non-2xx status code is an error. Response headers are in either
10682 // *Operation.ServerResponse.Header or (if a response was returned at all) in
10683 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10684 // whether the returned error was because http.StatusNotModified was returned.
10685 func (c *ProjectsLocationsMembershipsRbacrolebindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10686 gensupport.SetOptions(c.urlParams_, opts...)
10687 res, err := c.doRequest("json")
10688 if res != nil && res.StatusCode == http.StatusNotModified {
10689 if res.Body != nil {
10690 res.Body.Close()
10691 }
10692 return nil, gensupport.WrapError(&googleapi.Error{
10693 Code: res.StatusCode,
10694 Header: res.Header,
10695 })
10696 }
10697 if err != nil {
10698 return nil, err
10699 }
10700 defer googleapi.CloseBody(res)
10701 if err := googleapi.CheckResponse(res); err != nil {
10702 return nil, gensupport.WrapError(err)
10703 }
10704 ret := &Operation{
10705 ServerResponse: googleapi.ServerResponse{
10706 Header: res.Header,
10707 HTTPStatusCode: res.StatusCode,
10708 },
10709 }
10710 target := &ret
10711 b, err := gensupport.DecodeResponseBytes(target, res)
10712 if err != nil {
10713 return nil, err
10714 }
10715 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.create", "response", internallog.HTTPResponse(res, b))
10716 return ret, nil
10717 }
10718
10719 type ProjectsLocationsMembershipsRbacrolebindingsDeleteCall struct {
10720 s *Service
10721 name string
10722 urlParams_ gensupport.URLParams
10723 ctx_ context.Context
10724 header_ http.Header
10725 }
10726
10727 // Delete: Deletes a Membership RBACRoleBinding.
10728 //
10729 // - name: The RBACRoleBinding resource name in the format
10730 // `projects/*/locations/*/memberships/*/rbacrolebindings/*`.
10731 func (r *ProjectsLocationsMembershipsRbacrolebindingsService) Delete(name string) *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall {
10732 c := &ProjectsLocationsMembershipsRbacrolebindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10733 c.name = name
10734 return c
10735 }
10736
10737 // Fields allows partial responses to be retrieved. See
10738 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10739 // details.
10740 func (c *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall {
10741 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10742 return c
10743 }
10744
10745 // Context sets the context to be used in this call's Do method.
10746 func (c *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall {
10747 c.ctx_ = ctx
10748 return c
10749 }
10750
10751 // Header returns a http.Header that can be modified by the caller to add
10752 // headers to the request.
10753 func (c *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall) Header() http.Header {
10754 if c.header_ == nil {
10755 c.header_ = make(http.Header)
10756 }
10757 return c.header_
10758 }
10759
10760 func (c *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall) doRequest(alt string) (*http.Response, error) {
10761 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10762 c.urlParams_.Set("alt", alt)
10763 c.urlParams_.Set("prettyPrint", "false")
10764 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
10765 urls += "?" + c.urlParams_.Encode()
10766 req, err := http.NewRequest("DELETE", urls, nil)
10767 if err != nil {
10768 return nil, err
10769 }
10770 req.Header = reqHeaders
10771 googleapi.Expand(req.URL, map[string]string{
10772 "name": c.name,
10773 })
10774 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.delete", "request", internallog.HTTPRequest(req, nil))
10775 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10776 }
10777
10778 // Do executes the "gkehub.projects.locations.memberships.rbacrolebindings.delete" call.
10779 // Any non-2xx status code is an error. Response headers are in either
10780 // *Operation.ServerResponse.Header or (if a response was returned at all) in
10781 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10782 // whether the returned error was because http.StatusNotModified was returned.
10783 func (c *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10784 gensupport.SetOptions(c.urlParams_, opts...)
10785 res, err := c.doRequest("json")
10786 if res != nil && res.StatusCode == http.StatusNotModified {
10787 if res.Body != nil {
10788 res.Body.Close()
10789 }
10790 return nil, gensupport.WrapError(&googleapi.Error{
10791 Code: res.StatusCode,
10792 Header: res.Header,
10793 })
10794 }
10795 if err != nil {
10796 return nil, err
10797 }
10798 defer googleapi.CloseBody(res)
10799 if err := googleapi.CheckResponse(res); err != nil {
10800 return nil, gensupport.WrapError(err)
10801 }
10802 ret := &Operation{
10803 ServerResponse: googleapi.ServerResponse{
10804 Header: res.Header,
10805 HTTPStatusCode: res.StatusCode,
10806 },
10807 }
10808 target := &ret
10809 b, err := gensupport.DecodeResponseBytes(target, res)
10810 if err != nil {
10811 return nil, err
10812 }
10813 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.delete", "response", internallog.HTTPResponse(res, b))
10814 return ret, nil
10815 }
10816
10817 type ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall struct {
10818 s *Service
10819 parent string
10820 rbacrolebinding *RBACRoleBinding
10821 urlParams_ gensupport.URLParams
10822 ctx_ context.Context
10823 header_ http.Header
10824 }
10825
10826 // GenerateMembershipRBACRoleBindingYAML: Generates a YAML of the RBAC policies
10827 // for the specified RoleBinding and its associated impersonation resources.
10828 //
10829 // - parent: The parent (project and location) where the RBACRoleBinding will
10830 // be created. Specified in the format
10831 // `projects/*/locations/*/memberships/*`.
10832 func (r *ProjectsLocationsMembershipsRbacrolebindingsService) GenerateMembershipRBACRoleBindingYAML(parent string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall {
10833 c := &ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10834 c.parent = parent
10835 c.rbacrolebinding = rbacrolebinding
10836 return c
10837 }
10838
10839 // RbacrolebindingId sets the optional parameter "rbacrolebindingId": Required.
10840 // Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a
10841 // valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It
10842 // must consist of lower case alphanumeric characters or `-` 3. It must start
10843 // and end with an alphanumeric character Which can be expressed as the regex:
10844 // `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
10845 func (c *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall) RbacrolebindingId(rbacrolebindingId string) *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall {
10846 c.urlParams_.Set("rbacrolebindingId", rbacrolebindingId)
10847 return c
10848 }
10849
10850 // Fields allows partial responses to be retrieved. See
10851 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10852 // details.
10853 func (c *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall {
10854 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10855 return c
10856 }
10857
10858 // Context sets the context to be used in this call's Do method.
10859 func (c *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall) Context(ctx context.Context) *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall {
10860 c.ctx_ = ctx
10861 return c
10862 }
10863
10864 // Header returns a http.Header that can be modified by the caller to add
10865 // headers to the request.
10866 func (c *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall) Header() http.Header {
10867 if c.header_ == nil {
10868 c.header_ = make(http.Header)
10869 }
10870 return c.header_
10871 }
10872
10873 func (c *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall) doRequest(alt string) (*http.Response, error) {
10874 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10875 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rbacrolebinding)
10876 if err != nil {
10877 return nil, err
10878 }
10879 c.urlParams_.Set("alt", alt)
10880 c.urlParams_.Set("prettyPrint", "false")
10881 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/rbacrolebindings:generateMembershipRBACRoleBindingYAML")
10882 urls += "?" + c.urlParams_.Encode()
10883 req, err := http.NewRequest("POST", urls, body)
10884 if err != nil {
10885 return nil, err
10886 }
10887 req.Header = reqHeaders
10888 googleapi.Expand(req.URL, map[string]string{
10889 "parent": c.parent,
10890 })
10891 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.generateMembershipRBACRoleBindingYAML", "request", internallog.HTTPRequest(req, body.Bytes()))
10892 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10893 }
10894
10895 // Do executes the "gkehub.projects.locations.memberships.rbacrolebindings.generateMembershipRBACRoleBindingYAML" call.
10896 // Any non-2xx status code is an error. Response headers are in either
10897 // *GenerateMembershipRBACRoleBindingYAMLResponse.ServerResponse.Header or (if
10898 // a response was returned at all) in error.(*googleapi.Error).Header. Use
10899 // googleapi.IsNotModified to check whether the returned error was because
10900 // http.StatusNotModified was returned.
10901 func (c *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall) Do(opts ...googleapi.CallOption) (*GenerateMembershipRBACRoleBindingYAMLResponse, error) {
10902 gensupport.SetOptions(c.urlParams_, opts...)
10903 res, err := c.doRequest("json")
10904 if res != nil && res.StatusCode == http.StatusNotModified {
10905 if res.Body != nil {
10906 res.Body.Close()
10907 }
10908 return nil, gensupport.WrapError(&googleapi.Error{
10909 Code: res.StatusCode,
10910 Header: res.Header,
10911 })
10912 }
10913 if err != nil {
10914 return nil, err
10915 }
10916 defer googleapi.CloseBody(res)
10917 if err := googleapi.CheckResponse(res); err != nil {
10918 return nil, gensupport.WrapError(err)
10919 }
10920 ret := &GenerateMembershipRBACRoleBindingYAMLResponse{
10921 ServerResponse: googleapi.ServerResponse{
10922 Header: res.Header,
10923 HTTPStatusCode: res.StatusCode,
10924 },
10925 }
10926 target := &ret
10927 b, err := gensupport.DecodeResponseBytes(target, res)
10928 if err != nil {
10929 return nil, err
10930 }
10931 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.generateMembershipRBACRoleBindingYAML", "response", internallog.HTTPResponse(res, b))
10932 return ret, nil
10933 }
10934
10935 type ProjectsLocationsMembershipsRbacrolebindingsGetCall struct {
10936 s *Service
10937 name string
10938 urlParams_ gensupport.URLParams
10939 ifNoneMatch_ string
10940 ctx_ context.Context
10941 header_ http.Header
10942 }
10943
10944 // Get: Returns the details of a Membership RBACRoleBinding.
10945 //
10946 // - name: The RBACRoleBinding resource name in the format
10947 // `projects/*/locations/*/memberships/*/rbacrolebindings/*`.
10948 func (r *ProjectsLocationsMembershipsRbacrolebindingsService) Get(name string) *ProjectsLocationsMembershipsRbacrolebindingsGetCall {
10949 c := &ProjectsLocationsMembershipsRbacrolebindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10950 c.name = name
10951 return c
10952 }
10953
10954 // Fields allows partial responses to be retrieved. See
10955 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10956 // details.
10957 func (c *ProjectsLocationsMembershipsRbacrolebindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsRbacrolebindingsGetCall {
10958 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10959 return c
10960 }
10961
10962 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10963 // object's ETag matches the given value. This is useful for getting updates
10964 // only after the object has changed since the last request.
10965 func (c *ProjectsLocationsMembershipsRbacrolebindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsRbacrolebindingsGetCall {
10966 c.ifNoneMatch_ = entityTag
10967 return c
10968 }
10969
10970 // Context sets the context to be used in this call's Do method.
10971 func (c *ProjectsLocationsMembershipsRbacrolebindingsGetCall) Context(ctx context.Context) *ProjectsLocationsMembershipsRbacrolebindingsGetCall {
10972 c.ctx_ = ctx
10973 return c
10974 }
10975
10976 // Header returns a http.Header that can be modified by the caller to add
10977 // headers to the request.
10978 func (c *ProjectsLocationsMembershipsRbacrolebindingsGetCall) Header() http.Header {
10979 if c.header_ == nil {
10980 c.header_ = make(http.Header)
10981 }
10982 return c.header_
10983 }
10984
10985 func (c *ProjectsLocationsMembershipsRbacrolebindingsGetCall) doRequest(alt string) (*http.Response, error) {
10986 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10987 if c.ifNoneMatch_ != "" {
10988 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10989 }
10990 c.urlParams_.Set("alt", alt)
10991 c.urlParams_.Set("prettyPrint", "false")
10992 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
10993 urls += "?" + c.urlParams_.Encode()
10994 req, err := http.NewRequest("GET", urls, nil)
10995 if err != nil {
10996 return nil, err
10997 }
10998 req.Header = reqHeaders
10999 googleapi.Expand(req.URL, map[string]string{
11000 "name": c.name,
11001 })
11002 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.get", "request", internallog.HTTPRequest(req, nil))
11003 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11004 }
11005
11006 // Do executes the "gkehub.projects.locations.memberships.rbacrolebindings.get" call.
11007 // Any non-2xx status code is an error. Response headers are in either
11008 // *RBACRoleBinding.ServerResponse.Header or (if a response was returned at
11009 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11010 // check whether the returned error was because http.StatusNotModified was
11011 // returned.
11012 func (c *ProjectsLocationsMembershipsRbacrolebindingsGetCall) Do(opts ...googleapi.CallOption) (*RBACRoleBinding, error) {
11013 gensupport.SetOptions(c.urlParams_, opts...)
11014 res, err := c.doRequest("json")
11015 if res != nil && res.StatusCode == http.StatusNotModified {
11016 if res.Body != nil {
11017 res.Body.Close()
11018 }
11019 return nil, gensupport.WrapError(&googleapi.Error{
11020 Code: res.StatusCode,
11021 Header: res.Header,
11022 })
11023 }
11024 if err != nil {
11025 return nil, err
11026 }
11027 defer googleapi.CloseBody(res)
11028 if err := googleapi.CheckResponse(res); err != nil {
11029 return nil, gensupport.WrapError(err)
11030 }
11031 ret := &RBACRoleBinding{
11032 ServerResponse: googleapi.ServerResponse{
11033 Header: res.Header,
11034 HTTPStatusCode: res.StatusCode,
11035 },
11036 }
11037 target := &ret
11038 b, err := gensupport.DecodeResponseBytes(target, res)
11039 if err != nil {
11040 return nil, err
11041 }
11042 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.get", "response", internallog.HTTPResponse(res, b))
11043 return ret, nil
11044 }
11045
11046 type ProjectsLocationsMembershipsRbacrolebindingsListCall struct {
11047 s *Service
11048 parent string
11049 urlParams_ gensupport.URLParams
11050 ifNoneMatch_ string
11051 ctx_ context.Context
11052 header_ http.Header
11053 }
11054
11055 // List: Lists all Membership RBACRoleBindings.
11056 //
11057 // - parent: The parent (project and location) where the Features will be
11058 // listed. Specified in the format `projects/*/locations/*/memberships/*`.
11059 func (r *ProjectsLocationsMembershipsRbacrolebindingsService) List(parent string) *ProjectsLocationsMembershipsRbacrolebindingsListCall {
11060 c := &ProjectsLocationsMembershipsRbacrolebindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11061 c.parent = parent
11062 return c
11063 }
11064
11065 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
11066 // resources, `page_size` specifies number of resources to return. If
11067 // unspecified or set to 0, all resources will be returned.
11068 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) PageSize(pageSize int64) *ProjectsLocationsMembershipsRbacrolebindingsListCall {
11069 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11070 return c
11071 }
11072
11073 // PageToken sets the optional parameter "pageToken": Token returned by
11074 // previous call to `ListMembershipRBACRoleBindings` which specifies the
11075 // position in the list from where to continue listing the resources.
11076 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) PageToken(pageToken string) *ProjectsLocationsMembershipsRbacrolebindingsListCall {
11077 c.urlParams_.Set("pageToken", pageToken)
11078 return c
11079 }
11080
11081 // Fields allows partial responses to be retrieved. See
11082 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11083 // details.
11084 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsRbacrolebindingsListCall {
11085 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11086 return c
11087 }
11088
11089 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11090 // object's ETag matches the given value. This is useful for getting updates
11091 // only after the object has changed since the last request.
11092 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsRbacrolebindingsListCall {
11093 c.ifNoneMatch_ = entityTag
11094 return c
11095 }
11096
11097 // Context sets the context to be used in this call's Do method.
11098 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) Context(ctx context.Context) *ProjectsLocationsMembershipsRbacrolebindingsListCall {
11099 c.ctx_ = ctx
11100 return c
11101 }
11102
11103 // Header returns a http.Header that can be modified by the caller to add
11104 // headers to the request.
11105 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) Header() http.Header {
11106 if c.header_ == nil {
11107 c.header_ = make(http.Header)
11108 }
11109 return c.header_
11110 }
11111
11112 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) doRequest(alt string) (*http.Response, error) {
11113 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11114 if c.ifNoneMatch_ != "" {
11115 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11116 }
11117 c.urlParams_.Set("alt", alt)
11118 c.urlParams_.Set("prettyPrint", "false")
11119 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/rbacrolebindings")
11120 urls += "?" + c.urlParams_.Encode()
11121 req, err := http.NewRequest("GET", urls, nil)
11122 if err != nil {
11123 return nil, err
11124 }
11125 req.Header = reqHeaders
11126 googleapi.Expand(req.URL, map[string]string{
11127 "parent": c.parent,
11128 })
11129 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.list", "request", internallog.HTTPRequest(req, nil))
11130 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11131 }
11132
11133 // Do executes the "gkehub.projects.locations.memberships.rbacrolebindings.list" call.
11134 // Any non-2xx status code is an error. Response headers are in either
11135 // *ListMembershipRBACRoleBindingsResponse.ServerResponse.Header or (if a
11136 // response was returned at all) in error.(*googleapi.Error).Header. Use
11137 // googleapi.IsNotModified to check whether the returned error was because
11138 // http.StatusNotModified was returned.
11139 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) Do(opts ...googleapi.CallOption) (*ListMembershipRBACRoleBindingsResponse, error) {
11140 gensupport.SetOptions(c.urlParams_, opts...)
11141 res, err := c.doRequest("json")
11142 if res != nil && res.StatusCode == http.StatusNotModified {
11143 if res.Body != nil {
11144 res.Body.Close()
11145 }
11146 return nil, gensupport.WrapError(&googleapi.Error{
11147 Code: res.StatusCode,
11148 Header: res.Header,
11149 })
11150 }
11151 if err != nil {
11152 return nil, err
11153 }
11154 defer googleapi.CloseBody(res)
11155 if err := googleapi.CheckResponse(res); err != nil {
11156 return nil, gensupport.WrapError(err)
11157 }
11158 ret := &ListMembershipRBACRoleBindingsResponse{
11159 ServerResponse: googleapi.ServerResponse{
11160 Header: res.Header,
11161 HTTPStatusCode: res.StatusCode,
11162 },
11163 }
11164 target := &ret
11165 b, err := gensupport.DecodeResponseBytes(target, res)
11166 if err != nil {
11167 return nil, err
11168 }
11169 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.list", "response", internallog.HTTPResponse(res, b))
11170 return ret, nil
11171 }
11172
11173 // Pages invokes f for each page of results.
11174 // A non-nil error returned from f will halt the iteration.
11175 // The provided context supersedes any context provided to the Context method.
11176 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) Pages(ctx context.Context, f func(*ListMembershipRBACRoleBindingsResponse) error) error {
11177 c.ctx_ = ctx
11178 defer c.PageToken(c.urlParams_.Get("pageToken"))
11179 for {
11180 x, err := c.Do()
11181 if err != nil {
11182 return err
11183 }
11184 if err := f(x); err != nil {
11185 return err
11186 }
11187 if x.NextPageToken == "" {
11188 return nil
11189 }
11190 c.PageToken(x.NextPageToken)
11191 }
11192 }
11193
11194 type ProjectsLocationsMembershipsRbacrolebindingsPatchCall struct {
11195 s *Service
11196 name string
11197 rbacrolebinding *RBACRoleBinding
11198 urlParams_ gensupport.URLParams
11199 ctx_ context.Context
11200 header_ http.Header
11201 }
11202
11203 // Patch: Updates a Membership RBACRoleBinding.
11204 //
11205 // - name: The resource name for the rbacrolebinding
11206 // `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{r
11207 // bacrolebinding}` or
11208 // `projects/{project}/locations/{location}/memberships/{membership}/rbacroleb
11209 // indings/{rbacrolebinding}`.
11210 func (r *ProjectsLocationsMembershipsRbacrolebindingsService) Patch(name string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsMembershipsRbacrolebindingsPatchCall {
11211 c := &ProjectsLocationsMembershipsRbacrolebindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11212 c.name = name
11213 c.rbacrolebinding = rbacrolebinding
11214 return c
11215 }
11216
11217 // UpdateMask sets the optional parameter "updateMask": Required. The fields to
11218 // be updated.
11219 func (c *ProjectsLocationsMembershipsRbacrolebindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMembershipsRbacrolebindingsPatchCall {
11220 c.urlParams_.Set("updateMask", updateMask)
11221 return c
11222 }
11223
11224 // Fields allows partial responses to be retrieved. See
11225 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11226 // details.
11227 func (c *ProjectsLocationsMembershipsRbacrolebindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsRbacrolebindingsPatchCall {
11228 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11229 return c
11230 }
11231
11232 // Context sets the context to be used in this call's Do method.
11233 func (c *ProjectsLocationsMembershipsRbacrolebindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsMembershipsRbacrolebindingsPatchCall {
11234 c.ctx_ = ctx
11235 return c
11236 }
11237
11238 // Header returns a http.Header that can be modified by the caller to add
11239 // headers to the request.
11240 func (c *ProjectsLocationsMembershipsRbacrolebindingsPatchCall) Header() http.Header {
11241 if c.header_ == nil {
11242 c.header_ = make(http.Header)
11243 }
11244 return c.header_
11245 }
11246
11247 func (c *ProjectsLocationsMembershipsRbacrolebindingsPatchCall) doRequest(alt string) (*http.Response, error) {
11248 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11249 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rbacrolebinding)
11250 if err != nil {
11251 return nil, err
11252 }
11253 c.urlParams_.Set("alt", alt)
11254 c.urlParams_.Set("prettyPrint", "false")
11255 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
11256 urls += "?" + c.urlParams_.Encode()
11257 req, err := http.NewRequest("PATCH", urls, body)
11258 if err != nil {
11259 return nil, err
11260 }
11261 req.Header = reqHeaders
11262 googleapi.Expand(req.URL, map[string]string{
11263 "name": c.name,
11264 })
11265 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
11266 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11267 }
11268
11269 // Do executes the "gkehub.projects.locations.memberships.rbacrolebindings.patch" call.
11270 // Any non-2xx status code is an error. Response headers are in either
11271 // *Operation.ServerResponse.Header or (if a response was returned at all) in
11272 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11273 // whether the returned error was because http.StatusNotModified was returned.
11274 func (c *ProjectsLocationsMembershipsRbacrolebindingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11275 gensupport.SetOptions(c.urlParams_, opts...)
11276 res, err := c.doRequest("json")
11277 if res != nil && res.StatusCode == http.StatusNotModified {
11278 if res.Body != nil {
11279 res.Body.Close()
11280 }
11281 return nil, gensupport.WrapError(&googleapi.Error{
11282 Code: res.StatusCode,
11283 Header: res.Header,
11284 })
11285 }
11286 if err != nil {
11287 return nil, err
11288 }
11289 defer googleapi.CloseBody(res)
11290 if err := googleapi.CheckResponse(res); err != nil {
11291 return nil, gensupport.WrapError(err)
11292 }
11293 ret := &Operation{
11294 ServerResponse: googleapi.ServerResponse{
11295 Header: res.Header,
11296 HTTPStatusCode: res.StatusCode,
11297 },
11298 }
11299 target := &ret
11300 b, err := gensupport.DecodeResponseBytes(target, res)
11301 if err != nil {
11302 return nil, err
11303 }
11304 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.patch", "response", internallog.HTTPResponse(res, b))
11305 return ret, nil
11306 }
11307
11308 type ProjectsLocationsOperationsCancelCall struct {
11309 s *Service
11310 name string
11311 canceloperationrequest *CancelOperationRequest
11312 urlParams_ gensupport.URLParams
11313 ctx_ context.Context
11314 header_ http.Header
11315 }
11316
11317 // Cancel: Starts asynchronous cancellation on a long-running operation. The
11318 // server makes a best effort to cancel the operation, but success is not
11319 // guaranteed. If the server doesn't support this method, it returns
11320 // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
11321 // other methods to check whether the cancellation succeeded or whether the
11322 // operation completed despite cancellation. On successful cancellation, the
11323 // operation is not deleted; instead, it becomes an operation with an
11324 // Operation.error value with a google.rpc.Status.code of `1`, corresponding to
11325 // `Code.CANCELLED`.
11326 //
11327 // - name: The name of the operation resource to be cancelled.
11328 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
11329 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11330 c.name = name
11331 c.canceloperationrequest = canceloperationrequest
11332 return c
11333 }
11334
11335 // Fields allows partial responses to be retrieved. See
11336 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11337 // details.
11338 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
11339 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11340 return c
11341 }
11342
11343 // Context sets the context to be used in this call's Do method.
11344 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
11345 c.ctx_ = ctx
11346 return c
11347 }
11348
11349 // Header returns a http.Header that can be modified by the caller to add
11350 // headers to the request.
11351 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
11352 if c.header_ == nil {
11353 c.header_ = make(http.Header)
11354 }
11355 return c.header_
11356 }
11357
11358 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
11359 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11360 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.canceloperationrequest)
11361 if err != nil {
11362 return nil, err
11363 }
11364 c.urlParams_.Set("alt", alt)
11365 c.urlParams_.Set("prettyPrint", "false")
11366 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:cancel")
11367 urls += "?" + c.urlParams_.Encode()
11368 req, err := http.NewRequest("POST", urls, body)
11369 if err != nil {
11370 return nil, err
11371 }
11372 req.Header = reqHeaders
11373 googleapi.Expand(req.URL, map[string]string{
11374 "name": c.name,
11375 })
11376 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.cancel", "request", internallog.HTTPRequest(req, body.Bytes()))
11377 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11378 }
11379
11380 // Do executes the "gkehub.projects.locations.operations.cancel" call.
11381 // Any non-2xx status code is an error. Response headers are in either
11382 // *Empty.ServerResponse.Header or (if a response was returned at all) in
11383 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11384 // whether the returned error was because http.StatusNotModified was returned.
11385 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
11386 gensupport.SetOptions(c.urlParams_, opts...)
11387 res, err := c.doRequest("json")
11388 if res != nil && res.StatusCode == http.StatusNotModified {
11389 if res.Body != nil {
11390 res.Body.Close()
11391 }
11392 return nil, gensupport.WrapError(&googleapi.Error{
11393 Code: res.StatusCode,
11394 Header: res.Header,
11395 })
11396 }
11397 if err != nil {
11398 return nil, err
11399 }
11400 defer googleapi.CloseBody(res)
11401 if err := googleapi.CheckResponse(res); err != nil {
11402 return nil, gensupport.WrapError(err)
11403 }
11404 ret := &Empty{
11405 ServerResponse: googleapi.ServerResponse{
11406 Header: res.Header,
11407 HTTPStatusCode: res.StatusCode,
11408 },
11409 }
11410 target := &ret
11411 b, err := gensupport.DecodeResponseBytes(target, res)
11412 if err != nil {
11413 return nil, err
11414 }
11415 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.cancel", "response", internallog.HTTPResponse(res, b))
11416 return ret, nil
11417 }
11418
11419 type ProjectsLocationsOperationsDeleteCall struct {
11420 s *Service
11421 name string
11422 urlParams_ gensupport.URLParams
11423 ctx_ context.Context
11424 header_ http.Header
11425 }
11426
11427 // Delete: Deletes a long-running operation. This method indicates that the
11428 // client is no longer interested in the operation result. It does not cancel
11429 // the operation. If the server doesn't support this method, it returns
11430 // `google.rpc.Code.UNIMPLEMENTED`.
11431 //
11432 // - name: The name of the operation resource to be deleted.
11433 func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
11434 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11435 c.name = name
11436 return c
11437 }
11438
11439 // Fields allows partial responses to be retrieved. See
11440 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11441 // details.
11442 func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
11443 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11444 return c
11445 }
11446
11447 // Context sets the context to be used in this call's Do method.
11448 func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
11449 c.ctx_ = ctx
11450 return c
11451 }
11452
11453 // Header returns a http.Header that can be modified by the caller to add
11454 // headers to the request.
11455 func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
11456 if c.header_ == nil {
11457 c.header_ = make(http.Header)
11458 }
11459 return c.header_
11460 }
11461
11462 func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
11463 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11464 c.urlParams_.Set("alt", alt)
11465 c.urlParams_.Set("prettyPrint", "false")
11466 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
11467 urls += "?" + c.urlParams_.Encode()
11468 req, err := http.NewRequest("DELETE", urls, nil)
11469 if err != nil {
11470 return nil, err
11471 }
11472 req.Header = reqHeaders
11473 googleapi.Expand(req.URL, map[string]string{
11474 "name": c.name,
11475 })
11476 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.delete", "request", internallog.HTTPRequest(req, nil))
11477 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11478 }
11479
11480 // Do executes the "gkehub.projects.locations.operations.delete" call.
11481 // Any non-2xx status code is an error. Response headers are in either
11482 // *Empty.ServerResponse.Header or (if a response was returned at all) in
11483 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11484 // whether the returned error was because http.StatusNotModified was returned.
11485 func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
11486 gensupport.SetOptions(c.urlParams_, opts...)
11487 res, err := c.doRequest("json")
11488 if res != nil && res.StatusCode == http.StatusNotModified {
11489 if res.Body != nil {
11490 res.Body.Close()
11491 }
11492 return nil, gensupport.WrapError(&googleapi.Error{
11493 Code: res.StatusCode,
11494 Header: res.Header,
11495 })
11496 }
11497 if err != nil {
11498 return nil, err
11499 }
11500 defer googleapi.CloseBody(res)
11501 if err := googleapi.CheckResponse(res); err != nil {
11502 return nil, gensupport.WrapError(err)
11503 }
11504 ret := &Empty{
11505 ServerResponse: googleapi.ServerResponse{
11506 Header: res.Header,
11507 HTTPStatusCode: res.StatusCode,
11508 },
11509 }
11510 target := &ret
11511 b, err := gensupport.DecodeResponseBytes(target, res)
11512 if err != nil {
11513 return nil, err
11514 }
11515 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.delete", "response", internallog.HTTPResponse(res, b))
11516 return ret, nil
11517 }
11518
11519 type ProjectsLocationsOperationsGetCall struct {
11520 s *Service
11521 name string
11522 urlParams_ gensupport.URLParams
11523 ifNoneMatch_ string
11524 ctx_ context.Context
11525 header_ http.Header
11526 }
11527
11528 // Get: Gets the latest state of a long-running operation. Clients can use this
11529 // method to poll the operation result at intervals as recommended by the API
11530 // service.
11531 //
11532 // - name: The name of the operation resource.
11533 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
11534 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11535 c.name = name
11536 return c
11537 }
11538
11539 // Fields allows partial responses to be retrieved. See
11540 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11541 // details.
11542 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
11543 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11544 return c
11545 }
11546
11547 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11548 // object's ETag matches the given value. This is useful for getting updates
11549 // only after the object has changed since the last request.
11550 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
11551 c.ifNoneMatch_ = entityTag
11552 return c
11553 }
11554
11555 // Context sets the context to be used in this call's Do method.
11556 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
11557 c.ctx_ = ctx
11558 return c
11559 }
11560
11561 // Header returns a http.Header that can be modified by the caller to add
11562 // headers to the request.
11563 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
11564 if c.header_ == nil {
11565 c.header_ = make(http.Header)
11566 }
11567 return c.header_
11568 }
11569
11570 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
11571 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11572 if c.ifNoneMatch_ != "" {
11573 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11574 }
11575 c.urlParams_.Set("alt", alt)
11576 c.urlParams_.Set("prettyPrint", "false")
11577 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
11578 urls += "?" + c.urlParams_.Encode()
11579 req, err := http.NewRequest("GET", urls, nil)
11580 if err != nil {
11581 return nil, err
11582 }
11583 req.Header = reqHeaders
11584 googleapi.Expand(req.URL, map[string]string{
11585 "name": c.name,
11586 })
11587 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.get", "request", internallog.HTTPRequest(req, nil))
11588 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11589 }
11590
11591 // Do executes the "gkehub.projects.locations.operations.get" call.
11592 // Any non-2xx status code is an error. Response headers are in either
11593 // *Operation.ServerResponse.Header or (if a response was returned at all) in
11594 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11595 // whether the returned error was because http.StatusNotModified was returned.
11596 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11597 gensupport.SetOptions(c.urlParams_, opts...)
11598 res, err := c.doRequest("json")
11599 if res != nil && res.StatusCode == http.StatusNotModified {
11600 if res.Body != nil {
11601 res.Body.Close()
11602 }
11603 return nil, gensupport.WrapError(&googleapi.Error{
11604 Code: res.StatusCode,
11605 Header: res.Header,
11606 })
11607 }
11608 if err != nil {
11609 return nil, err
11610 }
11611 defer googleapi.CloseBody(res)
11612 if err := googleapi.CheckResponse(res); err != nil {
11613 return nil, gensupport.WrapError(err)
11614 }
11615 ret := &Operation{
11616 ServerResponse: googleapi.ServerResponse{
11617 Header: res.Header,
11618 HTTPStatusCode: res.StatusCode,
11619 },
11620 }
11621 target := &ret
11622 b, err := gensupport.DecodeResponseBytes(target, res)
11623 if err != nil {
11624 return nil, err
11625 }
11626 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.get", "response", internallog.HTTPResponse(res, b))
11627 return ret, nil
11628 }
11629
11630 type ProjectsLocationsOperationsListCall struct {
11631 s *Service
11632 name string
11633 urlParams_ gensupport.URLParams
11634 ifNoneMatch_ string
11635 ctx_ context.Context
11636 header_ http.Header
11637 }
11638
11639 // List: Lists operations that match the specified filter in the request. If
11640 // the server doesn't support this method, it returns `UNIMPLEMENTED`.
11641 //
11642 // - name: The name of the operation's parent resource.
11643 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
11644 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11645 c.name = name
11646 return c
11647 }
11648
11649 // Filter sets the optional parameter "filter": The standard list filter.
11650 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
11651 c.urlParams_.Set("filter", filter)
11652 return c
11653 }
11654
11655 // PageSize sets the optional parameter "pageSize": The standard list page
11656 // size.
11657 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
11658 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11659 return c
11660 }
11661
11662 // PageToken sets the optional parameter "pageToken": The standard list page
11663 // token.
11664 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
11665 c.urlParams_.Set("pageToken", pageToken)
11666 return c
11667 }
11668
11669 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess":
11670 // When set to `true`, operations that are reachable are returned as normal,
11671 // and those that are unreachable are returned in the
11672 // ListOperationsResponse.unreachable field. This can only be `true` when
11673 // reading across collections. For example, when `parent` is set to
11674 // "projects/example/locations/-". This field is not supported by default and
11675 // will result in an `UNIMPLEMENTED` error if set unless explicitly documented
11676 // otherwise in service or product specific documentation.
11677 func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall {
11678 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
11679 return c
11680 }
11681
11682 // Fields allows partial responses to be retrieved. See
11683 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11684 // details.
11685 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
11686 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11687 return c
11688 }
11689
11690 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11691 // object's ETag matches the given value. This is useful for getting updates
11692 // only after the object has changed since the last request.
11693 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
11694 c.ifNoneMatch_ = entityTag
11695 return c
11696 }
11697
11698 // Context sets the context to be used in this call's Do method.
11699 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
11700 c.ctx_ = ctx
11701 return c
11702 }
11703
11704 // Header returns a http.Header that can be modified by the caller to add
11705 // headers to the request.
11706 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
11707 if c.header_ == nil {
11708 c.header_ = make(http.Header)
11709 }
11710 return c.header_
11711 }
11712
11713 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
11714 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11715 if c.ifNoneMatch_ != "" {
11716 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11717 }
11718 c.urlParams_.Set("alt", alt)
11719 c.urlParams_.Set("prettyPrint", "false")
11720 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations")
11721 urls += "?" + c.urlParams_.Encode()
11722 req, err := http.NewRequest("GET", urls, nil)
11723 if err != nil {
11724 return nil, err
11725 }
11726 req.Header = reqHeaders
11727 googleapi.Expand(req.URL, map[string]string{
11728 "name": c.name,
11729 })
11730 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.list", "request", internallog.HTTPRequest(req, nil))
11731 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11732 }
11733
11734 // Do executes the "gkehub.projects.locations.operations.list" call.
11735 // Any non-2xx status code is an error. Response headers are in either
11736 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
11737 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11738 // check whether the returned error was because http.StatusNotModified was
11739 // returned.
11740 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
11741 gensupport.SetOptions(c.urlParams_, opts...)
11742 res, err := c.doRequest("json")
11743 if res != nil && res.StatusCode == http.StatusNotModified {
11744 if res.Body != nil {
11745 res.Body.Close()
11746 }
11747 return nil, gensupport.WrapError(&googleapi.Error{
11748 Code: res.StatusCode,
11749 Header: res.Header,
11750 })
11751 }
11752 if err != nil {
11753 return nil, err
11754 }
11755 defer googleapi.CloseBody(res)
11756 if err := googleapi.CheckResponse(res); err != nil {
11757 return nil, gensupport.WrapError(err)
11758 }
11759 ret := &ListOperationsResponse{
11760 ServerResponse: googleapi.ServerResponse{
11761 Header: res.Header,
11762 HTTPStatusCode: res.StatusCode,
11763 },
11764 }
11765 target := &ret
11766 b, err := gensupport.DecodeResponseBytes(target, res)
11767 if err != nil {
11768 return nil, err
11769 }
11770 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.list", "response", internallog.HTTPResponse(res, b))
11771 return ret, nil
11772 }
11773
11774 // Pages invokes f for each page of results.
11775 // A non-nil error returned from f will halt the iteration.
11776 // The provided context supersedes any context provided to the Context method.
11777 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
11778 c.ctx_ = ctx
11779 defer c.PageToken(c.urlParams_.Get("pageToken"))
11780 for {
11781 x, err := c.Do()
11782 if err != nil {
11783 return err
11784 }
11785 if err := f(x); err != nil {
11786 return err
11787 }
11788 if x.NextPageToken == "" {
11789 return nil
11790 }
11791 c.PageToken(x.NextPageToken)
11792 }
11793 }
11794
11795 type ProjectsLocationsRolloutSequencesCreateCall struct {
11796 s *Service
11797 parent string
11798 rolloutsequence *RolloutSequence
11799 urlParams_ gensupport.URLParams
11800 ctx_ context.Context
11801 header_ http.Header
11802 }
11803
11804 // Create: Create a new rollout sequence resource.
11805 //
11806 // - parent: The parent resource where this rollout sequence will be created.
11807 // projects/{project}/locations/{location}.
11808 func (r *ProjectsLocationsRolloutSequencesService) Create(parent string, rolloutsequence *RolloutSequence) *ProjectsLocationsRolloutSequencesCreateCall {
11809 c := &ProjectsLocationsRolloutSequencesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11810 c.parent = parent
11811 c.rolloutsequence = rolloutsequence
11812 return c
11813 }
11814
11815 // RolloutSequenceId sets the optional parameter "rolloutSequenceId": Required.
11816 // User provided identifier that is used as part of the resource name; must
11817 // conform to RFC-1034 and additionally restrict to lower-cased letters. This
11818 // comes out roughly to: /^a-z+[a-z0-9]$/
11819 func (c *ProjectsLocationsRolloutSequencesCreateCall) RolloutSequenceId(rolloutSequenceId string) *ProjectsLocationsRolloutSequencesCreateCall {
11820 c.urlParams_.Set("rolloutSequenceId", rolloutSequenceId)
11821 return c
11822 }
11823
11824 // Fields allows partial responses to be retrieved. See
11825 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11826 // details.
11827 func (c *ProjectsLocationsRolloutSequencesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutSequencesCreateCall {
11828 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11829 return c
11830 }
11831
11832 // Context sets the context to be used in this call's Do method.
11833 func (c *ProjectsLocationsRolloutSequencesCreateCall) Context(ctx context.Context) *ProjectsLocationsRolloutSequencesCreateCall {
11834 c.ctx_ = ctx
11835 return c
11836 }
11837
11838 // Header returns a http.Header that can be modified by the caller to add
11839 // headers to the request.
11840 func (c *ProjectsLocationsRolloutSequencesCreateCall) Header() http.Header {
11841 if c.header_ == nil {
11842 c.header_ = make(http.Header)
11843 }
11844 return c.header_
11845 }
11846
11847 func (c *ProjectsLocationsRolloutSequencesCreateCall) doRequest(alt string) (*http.Response, error) {
11848 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11849 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rolloutsequence)
11850 if err != nil {
11851 return nil, err
11852 }
11853 c.urlParams_.Set("alt", alt)
11854 c.urlParams_.Set("prettyPrint", "false")
11855 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/rolloutSequences")
11856 urls += "?" + c.urlParams_.Encode()
11857 req, err := http.NewRequest("POST", urls, body)
11858 if err != nil {
11859 return nil, err
11860 }
11861 req.Header = reqHeaders
11862 googleapi.Expand(req.URL, map[string]string{
11863 "parent": c.parent,
11864 })
11865 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.create", "request", internallog.HTTPRequest(req, body.Bytes()))
11866 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11867 }
11868
11869 // Do executes the "gkehub.projects.locations.rolloutSequences.create" call.
11870 // Any non-2xx status code is an error. Response headers are in either
11871 // *Operation.ServerResponse.Header or (if a response was returned at all) in
11872 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11873 // whether the returned error was because http.StatusNotModified was returned.
11874 func (c *ProjectsLocationsRolloutSequencesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11875 gensupport.SetOptions(c.urlParams_, opts...)
11876 res, err := c.doRequest("json")
11877 if res != nil && res.StatusCode == http.StatusNotModified {
11878 if res.Body != nil {
11879 res.Body.Close()
11880 }
11881 return nil, gensupport.WrapError(&googleapi.Error{
11882 Code: res.StatusCode,
11883 Header: res.Header,
11884 })
11885 }
11886 if err != nil {
11887 return nil, err
11888 }
11889 defer googleapi.CloseBody(res)
11890 if err := googleapi.CheckResponse(res); err != nil {
11891 return nil, gensupport.WrapError(err)
11892 }
11893 ret := &Operation{
11894 ServerResponse: googleapi.ServerResponse{
11895 Header: res.Header,
11896 HTTPStatusCode: res.StatusCode,
11897 },
11898 }
11899 target := &ret
11900 b, err := gensupport.DecodeResponseBytes(target, res)
11901 if err != nil {
11902 return nil, err
11903 }
11904 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.create", "response", internallog.HTTPResponse(res, b))
11905 return ret, nil
11906 }
11907
11908 type ProjectsLocationsRolloutSequencesDeleteCall struct {
11909 s *Service
11910 name string
11911 urlParams_ gensupport.URLParams
11912 ctx_ context.Context
11913 header_ http.Header
11914 }
11915
11916 // Delete: Remove a RolloutSequence.
11917 //
11918 // - name: The name of the rollout sequence to delete.
11919 // projects/{project}/locations/{location}/rolloutSequences/{rollout_sequence}.
11920 func (r *ProjectsLocationsRolloutSequencesService) Delete(name string) *ProjectsLocationsRolloutSequencesDeleteCall {
11921 c := &ProjectsLocationsRolloutSequencesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11922 c.name = name
11923 return c
11924 }
11925
11926 // Fields allows partial responses to be retrieved. See
11927 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11928 // details.
11929 func (c *ProjectsLocationsRolloutSequencesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutSequencesDeleteCall {
11930 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11931 return c
11932 }
11933
11934 // Context sets the context to be used in this call's Do method.
11935 func (c *ProjectsLocationsRolloutSequencesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRolloutSequencesDeleteCall {
11936 c.ctx_ = ctx
11937 return c
11938 }
11939
11940 // Header returns a http.Header that can be modified by the caller to add
11941 // headers to the request.
11942 func (c *ProjectsLocationsRolloutSequencesDeleteCall) Header() http.Header {
11943 if c.header_ == nil {
11944 c.header_ = make(http.Header)
11945 }
11946 return c.header_
11947 }
11948
11949 func (c *ProjectsLocationsRolloutSequencesDeleteCall) doRequest(alt string) (*http.Response, error) {
11950 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11951 c.urlParams_.Set("alt", alt)
11952 c.urlParams_.Set("prettyPrint", "false")
11953 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
11954 urls += "?" + c.urlParams_.Encode()
11955 req, err := http.NewRequest("DELETE", urls, nil)
11956 if err != nil {
11957 return nil, err
11958 }
11959 req.Header = reqHeaders
11960 googleapi.Expand(req.URL, map[string]string{
11961 "name": c.name,
11962 })
11963 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.delete", "request", internallog.HTTPRequest(req, nil))
11964 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11965 }
11966
11967 // Do executes the "gkehub.projects.locations.rolloutSequences.delete" call.
11968 // Any non-2xx status code is an error. Response headers are in either
11969 // *Operation.ServerResponse.Header or (if a response was returned at all) in
11970 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11971 // whether the returned error was because http.StatusNotModified was returned.
11972 func (c *ProjectsLocationsRolloutSequencesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11973 gensupport.SetOptions(c.urlParams_, opts...)
11974 res, err := c.doRequest("json")
11975 if res != nil && res.StatusCode == http.StatusNotModified {
11976 if res.Body != nil {
11977 res.Body.Close()
11978 }
11979 return nil, gensupport.WrapError(&googleapi.Error{
11980 Code: res.StatusCode,
11981 Header: res.Header,
11982 })
11983 }
11984 if err != nil {
11985 return nil, err
11986 }
11987 defer googleapi.CloseBody(res)
11988 if err := googleapi.CheckResponse(res); err != nil {
11989 return nil, gensupport.WrapError(err)
11990 }
11991 ret := &Operation{
11992 ServerResponse: googleapi.ServerResponse{
11993 Header: res.Header,
11994 HTTPStatusCode: res.StatusCode,
11995 },
11996 }
11997 target := &ret
11998 b, err := gensupport.DecodeResponseBytes(target, res)
11999 if err != nil {
12000 return nil, err
12001 }
12002 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.delete", "response", internallog.HTTPResponse(res, b))
12003 return ret, nil
12004 }
12005
12006 type ProjectsLocationsRolloutSequencesGetCall struct {
12007 s *Service
12008 name string
12009 urlParams_ gensupport.URLParams
12010 ifNoneMatch_ string
12011 ctx_ context.Context
12012 header_ http.Header
12013 }
12014
12015 // Get: Retrieve a single rollout sequence.
12016 //
12017 // - name: The name of the rollout sequence to retrieve.
12018 // projects/{project}/locations/{location}/rolloutSequences/{rollout_sequence}.
12019 func (r *ProjectsLocationsRolloutSequencesService) Get(name string) *ProjectsLocationsRolloutSequencesGetCall {
12020 c := &ProjectsLocationsRolloutSequencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12021 c.name = name
12022 return c
12023 }
12024
12025 // Fields allows partial responses to be retrieved. See
12026 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12027 // details.
12028 func (c *ProjectsLocationsRolloutSequencesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutSequencesGetCall {
12029 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12030 return c
12031 }
12032
12033 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12034 // object's ETag matches the given value. This is useful for getting updates
12035 // only after the object has changed since the last request.
12036 func (c *ProjectsLocationsRolloutSequencesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRolloutSequencesGetCall {
12037 c.ifNoneMatch_ = entityTag
12038 return c
12039 }
12040
12041 // Context sets the context to be used in this call's Do method.
12042 func (c *ProjectsLocationsRolloutSequencesGetCall) Context(ctx context.Context) *ProjectsLocationsRolloutSequencesGetCall {
12043 c.ctx_ = ctx
12044 return c
12045 }
12046
12047 // Header returns a http.Header that can be modified by the caller to add
12048 // headers to the request.
12049 func (c *ProjectsLocationsRolloutSequencesGetCall) Header() http.Header {
12050 if c.header_ == nil {
12051 c.header_ = make(http.Header)
12052 }
12053 return c.header_
12054 }
12055
12056 func (c *ProjectsLocationsRolloutSequencesGetCall) doRequest(alt string) (*http.Response, error) {
12057 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12058 if c.ifNoneMatch_ != "" {
12059 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12060 }
12061 c.urlParams_.Set("alt", alt)
12062 c.urlParams_.Set("prettyPrint", "false")
12063 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
12064 urls += "?" + c.urlParams_.Encode()
12065 req, err := http.NewRequest("GET", urls, nil)
12066 if err != nil {
12067 return nil, err
12068 }
12069 req.Header = reqHeaders
12070 googleapi.Expand(req.URL, map[string]string{
12071 "name": c.name,
12072 })
12073 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.get", "request", internallog.HTTPRequest(req, nil))
12074 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12075 }
12076
12077 // Do executes the "gkehub.projects.locations.rolloutSequences.get" call.
12078 // Any non-2xx status code is an error. Response headers are in either
12079 // *RolloutSequence.ServerResponse.Header or (if a response was returned at
12080 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12081 // check whether the returned error was because http.StatusNotModified was
12082 // returned.
12083 func (c *ProjectsLocationsRolloutSequencesGetCall) Do(opts ...googleapi.CallOption) (*RolloutSequence, error) {
12084 gensupport.SetOptions(c.urlParams_, opts...)
12085 res, err := c.doRequest("json")
12086 if res != nil && res.StatusCode == http.StatusNotModified {
12087 if res.Body != nil {
12088 res.Body.Close()
12089 }
12090 return nil, gensupport.WrapError(&googleapi.Error{
12091 Code: res.StatusCode,
12092 Header: res.Header,
12093 })
12094 }
12095 if err != nil {
12096 return nil, err
12097 }
12098 defer googleapi.CloseBody(res)
12099 if err := googleapi.CheckResponse(res); err != nil {
12100 return nil, gensupport.WrapError(err)
12101 }
12102 ret := &RolloutSequence{
12103 ServerResponse: googleapi.ServerResponse{
12104 Header: res.Header,
12105 HTTPStatusCode: res.StatusCode,
12106 },
12107 }
12108 target := &ret
12109 b, err := gensupport.DecodeResponseBytes(target, res)
12110 if err != nil {
12111 return nil, err
12112 }
12113 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.get", "response", internallog.HTTPResponse(res, b))
12114 return ret, nil
12115 }
12116
12117 type ProjectsLocationsRolloutSequencesListCall struct {
12118 s *Service
12119 parent string
12120 urlParams_ gensupport.URLParams
12121 ifNoneMatch_ string
12122 ctx_ context.Context
12123 header_ http.Header
12124 }
12125
12126 // List: Retrieve the list of all rollout sequences.
12127 //
12128 // - parent: The parent, which owns this collection of rollout sequences.
12129 // Format: projects/{project}/locations/{location}.
12130 func (r *ProjectsLocationsRolloutSequencesService) List(parent string) *ProjectsLocationsRolloutSequencesListCall {
12131 c := &ProjectsLocationsRolloutSequencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12132 c.parent = parent
12133 return c
12134 }
12135
12136 // Filter sets the optional parameter "filter": Lists Rollout Sequences that
12137 // match the filter expression, following the syntax outlined in
12138 // https://google.aip.dev/160.
12139 func (c *ProjectsLocationsRolloutSequencesListCall) Filter(filter string) *ProjectsLocationsRolloutSequencesListCall {
12140 c.urlParams_.Set("filter", filter)
12141 return c
12142 }
12143
12144 // PageSize sets the optional parameter "pageSize": The maximum number of
12145 // rollout sequences to return. The service may return fewer than this value.
12146 // If unspecified, at most 50 rollout sequences will be returned. The maximum
12147 // value is 1000; values above 1000 will be coerced to 1000.
12148 func (c *ProjectsLocationsRolloutSequencesListCall) PageSize(pageSize int64) *ProjectsLocationsRolloutSequencesListCall {
12149 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12150 return c
12151 }
12152
12153 // PageToken sets the optional parameter "pageToken": A page token, received
12154 // from a previous `ListRolloutSequences` call. Provide this to retrieve the
12155 // subsequent page. When paginating, all other parameters provided to
12156 // `ListRolloutSequences` must match the call that provided the page token.
12157 func (c *ProjectsLocationsRolloutSequencesListCall) PageToken(pageToken string) *ProjectsLocationsRolloutSequencesListCall {
12158 c.urlParams_.Set("pageToken", pageToken)
12159 return c
12160 }
12161
12162 // Fields allows partial responses to be retrieved. See
12163 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12164 // details.
12165 func (c *ProjectsLocationsRolloutSequencesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutSequencesListCall {
12166 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12167 return c
12168 }
12169
12170 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12171 // object's ETag matches the given value. This is useful for getting updates
12172 // only after the object has changed since the last request.
12173 func (c *ProjectsLocationsRolloutSequencesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRolloutSequencesListCall {
12174 c.ifNoneMatch_ = entityTag
12175 return c
12176 }
12177
12178 // Context sets the context to be used in this call's Do method.
12179 func (c *ProjectsLocationsRolloutSequencesListCall) Context(ctx context.Context) *ProjectsLocationsRolloutSequencesListCall {
12180 c.ctx_ = ctx
12181 return c
12182 }
12183
12184 // Header returns a http.Header that can be modified by the caller to add
12185 // headers to the request.
12186 func (c *ProjectsLocationsRolloutSequencesListCall) Header() http.Header {
12187 if c.header_ == nil {
12188 c.header_ = make(http.Header)
12189 }
12190 return c.header_
12191 }
12192
12193 func (c *ProjectsLocationsRolloutSequencesListCall) doRequest(alt string) (*http.Response, error) {
12194 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12195 if c.ifNoneMatch_ != "" {
12196 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12197 }
12198 c.urlParams_.Set("alt", alt)
12199 c.urlParams_.Set("prettyPrint", "false")
12200 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/rolloutSequences")
12201 urls += "?" + c.urlParams_.Encode()
12202 req, err := http.NewRequest("GET", urls, nil)
12203 if err != nil {
12204 return nil, err
12205 }
12206 req.Header = reqHeaders
12207 googleapi.Expand(req.URL, map[string]string{
12208 "parent": c.parent,
12209 })
12210 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.list", "request", internallog.HTTPRequest(req, nil))
12211 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12212 }
12213
12214 // Do executes the "gkehub.projects.locations.rolloutSequences.list" call.
12215 // Any non-2xx status code is an error. Response headers are in either
12216 // *ListRolloutSequencesResponse.ServerResponse.Header or (if a response was
12217 // returned at all) in error.(*googleapi.Error).Header. Use
12218 // googleapi.IsNotModified to check whether the returned error was because
12219 // http.StatusNotModified was returned.
12220 func (c *ProjectsLocationsRolloutSequencesListCall) Do(opts ...googleapi.CallOption) (*ListRolloutSequencesResponse, error) {
12221 gensupport.SetOptions(c.urlParams_, opts...)
12222 res, err := c.doRequest("json")
12223 if res != nil && res.StatusCode == http.StatusNotModified {
12224 if res.Body != nil {
12225 res.Body.Close()
12226 }
12227 return nil, gensupport.WrapError(&googleapi.Error{
12228 Code: res.StatusCode,
12229 Header: res.Header,
12230 })
12231 }
12232 if err != nil {
12233 return nil, err
12234 }
12235 defer googleapi.CloseBody(res)
12236 if err := googleapi.CheckResponse(res); err != nil {
12237 return nil, gensupport.WrapError(err)
12238 }
12239 ret := &ListRolloutSequencesResponse{
12240 ServerResponse: googleapi.ServerResponse{
12241 Header: res.Header,
12242 HTTPStatusCode: res.StatusCode,
12243 },
12244 }
12245 target := &ret
12246 b, err := gensupport.DecodeResponseBytes(target, res)
12247 if err != nil {
12248 return nil, err
12249 }
12250 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.list", "response", internallog.HTTPResponse(res, b))
12251 return ret, nil
12252 }
12253
12254 // Pages invokes f for each page of results.
12255 // A non-nil error returned from f will halt the iteration.
12256 // The provided context supersedes any context provided to the Context method.
12257 func (c *ProjectsLocationsRolloutSequencesListCall) Pages(ctx context.Context, f func(*ListRolloutSequencesResponse) error) error {
12258 c.ctx_ = ctx
12259 defer c.PageToken(c.urlParams_.Get("pageToken"))
12260 for {
12261 x, err := c.Do()
12262 if err != nil {
12263 return err
12264 }
12265 if err := f(x); err != nil {
12266 return err
12267 }
12268 if x.NextPageToken == "" {
12269 return nil
12270 }
12271 c.PageToken(x.NextPageToken)
12272 }
12273 }
12274
12275 type ProjectsLocationsRolloutSequencesPatchCall struct {
12276 s *Service
12277 name string
12278 rolloutsequence *RolloutSequence
12279 urlParams_ gensupport.URLParams
12280 ctx_ context.Context
12281 header_ http.Header
12282 }
12283
12284 // Patch: Update a rollout sequence.
12285 //
12286 // - name: Identifier. Name of the rollout sequence in the format of:
12287 // projects/{PROJECT_ID}/locations/global/rolloutSequences/{NAME}.
12288 func (r *ProjectsLocationsRolloutSequencesService) Patch(name string, rolloutsequence *RolloutSequence) *ProjectsLocationsRolloutSequencesPatchCall {
12289 c := &ProjectsLocationsRolloutSequencesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12290 c.name = name
12291 c.rolloutsequence = rolloutsequence
12292 return c
12293 }
12294
12295 // UpdateMask sets the optional parameter "updateMask": The list of fields to
12296 // update.
12297 func (c *ProjectsLocationsRolloutSequencesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRolloutSequencesPatchCall {
12298 c.urlParams_.Set("updateMask", updateMask)
12299 return c
12300 }
12301
12302 // Fields allows partial responses to be retrieved. See
12303 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12304 // details.
12305 func (c *ProjectsLocationsRolloutSequencesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutSequencesPatchCall {
12306 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12307 return c
12308 }
12309
12310 // Context sets the context to be used in this call's Do method.
12311 func (c *ProjectsLocationsRolloutSequencesPatchCall) Context(ctx context.Context) *ProjectsLocationsRolloutSequencesPatchCall {
12312 c.ctx_ = ctx
12313 return c
12314 }
12315
12316 // Header returns a http.Header that can be modified by the caller to add
12317 // headers to the request.
12318 func (c *ProjectsLocationsRolloutSequencesPatchCall) Header() http.Header {
12319 if c.header_ == nil {
12320 c.header_ = make(http.Header)
12321 }
12322 return c.header_
12323 }
12324
12325 func (c *ProjectsLocationsRolloutSequencesPatchCall) doRequest(alt string) (*http.Response, error) {
12326 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12327 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rolloutsequence)
12328 if err != nil {
12329 return nil, err
12330 }
12331 c.urlParams_.Set("alt", alt)
12332 c.urlParams_.Set("prettyPrint", "false")
12333 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
12334 urls += "?" + c.urlParams_.Encode()
12335 req, err := http.NewRequest("PATCH", urls, body)
12336 if err != nil {
12337 return nil, err
12338 }
12339 req.Header = reqHeaders
12340 googleapi.Expand(req.URL, map[string]string{
12341 "name": c.name,
12342 })
12343 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
12344 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12345 }
12346
12347 // Do executes the "gkehub.projects.locations.rolloutSequences.patch" call.
12348 // Any non-2xx status code is an error. Response headers are in either
12349 // *Operation.ServerResponse.Header or (if a response was returned at all) in
12350 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12351 // whether the returned error was because http.StatusNotModified was returned.
12352 func (c *ProjectsLocationsRolloutSequencesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12353 gensupport.SetOptions(c.urlParams_, opts...)
12354 res, err := c.doRequest("json")
12355 if res != nil && res.StatusCode == http.StatusNotModified {
12356 if res.Body != nil {
12357 res.Body.Close()
12358 }
12359 return nil, gensupport.WrapError(&googleapi.Error{
12360 Code: res.StatusCode,
12361 Header: res.Header,
12362 })
12363 }
12364 if err != nil {
12365 return nil, err
12366 }
12367 defer googleapi.CloseBody(res)
12368 if err := googleapi.CheckResponse(res); err != nil {
12369 return nil, gensupport.WrapError(err)
12370 }
12371 ret := &Operation{
12372 ServerResponse: googleapi.ServerResponse{
12373 Header: res.Header,
12374 HTTPStatusCode: res.StatusCode,
12375 },
12376 }
12377 target := &ret
12378 b, err := gensupport.DecodeResponseBytes(target, res)
12379 if err != nil {
12380 return nil, err
12381 }
12382 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.patch", "response", internallog.HTTPResponse(res, b))
12383 return ret, nil
12384 }
12385
12386 type ProjectsLocationsRolloutsGetCall struct {
12387 s *Service
12388 name string
12389 urlParams_ gensupport.URLParams
12390 ifNoneMatch_ string
12391 ctx_ context.Context
12392 header_ http.Header
12393 }
12394
12395 // Get: Retrieve a single rollout.
12396 //
12397 // - name: The name of the rollout to retrieve.
12398 // projects/{project}/locations/{location}/rollouts/{rollout}.
12399 func (r *ProjectsLocationsRolloutsService) Get(name string) *ProjectsLocationsRolloutsGetCall {
12400 c := &ProjectsLocationsRolloutsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12401 c.name = name
12402 return c
12403 }
12404
12405 // Fields allows partial responses to be retrieved. See
12406 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12407 // details.
12408 func (c *ProjectsLocationsRolloutsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutsGetCall {
12409 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12410 return c
12411 }
12412
12413 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12414 // object's ETag matches the given value. This is useful for getting updates
12415 // only after the object has changed since the last request.
12416 func (c *ProjectsLocationsRolloutsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRolloutsGetCall {
12417 c.ifNoneMatch_ = entityTag
12418 return c
12419 }
12420
12421 // Context sets the context to be used in this call's Do method.
12422 func (c *ProjectsLocationsRolloutsGetCall) Context(ctx context.Context) *ProjectsLocationsRolloutsGetCall {
12423 c.ctx_ = ctx
12424 return c
12425 }
12426
12427 // Header returns a http.Header that can be modified by the caller to add
12428 // headers to the request.
12429 func (c *ProjectsLocationsRolloutsGetCall) Header() http.Header {
12430 if c.header_ == nil {
12431 c.header_ = make(http.Header)
12432 }
12433 return c.header_
12434 }
12435
12436 func (c *ProjectsLocationsRolloutsGetCall) doRequest(alt string) (*http.Response, error) {
12437 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12438 if c.ifNoneMatch_ != "" {
12439 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12440 }
12441 c.urlParams_.Set("alt", alt)
12442 c.urlParams_.Set("prettyPrint", "false")
12443 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
12444 urls += "?" + c.urlParams_.Encode()
12445 req, err := http.NewRequest("GET", urls, nil)
12446 if err != nil {
12447 return nil, err
12448 }
12449 req.Header = reqHeaders
12450 googleapi.Expand(req.URL, map[string]string{
12451 "name": c.name,
12452 })
12453 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rollouts.get", "request", internallog.HTTPRequest(req, nil))
12454 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12455 }
12456
12457 // Do executes the "gkehub.projects.locations.rollouts.get" call.
12458 // Any non-2xx status code is an error. Response headers are in either
12459 // *Rollout.ServerResponse.Header or (if a response was returned at all) in
12460 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12461 // whether the returned error was because http.StatusNotModified was returned.
12462 func (c *ProjectsLocationsRolloutsGetCall) Do(opts ...googleapi.CallOption) (*Rollout, error) {
12463 gensupport.SetOptions(c.urlParams_, opts...)
12464 res, err := c.doRequest("json")
12465 if res != nil && res.StatusCode == http.StatusNotModified {
12466 if res.Body != nil {
12467 res.Body.Close()
12468 }
12469 return nil, gensupport.WrapError(&googleapi.Error{
12470 Code: res.StatusCode,
12471 Header: res.Header,
12472 })
12473 }
12474 if err != nil {
12475 return nil, err
12476 }
12477 defer googleapi.CloseBody(res)
12478 if err := googleapi.CheckResponse(res); err != nil {
12479 return nil, gensupport.WrapError(err)
12480 }
12481 ret := &Rollout{
12482 ServerResponse: googleapi.ServerResponse{
12483 Header: res.Header,
12484 HTTPStatusCode: res.StatusCode,
12485 },
12486 }
12487 target := &ret
12488 b, err := gensupport.DecodeResponseBytes(target, res)
12489 if err != nil {
12490 return nil, err
12491 }
12492 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rollouts.get", "response", internallog.HTTPResponse(res, b))
12493 return ret, nil
12494 }
12495
12496 type ProjectsLocationsRolloutsListCall struct {
12497 s *Service
12498 parent string
12499 urlParams_ gensupport.URLParams
12500 ifNoneMatch_ string
12501 ctx_ context.Context
12502 header_ http.Header
12503 }
12504
12505 // List: Retrieve the list of all rollouts.
12506 //
12507 // - parent: The parent, which owns this collection of rollout. Format:
12508 // projects/{project}/locations/{location}.
12509 func (r *ProjectsLocationsRolloutsService) List(parent string) *ProjectsLocationsRolloutsListCall {
12510 c := &ProjectsLocationsRolloutsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12511 c.parent = parent
12512 return c
12513 }
12514
12515 // Filter sets the optional parameter "filter": Lists Rollouts that match the
12516 // filter expression, following the syntax outlined in
12517 // https://google.aip.dev/160.
12518 func (c *ProjectsLocationsRolloutsListCall) Filter(filter string) *ProjectsLocationsRolloutsListCall {
12519 c.urlParams_.Set("filter", filter)
12520 return c
12521 }
12522
12523 // PageSize sets the optional parameter "pageSize": The maximum number of
12524 // rollout to return. The service may return fewer than this value. If
12525 // unspecified, at most 50 rollouts will be returned. The maximum value is
12526 // 1000; values above 1000 will be coerced to 1000.
12527 func (c *ProjectsLocationsRolloutsListCall) PageSize(pageSize int64) *ProjectsLocationsRolloutsListCall {
12528 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12529 return c
12530 }
12531
12532 // PageToken sets the optional parameter "pageToken": A page token, received
12533 // from a previous `ListRollouts` call. Provide this to retrieve the subsequent
12534 // page. When paginating, all other parameters provided to `ListRollouts` must
12535 // match the call that provided the page token.
12536 func (c *ProjectsLocationsRolloutsListCall) PageToken(pageToken string) *ProjectsLocationsRolloutsListCall {
12537 c.urlParams_.Set("pageToken", pageToken)
12538 return c
12539 }
12540
12541 // Fields allows partial responses to be retrieved. See
12542 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12543 // details.
12544 func (c *ProjectsLocationsRolloutsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutsListCall {
12545 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12546 return c
12547 }
12548
12549 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12550 // object's ETag matches the given value. This is useful for getting updates
12551 // only after the object has changed since the last request.
12552 func (c *ProjectsLocationsRolloutsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRolloutsListCall {
12553 c.ifNoneMatch_ = entityTag
12554 return c
12555 }
12556
12557 // Context sets the context to be used in this call's Do method.
12558 func (c *ProjectsLocationsRolloutsListCall) Context(ctx context.Context) *ProjectsLocationsRolloutsListCall {
12559 c.ctx_ = ctx
12560 return c
12561 }
12562
12563 // Header returns a http.Header that can be modified by the caller to add
12564 // headers to the request.
12565 func (c *ProjectsLocationsRolloutsListCall) Header() http.Header {
12566 if c.header_ == nil {
12567 c.header_ = make(http.Header)
12568 }
12569 return c.header_
12570 }
12571
12572 func (c *ProjectsLocationsRolloutsListCall) doRequest(alt string) (*http.Response, error) {
12573 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12574 if c.ifNoneMatch_ != "" {
12575 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12576 }
12577 c.urlParams_.Set("alt", alt)
12578 c.urlParams_.Set("prettyPrint", "false")
12579 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/rollouts")
12580 urls += "?" + c.urlParams_.Encode()
12581 req, err := http.NewRequest("GET", urls, nil)
12582 if err != nil {
12583 return nil, err
12584 }
12585 req.Header = reqHeaders
12586 googleapi.Expand(req.URL, map[string]string{
12587 "parent": c.parent,
12588 })
12589 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rollouts.list", "request", internallog.HTTPRequest(req, nil))
12590 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12591 }
12592
12593 // Do executes the "gkehub.projects.locations.rollouts.list" call.
12594 // Any non-2xx status code is an error. Response headers are in either
12595 // *ListRolloutsResponse.ServerResponse.Header or (if a response was returned
12596 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12597 // check whether the returned error was because http.StatusNotModified was
12598 // returned.
12599 func (c *ProjectsLocationsRolloutsListCall) Do(opts ...googleapi.CallOption) (*ListRolloutsResponse, error) {
12600 gensupport.SetOptions(c.urlParams_, opts...)
12601 res, err := c.doRequest("json")
12602 if res != nil && res.StatusCode == http.StatusNotModified {
12603 if res.Body != nil {
12604 res.Body.Close()
12605 }
12606 return nil, gensupport.WrapError(&googleapi.Error{
12607 Code: res.StatusCode,
12608 Header: res.Header,
12609 })
12610 }
12611 if err != nil {
12612 return nil, err
12613 }
12614 defer googleapi.CloseBody(res)
12615 if err := googleapi.CheckResponse(res); err != nil {
12616 return nil, gensupport.WrapError(err)
12617 }
12618 ret := &ListRolloutsResponse{
12619 ServerResponse: googleapi.ServerResponse{
12620 Header: res.Header,
12621 HTTPStatusCode: res.StatusCode,
12622 },
12623 }
12624 target := &ret
12625 b, err := gensupport.DecodeResponseBytes(target, res)
12626 if err != nil {
12627 return nil, err
12628 }
12629 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rollouts.list", "response", internallog.HTTPResponse(res, b))
12630 return ret, nil
12631 }
12632
12633 // Pages invokes f for each page of results.
12634 // A non-nil error returned from f will halt the iteration.
12635 // The provided context supersedes any context provided to the Context method.
12636 func (c *ProjectsLocationsRolloutsListCall) Pages(ctx context.Context, f func(*ListRolloutsResponse) error) error {
12637 c.ctx_ = ctx
12638 defer c.PageToken(c.urlParams_.Get("pageToken"))
12639 for {
12640 x, err := c.Do()
12641 if err != nil {
12642 return err
12643 }
12644 if err := f(x); err != nil {
12645 return err
12646 }
12647 if x.NextPageToken == "" {
12648 return nil
12649 }
12650 c.PageToken(x.NextPageToken)
12651 }
12652 }
12653
12654 type ProjectsLocationsScopesCreateCall struct {
12655 s *Service
12656 parent string
12657 scope *Scope
12658 urlParams_ gensupport.URLParams
12659 ctx_ context.Context
12660 header_ http.Header
12661 }
12662
12663 // Create: Creates a Scope.
12664 //
12665 // - parent: The parent (project and location) where the Scope will be created.
12666 // Specified in the format `projects/*/locations/*`.
12667 func (r *ProjectsLocationsScopesService) Create(parent string, scope *Scope) *ProjectsLocationsScopesCreateCall {
12668 c := &ProjectsLocationsScopesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12669 c.parent = parent
12670 c.scope = scope
12671 return c
12672 }
12673
12674 // ScopeId sets the optional parameter "scopeId": Required. Client chosen ID
12675 // for the Scope. `scope_id` must be a ????
12676 func (c *ProjectsLocationsScopesCreateCall) ScopeId(scopeId string) *ProjectsLocationsScopesCreateCall {
12677 c.urlParams_.Set("scopeId", scopeId)
12678 return c
12679 }
12680
12681 // Fields allows partial responses to be retrieved. See
12682 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12683 // details.
12684 func (c *ProjectsLocationsScopesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesCreateCall {
12685 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12686 return c
12687 }
12688
12689 // Context sets the context to be used in this call's Do method.
12690 func (c *ProjectsLocationsScopesCreateCall) Context(ctx context.Context) *ProjectsLocationsScopesCreateCall {
12691 c.ctx_ = ctx
12692 return c
12693 }
12694
12695 // Header returns a http.Header that can be modified by the caller to add
12696 // headers to the request.
12697 func (c *ProjectsLocationsScopesCreateCall) Header() http.Header {
12698 if c.header_ == nil {
12699 c.header_ = make(http.Header)
12700 }
12701 return c.header_
12702 }
12703
12704 func (c *ProjectsLocationsScopesCreateCall) doRequest(alt string) (*http.Response, error) {
12705 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12706 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.scope)
12707 if err != nil {
12708 return nil, err
12709 }
12710 c.urlParams_.Set("alt", alt)
12711 c.urlParams_.Set("prettyPrint", "false")
12712 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/scopes")
12713 urls += "?" + c.urlParams_.Encode()
12714 req, err := http.NewRequest("POST", urls, body)
12715 if err != nil {
12716 return nil, err
12717 }
12718 req.Header = reqHeaders
12719 googleapi.Expand(req.URL, map[string]string{
12720 "parent": c.parent,
12721 })
12722 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.create", "request", internallog.HTTPRequest(req, body.Bytes()))
12723 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12724 }
12725
12726 // Do executes the "gkehub.projects.locations.scopes.create" call.
12727 // Any non-2xx status code is an error. Response headers are in either
12728 // *Operation.ServerResponse.Header or (if a response was returned at all) in
12729 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12730 // whether the returned error was because http.StatusNotModified was returned.
12731 func (c *ProjectsLocationsScopesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12732 gensupport.SetOptions(c.urlParams_, opts...)
12733 res, err := c.doRequest("json")
12734 if res != nil && res.StatusCode == http.StatusNotModified {
12735 if res.Body != nil {
12736 res.Body.Close()
12737 }
12738 return nil, gensupport.WrapError(&googleapi.Error{
12739 Code: res.StatusCode,
12740 Header: res.Header,
12741 })
12742 }
12743 if err != nil {
12744 return nil, err
12745 }
12746 defer googleapi.CloseBody(res)
12747 if err := googleapi.CheckResponse(res); err != nil {
12748 return nil, gensupport.WrapError(err)
12749 }
12750 ret := &Operation{
12751 ServerResponse: googleapi.ServerResponse{
12752 Header: res.Header,
12753 HTTPStatusCode: res.StatusCode,
12754 },
12755 }
12756 target := &ret
12757 b, err := gensupport.DecodeResponseBytes(target, res)
12758 if err != nil {
12759 return nil, err
12760 }
12761 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.create", "response", internallog.HTTPResponse(res, b))
12762 return ret, nil
12763 }
12764
12765 type ProjectsLocationsScopesDeleteCall struct {
12766 s *Service
12767 name string
12768 urlParams_ gensupport.URLParams
12769 ctx_ context.Context
12770 header_ http.Header
12771 }
12772
12773 // Delete: Deletes a Scope.
12774 //
12775 // - name: The Scope resource name in the format
12776 // `projects/*/locations/*/scopes/*`.
12777 func (r *ProjectsLocationsScopesService) Delete(name string) *ProjectsLocationsScopesDeleteCall {
12778 c := &ProjectsLocationsScopesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12779 c.name = name
12780 return c
12781 }
12782
12783 // Fields allows partial responses to be retrieved. See
12784 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12785 // details.
12786 func (c *ProjectsLocationsScopesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesDeleteCall {
12787 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12788 return c
12789 }
12790
12791 // Context sets the context to be used in this call's Do method.
12792 func (c *ProjectsLocationsScopesDeleteCall) Context(ctx context.Context) *ProjectsLocationsScopesDeleteCall {
12793 c.ctx_ = ctx
12794 return c
12795 }
12796
12797 // Header returns a http.Header that can be modified by the caller to add
12798 // headers to the request.
12799 func (c *ProjectsLocationsScopesDeleteCall) Header() http.Header {
12800 if c.header_ == nil {
12801 c.header_ = make(http.Header)
12802 }
12803 return c.header_
12804 }
12805
12806 func (c *ProjectsLocationsScopesDeleteCall) doRequest(alt string) (*http.Response, error) {
12807 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12808 c.urlParams_.Set("alt", alt)
12809 c.urlParams_.Set("prettyPrint", "false")
12810 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
12811 urls += "?" + c.urlParams_.Encode()
12812 req, err := http.NewRequest("DELETE", urls, nil)
12813 if err != nil {
12814 return nil, err
12815 }
12816 req.Header = reqHeaders
12817 googleapi.Expand(req.URL, map[string]string{
12818 "name": c.name,
12819 })
12820 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.delete", "request", internallog.HTTPRequest(req, nil))
12821 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12822 }
12823
12824 // Do executes the "gkehub.projects.locations.scopes.delete" call.
12825 // Any non-2xx status code is an error. Response headers are in either
12826 // *Operation.ServerResponse.Header or (if a response was returned at all) in
12827 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12828 // whether the returned error was because http.StatusNotModified was returned.
12829 func (c *ProjectsLocationsScopesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12830 gensupport.SetOptions(c.urlParams_, opts...)
12831 res, err := c.doRequest("json")
12832 if res != nil && res.StatusCode == http.StatusNotModified {
12833 if res.Body != nil {
12834 res.Body.Close()
12835 }
12836 return nil, gensupport.WrapError(&googleapi.Error{
12837 Code: res.StatusCode,
12838 Header: res.Header,
12839 })
12840 }
12841 if err != nil {
12842 return nil, err
12843 }
12844 defer googleapi.CloseBody(res)
12845 if err := googleapi.CheckResponse(res); err != nil {
12846 return nil, gensupport.WrapError(err)
12847 }
12848 ret := &Operation{
12849 ServerResponse: googleapi.ServerResponse{
12850 Header: res.Header,
12851 HTTPStatusCode: res.StatusCode,
12852 },
12853 }
12854 target := &ret
12855 b, err := gensupport.DecodeResponseBytes(target, res)
12856 if err != nil {
12857 return nil, err
12858 }
12859 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.delete", "response", internallog.HTTPResponse(res, b))
12860 return ret, nil
12861 }
12862
12863 type ProjectsLocationsScopesGetCall struct {
12864 s *Service
12865 name string
12866 urlParams_ gensupport.URLParams
12867 ifNoneMatch_ string
12868 ctx_ context.Context
12869 header_ http.Header
12870 }
12871
12872 // Get: Returns the details of a Scope.
12873 //
12874 // - name: The Scope resource name in the format
12875 // `projects/*/locations/*/scopes/*`.
12876 func (r *ProjectsLocationsScopesService) Get(name string) *ProjectsLocationsScopesGetCall {
12877 c := &ProjectsLocationsScopesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12878 c.name = name
12879 return c
12880 }
12881
12882 // Fields allows partial responses to be retrieved. See
12883 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12884 // details.
12885 func (c *ProjectsLocationsScopesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesGetCall {
12886 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12887 return c
12888 }
12889
12890 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12891 // object's ETag matches the given value. This is useful for getting updates
12892 // only after the object has changed since the last request.
12893 func (c *ProjectsLocationsScopesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesGetCall {
12894 c.ifNoneMatch_ = entityTag
12895 return c
12896 }
12897
12898 // Context sets the context to be used in this call's Do method.
12899 func (c *ProjectsLocationsScopesGetCall) Context(ctx context.Context) *ProjectsLocationsScopesGetCall {
12900 c.ctx_ = ctx
12901 return c
12902 }
12903
12904 // Header returns a http.Header that can be modified by the caller to add
12905 // headers to the request.
12906 func (c *ProjectsLocationsScopesGetCall) Header() http.Header {
12907 if c.header_ == nil {
12908 c.header_ = make(http.Header)
12909 }
12910 return c.header_
12911 }
12912
12913 func (c *ProjectsLocationsScopesGetCall) doRequest(alt string) (*http.Response, error) {
12914 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12915 if c.ifNoneMatch_ != "" {
12916 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12917 }
12918 c.urlParams_.Set("alt", alt)
12919 c.urlParams_.Set("prettyPrint", "false")
12920 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
12921 urls += "?" + c.urlParams_.Encode()
12922 req, err := http.NewRequest("GET", urls, nil)
12923 if err != nil {
12924 return nil, err
12925 }
12926 req.Header = reqHeaders
12927 googleapi.Expand(req.URL, map[string]string{
12928 "name": c.name,
12929 })
12930 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.get", "request", internallog.HTTPRequest(req, nil))
12931 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12932 }
12933
12934 // Do executes the "gkehub.projects.locations.scopes.get" call.
12935 // Any non-2xx status code is an error. Response headers are in either
12936 // *Scope.ServerResponse.Header or (if a response was returned at all) in
12937 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12938 // whether the returned error was because http.StatusNotModified was returned.
12939 func (c *ProjectsLocationsScopesGetCall) Do(opts ...googleapi.CallOption) (*Scope, error) {
12940 gensupport.SetOptions(c.urlParams_, opts...)
12941 res, err := c.doRequest("json")
12942 if res != nil && res.StatusCode == http.StatusNotModified {
12943 if res.Body != nil {
12944 res.Body.Close()
12945 }
12946 return nil, gensupport.WrapError(&googleapi.Error{
12947 Code: res.StatusCode,
12948 Header: res.Header,
12949 })
12950 }
12951 if err != nil {
12952 return nil, err
12953 }
12954 defer googleapi.CloseBody(res)
12955 if err := googleapi.CheckResponse(res); err != nil {
12956 return nil, gensupport.WrapError(err)
12957 }
12958 ret := &Scope{
12959 ServerResponse: googleapi.ServerResponse{
12960 Header: res.Header,
12961 HTTPStatusCode: res.StatusCode,
12962 },
12963 }
12964 target := &ret
12965 b, err := gensupport.DecodeResponseBytes(target, res)
12966 if err != nil {
12967 return nil, err
12968 }
12969 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.get", "response", internallog.HTTPResponse(res, b))
12970 return ret, nil
12971 }
12972
12973 type ProjectsLocationsScopesGetIamPolicyCall struct {
12974 s *Service
12975 resource string
12976 urlParams_ gensupport.URLParams
12977 ifNoneMatch_ string
12978 ctx_ context.Context
12979 header_ http.Header
12980 }
12981
12982 // GetIamPolicy: Gets the access control policy for a resource. Returns an
12983 // empty policy if the resource exists and does not have a policy set.
12984 //
12985 // - resource: REQUIRED: The resource for which the policy is being requested.
12986 // See Resource names (https://cloud.google.com/apis/design/resource_names)
12987 // for the appropriate value for this field.
12988 func (r *ProjectsLocationsScopesService) GetIamPolicy(resource string) *ProjectsLocationsScopesGetIamPolicyCall {
12989 c := &ProjectsLocationsScopesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12990 c.resource = resource
12991 return c
12992 }
12993
12994 // OptionsRequestedPolicyVersion sets the optional parameter
12995 // "options.requestedPolicyVersion": The maximum policy version that will be
12996 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
12997 // an invalid value will be rejected. Requests for policies with any
12998 // conditional role bindings must specify version 3. Policies with no
12999 // conditional role bindings may specify any valid value or leave the field
13000 // unset. The policy in the response might use the policy version that you
13001 // specified, or it might use a lower policy version. For example, if you
13002 // specify version 3, but the policy has no conditional role bindings, the
13003 // response uses version 1. To learn which resources support conditions in
13004 // their IAM policies, see the IAM documentation
13005 // (https://cloud.google.com/iam/help/conditions/resource-policies).
13006 func (c *ProjectsLocationsScopesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsScopesGetIamPolicyCall {
13007 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
13008 return c
13009 }
13010
13011 // Fields allows partial responses to be retrieved. See
13012 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13013 // details.
13014 func (c *ProjectsLocationsScopesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesGetIamPolicyCall {
13015 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13016 return c
13017 }
13018
13019 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13020 // object's ETag matches the given value. This is useful for getting updates
13021 // only after the object has changed since the last request.
13022 func (c *ProjectsLocationsScopesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesGetIamPolicyCall {
13023 c.ifNoneMatch_ = entityTag
13024 return c
13025 }
13026
13027 // Context sets the context to be used in this call's Do method.
13028 func (c *ProjectsLocationsScopesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsScopesGetIamPolicyCall {
13029 c.ctx_ = ctx
13030 return c
13031 }
13032
13033 // Header returns a http.Header that can be modified by the caller to add
13034 // headers to the request.
13035 func (c *ProjectsLocationsScopesGetIamPolicyCall) Header() http.Header {
13036 if c.header_ == nil {
13037 c.header_ = make(http.Header)
13038 }
13039 return c.header_
13040 }
13041
13042 func (c *ProjectsLocationsScopesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
13043 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13044 if c.ifNoneMatch_ != "" {
13045 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13046 }
13047 c.urlParams_.Set("alt", alt)
13048 c.urlParams_.Set("prettyPrint", "false")
13049 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:getIamPolicy")
13050 urls += "?" + c.urlParams_.Encode()
13051 req, err := http.NewRequest("GET", urls, nil)
13052 if err != nil {
13053 return nil, err
13054 }
13055 req.Header = reqHeaders
13056 googleapi.Expand(req.URL, map[string]string{
13057 "resource": c.resource,
13058 })
13059 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
13060 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13061 }
13062
13063 // Do executes the "gkehub.projects.locations.scopes.getIamPolicy" call.
13064 // Any non-2xx status code is an error. Response headers are in either
13065 // *Policy.ServerResponse.Header or (if a response was returned at all) in
13066 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13067 // whether the returned error was because http.StatusNotModified was returned.
13068 func (c *ProjectsLocationsScopesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
13069 gensupport.SetOptions(c.urlParams_, opts...)
13070 res, err := c.doRequest("json")
13071 if res != nil && res.StatusCode == http.StatusNotModified {
13072 if res.Body != nil {
13073 res.Body.Close()
13074 }
13075 return nil, gensupport.WrapError(&googleapi.Error{
13076 Code: res.StatusCode,
13077 Header: res.Header,
13078 })
13079 }
13080 if err != nil {
13081 return nil, err
13082 }
13083 defer googleapi.CloseBody(res)
13084 if err := googleapi.CheckResponse(res); err != nil {
13085 return nil, gensupport.WrapError(err)
13086 }
13087 ret := &Policy{
13088 ServerResponse: googleapi.ServerResponse{
13089 Header: res.Header,
13090 HTTPStatusCode: res.StatusCode,
13091 },
13092 }
13093 target := &ret
13094 b, err := gensupport.DecodeResponseBytes(target, res)
13095 if err != nil {
13096 return nil, err
13097 }
13098 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.getIamPolicy", "response", internallog.HTTPResponse(res, b))
13099 return ret, nil
13100 }
13101
13102 type ProjectsLocationsScopesListCall struct {
13103 s *Service
13104 parent string
13105 urlParams_ gensupport.URLParams
13106 ifNoneMatch_ string
13107 ctx_ context.Context
13108 header_ http.Header
13109 }
13110
13111 // List: Lists Scopes.
13112 //
13113 // - parent: The parent (project and location) where the Scope will be listed.
13114 // Specified in the format `projects/*/locations/*`.
13115 func (r *ProjectsLocationsScopesService) List(parent string) *ProjectsLocationsScopesListCall {
13116 c := &ProjectsLocationsScopesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13117 c.parent = parent
13118 return c
13119 }
13120
13121 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
13122 // resources, `page_size` specifies number of resources to return. If
13123 // unspecified or set to 0, all resources will be returned.
13124 func (c *ProjectsLocationsScopesListCall) PageSize(pageSize int64) *ProjectsLocationsScopesListCall {
13125 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13126 return c
13127 }
13128
13129 // PageToken sets the optional parameter "pageToken": Token returned by
13130 // previous call to `ListScopes` which specifies the position in the list from
13131 // where to continue listing the resources.
13132 func (c *ProjectsLocationsScopesListCall) PageToken(pageToken string) *ProjectsLocationsScopesListCall {
13133 c.urlParams_.Set("pageToken", pageToken)
13134 return c
13135 }
13136
13137 // Fields allows partial responses to be retrieved. See
13138 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13139 // details.
13140 func (c *ProjectsLocationsScopesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesListCall {
13141 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13142 return c
13143 }
13144
13145 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13146 // object's ETag matches the given value. This is useful for getting updates
13147 // only after the object has changed since the last request.
13148 func (c *ProjectsLocationsScopesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesListCall {
13149 c.ifNoneMatch_ = entityTag
13150 return c
13151 }
13152
13153 // Context sets the context to be used in this call's Do method.
13154 func (c *ProjectsLocationsScopesListCall) Context(ctx context.Context) *ProjectsLocationsScopesListCall {
13155 c.ctx_ = ctx
13156 return c
13157 }
13158
13159 // Header returns a http.Header that can be modified by the caller to add
13160 // headers to the request.
13161 func (c *ProjectsLocationsScopesListCall) Header() http.Header {
13162 if c.header_ == nil {
13163 c.header_ = make(http.Header)
13164 }
13165 return c.header_
13166 }
13167
13168 func (c *ProjectsLocationsScopesListCall) doRequest(alt string) (*http.Response, error) {
13169 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13170 if c.ifNoneMatch_ != "" {
13171 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13172 }
13173 c.urlParams_.Set("alt", alt)
13174 c.urlParams_.Set("prettyPrint", "false")
13175 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/scopes")
13176 urls += "?" + c.urlParams_.Encode()
13177 req, err := http.NewRequest("GET", urls, nil)
13178 if err != nil {
13179 return nil, err
13180 }
13181 req.Header = reqHeaders
13182 googleapi.Expand(req.URL, map[string]string{
13183 "parent": c.parent,
13184 })
13185 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.list", "request", internallog.HTTPRequest(req, nil))
13186 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13187 }
13188
13189 // Do executes the "gkehub.projects.locations.scopes.list" call.
13190 // Any non-2xx status code is an error. Response headers are in either
13191 // *ListScopesResponse.ServerResponse.Header or (if a response was returned at
13192 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13193 // check whether the returned error was because http.StatusNotModified was
13194 // returned.
13195 func (c *ProjectsLocationsScopesListCall) Do(opts ...googleapi.CallOption) (*ListScopesResponse, error) {
13196 gensupport.SetOptions(c.urlParams_, opts...)
13197 res, err := c.doRequest("json")
13198 if res != nil && res.StatusCode == http.StatusNotModified {
13199 if res.Body != nil {
13200 res.Body.Close()
13201 }
13202 return nil, gensupport.WrapError(&googleapi.Error{
13203 Code: res.StatusCode,
13204 Header: res.Header,
13205 })
13206 }
13207 if err != nil {
13208 return nil, err
13209 }
13210 defer googleapi.CloseBody(res)
13211 if err := googleapi.CheckResponse(res); err != nil {
13212 return nil, gensupport.WrapError(err)
13213 }
13214 ret := &ListScopesResponse{
13215 ServerResponse: googleapi.ServerResponse{
13216 Header: res.Header,
13217 HTTPStatusCode: res.StatusCode,
13218 },
13219 }
13220 target := &ret
13221 b, err := gensupport.DecodeResponseBytes(target, res)
13222 if err != nil {
13223 return nil, err
13224 }
13225 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.list", "response", internallog.HTTPResponse(res, b))
13226 return ret, nil
13227 }
13228
13229 // Pages invokes f for each page of results.
13230 // A non-nil error returned from f will halt the iteration.
13231 // The provided context supersedes any context provided to the Context method.
13232 func (c *ProjectsLocationsScopesListCall) Pages(ctx context.Context, f func(*ListScopesResponse) error) error {
13233 c.ctx_ = ctx
13234 defer c.PageToken(c.urlParams_.Get("pageToken"))
13235 for {
13236 x, err := c.Do()
13237 if err != nil {
13238 return err
13239 }
13240 if err := f(x); err != nil {
13241 return err
13242 }
13243 if x.NextPageToken == "" {
13244 return nil
13245 }
13246 c.PageToken(x.NextPageToken)
13247 }
13248 }
13249
13250 type ProjectsLocationsScopesListMembershipsCall struct {
13251 s *Service
13252 scopeName string
13253 urlParams_ gensupport.URLParams
13254 ifNoneMatch_ string
13255 ctx_ context.Context
13256 header_ http.Header
13257 }
13258
13259 // ListMemberships: Lists Memberships bound to a Scope. The response includes
13260 // relevant Memberships from all regions.
13261 //
13262 // - scopeName: Name of the Scope, in the format
13263 // `projects/*/locations/global/scopes/*`, to which the Memberships are
13264 // bound.
13265 func (r *ProjectsLocationsScopesService) ListMemberships(scopeName string) *ProjectsLocationsScopesListMembershipsCall {
13266 c := &ProjectsLocationsScopesListMembershipsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13267 c.scopeName = scopeName
13268 return c
13269 }
13270
13271 // Filter sets the optional parameter "filter": Lists Memberships that match
13272 // the filter expression, following the syntax outlined in
13273 // https://google.aip.dev/160. Currently, filtering can be done only based on
13274 // Memberships's `name`, `labels`, `create_time`, `update_time`, and
13275 // `unique_id`.
13276 func (c *ProjectsLocationsScopesListMembershipsCall) Filter(filter string) *ProjectsLocationsScopesListMembershipsCall {
13277 c.urlParams_.Set("filter", filter)
13278 return c
13279 }
13280
13281 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
13282 // resources, `page_size` specifies number of resources to return. If
13283 // unspecified or set to 0, all resources will be returned. Pagination is
13284 // currently not supported; therefore, setting this field does not have any
13285 // impact for now.
13286 func (c *ProjectsLocationsScopesListMembershipsCall) PageSize(pageSize int64) *ProjectsLocationsScopesListMembershipsCall {
13287 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13288 return c
13289 }
13290
13291 // PageToken sets the optional parameter "pageToken": Token returned by
13292 // previous call to `ListBoundMemberships` which specifies the position in the
13293 // list from where to continue listing the resources.
13294 func (c *ProjectsLocationsScopesListMembershipsCall) PageToken(pageToken string) *ProjectsLocationsScopesListMembershipsCall {
13295 c.urlParams_.Set("pageToken", pageToken)
13296 return c
13297 }
13298
13299 // Fields allows partial responses to be retrieved. See
13300 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13301 // details.
13302 func (c *ProjectsLocationsScopesListMembershipsCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesListMembershipsCall {
13303 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13304 return c
13305 }
13306
13307 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13308 // object's ETag matches the given value. This is useful for getting updates
13309 // only after the object has changed since the last request.
13310 func (c *ProjectsLocationsScopesListMembershipsCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesListMembershipsCall {
13311 c.ifNoneMatch_ = entityTag
13312 return c
13313 }
13314
13315 // Context sets the context to be used in this call's Do method.
13316 func (c *ProjectsLocationsScopesListMembershipsCall) Context(ctx context.Context) *ProjectsLocationsScopesListMembershipsCall {
13317 c.ctx_ = ctx
13318 return c
13319 }
13320
13321 // Header returns a http.Header that can be modified by the caller to add
13322 // headers to the request.
13323 func (c *ProjectsLocationsScopesListMembershipsCall) Header() http.Header {
13324 if c.header_ == nil {
13325 c.header_ = make(http.Header)
13326 }
13327 return c.header_
13328 }
13329
13330 func (c *ProjectsLocationsScopesListMembershipsCall) doRequest(alt string) (*http.Response, error) {
13331 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13332 if c.ifNoneMatch_ != "" {
13333 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13334 }
13335 c.urlParams_.Set("alt", alt)
13336 c.urlParams_.Set("prettyPrint", "false")
13337 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+scopeName}:listMemberships")
13338 urls += "?" + c.urlParams_.Encode()
13339 req, err := http.NewRequest("GET", urls, nil)
13340 if err != nil {
13341 return nil, err
13342 }
13343 req.Header = reqHeaders
13344 googleapi.Expand(req.URL, map[string]string{
13345 "scopeName": c.scopeName,
13346 })
13347 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.listMemberships", "request", internallog.HTTPRequest(req, nil))
13348 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13349 }
13350
13351 // Do executes the "gkehub.projects.locations.scopes.listMemberships" call.
13352 // Any non-2xx status code is an error. Response headers are in either
13353 // *ListBoundMembershipsResponse.ServerResponse.Header or (if a response was
13354 // returned at all) in error.(*googleapi.Error).Header. Use
13355 // googleapi.IsNotModified to check whether the returned error was because
13356 // http.StatusNotModified was returned.
13357 func (c *ProjectsLocationsScopesListMembershipsCall) Do(opts ...googleapi.CallOption) (*ListBoundMembershipsResponse, error) {
13358 gensupport.SetOptions(c.urlParams_, opts...)
13359 res, err := c.doRequest("json")
13360 if res != nil && res.StatusCode == http.StatusNotModified {
13361 if res.Body != nil {
13362 res.Body.Close()
13363 }
13364 return nil, gensupport.WrapError(&googleapi.Error{
13365 Code: res.StatusCode,
13366 Header: res.Header,
13367 })
13368 }
13369 if err != nil {
13370 return nil, err
13371 }
13372 defer googleapi.CloseBody(res)
13373 if err := googleapi.CheckResponse(res); err != nil {
13374 return nil, gensupport.WrapError(err)
13375 }
13376 ret := &ListBoundMembershipsResponse{
13377 ServerResponse: googleapi.ServerResponse{
13378 Header: res.Header,
13379 HTTPStatusCode: res.StatusCode,
13380 },
13381 }
13382 target := &ret
13383 b, err := gensupport.DecodeResponseBytes(target, res)
13384 if err != nil {
13385 return nil, err
13386 }
13387 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.listMemberships", "response", internallog.HTTPResponse(res, b))
13388 return ret, nil
13389 }
13390
13391 // Pages invokes f for each page of results.
13392 // A non-nil error returned from f will halt the iteration.
13393 // The provided context supersedes any context provided to the Context method.
13394 func (c *ProjectsLocationsScopesListMembershipsCall) Pages(ctx context.Context, f func(*ListBoundMembershipsResponse) error) error {
13395 c.ctx_ = ctx
13396 defer c.PageToken(c.urlParams_.Get("pageToken"))
13397 for {
13398 x, err := c.Do()
13399 if err != nil {
13400 return err
13401 }
13402 if err := f(x); err != nil {
13403 return err
13404 }
13405 if x.NextPageToken == "" {
13406 return nil
13407 }
13408 c.PageToken(x.NextPageToken)
13409 }
13410 }
13411
13412 type ProjectsLocationsScopesListPermittedCall struct {
13413 s *Service
13414 parent string
13415 urlParams_ gensupport.URLParams
13416 ifNoneMatch_ string
13417 ctx_ context.Context
13418 header_ http.Header
13419 }
13420
13421 // ListPermitted: Lists permitted Scopes.
13422 //
13423 // - parent: The parent (project and location) where the Scope will be listed.
13424 // Specified in the format `projects/*/locations/*`.
13425 func (r *ProjectsLocationsScopesService) ListPermitted(parent string) *ProjectsLocationsScopesListPermittedCall {
13426 c := &ProjectsLocationsScopesListPermittedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13427 c.parent = parent
13428 return c
13429 }
13430
13431 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
13432 // resources, `page_size` specifies number of resources to return. If
13433 // unspecified or set to 0, all resources will be returned.
13434 func (c *ProjectsLocationsScopesListPermittedCall) PageSize(pageSize int64) *ProjectsLocationsScopesListPermittedCall {
13435 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13436 return c
13437 }
13438
13439 // PageToken sets the optional parameter "pageToken": Token returned by
13440 // previous call to `ListPermittedScopes` which specifies the position in the
13441 // list from where to continue listing the resources.
13442 func (c *ProjectsLocationsScopesListPermittedCall) PageToken(pageToken string) *ProjectsLocationsScopesListPermittedCall {
13443 c.urlParams_.Set("pageToken", pageToken)
13444 return c
13445 }
13446
13447 // Fields allows partial responses to be retrieved. See
13448 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13449 // details.
13450 func (c *ProjectsLocationsScopesListPermittedCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesListPermittedCall {
13451 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13452 return c
13453 }
13454
13455 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13456 // object's ETag matches the given value. This is useful for getting updates
13457 // only after the object has changed since the last request.
13458 func (c *ProjectsLocationsScopesListPermittedCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesListPermittedCall {
13459 c.ifNoneMatch_ = entityTag
13460 return c
13461 }
13462
13463 // Context sets the context to be used in this call's Do method.
13464 func (c *ProjectsLocationsScopesListPermittedCall) Context(ctx context.Context) *ProjectsLocationsScopesListPermittedCall {
13465 c.ctx_ = ctx
13466 return c
13467 }
13468
13469 // Header returns a http.Header that can be modified by the caller to add
13470 // headers to the request.
13471 func (c *ProjectsLocationsScopesListPermittedCall) Header() http.Header {
13472 if c.header_ == nil {
13473 c.header_ = make(http.Header)
13474 }
13475 return c.header_
13476 }
13477
13478 func (c *ProjectsLocationsScopesListPermittedCall) doRequest(alt string) (*http.Response, error) {
13479 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13480 if c.ifNoneMatch_ != "" {
13481 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13482 }
13483 c.urlParams_.Set("alt", alt)
13484 c.urlParams_.Set("prettyPrint", "false")
13485 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/scopes:listPermitted")
13486 urls += "?" + c.urlParams_.Encode()
13487 req, err := http.NewRequest("GET", urls, nil)
13488 if err != nil {
13489 return nil, err
13490 }
13491 req.Header = reqHeaders
13492 googleapi.Expand(req.URL, map[string]string{
13493 "parent": c.parent,
13494 })
13495 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.listPermitted", "request", internallog.HTTPRequest(req, nil))
13496 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13497 }
13498
13499 // Do executes the "gkehub.projects.locations.scopes.listPermitted" call.
13500 // Any non-2xx status code is an error. Response headers are in either
13501 // *ListPermittedScopesResponse.ServerResponse.Header or (if a response was
13502 // returned at all) in error.(*googleapi.Error).Header. Use
13503 // googleapi.IsNotModified to check whether the returned error was because
13504 // http.StatusNotModified was returned.
13505 func (c *ProjectsLocationsScopesListPermittedCall) Do(opts ...googleapi.CallOption) (*ListPermittedScopesResponse, error) {
13506 gensupport.SetOptions(c.urlParams_, opts...)
13507 res, err := c.doRequest("json")
13508 if res != nil && res.StatusCode == http.StatusNotModified {
13509 if res.Body != nil {
13510 res.Body.Close()
13511 }
13512 return nil, gensupport.WrapError(&googleapi.Error{
13513 Code: res.StatusCode,
13514 Header: res.Header,
13515 })
13516 }
13517 if err != nil {
13518 return nil, err
13519 }
13520 defer googleapi.CloseBody(res)
13521 if err := googleapi.CheckResponse(res); err != nil {
13522 return nil, gensupport.WrapError(err)
13523 }
13524 ret := &ListPermittedScopesResponse{
13525 ServerResponse: googleapi.ServerResponse{
13526 Header: res.Header,
13527 HTTPStatusCode: res.StatusCode,
13528 },
13529 }
13530 target := &ret
13531 b, err := gensupport.DecodeResponseBytes(target, res)
13532 if err != nil {
13533 return nil, err
13534 }
13535 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.listPermitted", "response", internallog.HTTPResponse(res, b))
13536 return ret, nil
13537 }
13538
13539 // Pages invokes f for each page of results.
13540 // A non-nil error returned from f will halt the iteration.
13541 // The provided context supersedes any context provided to the Context method.
13542 func (c *ProjectsLocationsScopesListPermittedCall) Pages(ctx context.Context, f func(*ListPermittedScopesResponse) error) error {
13543 c.ctx_ = ctx
13544 defer c.PageToken(c.urlParams_.Get("pageToken"))
13545 for {
13546 x, err := c.Do()
13547 if err != nil {
13548 return err
13549 }
13550 if err := f(x); err != nil {
13551 return err
13552 }
13553 if x.NextPageToken == "" {
13554 return nil
13555 }
13556 c.PageToken(x.NextPageToken)
13557 }
13558 }
13559
13560 type ProjectsLocationsScopesPatchCall struct {
13561 s *Service
13562 name string
13563 scope *Scope
13564 urlParams_ gensupport.URLParams
13565 ctx_ context.Context
13566 header_ http.Header
13567 }
13568
13569 // Patch: Updates a scopes.
13570 //
13571 // - name: The resource name for the scope
13572 // `projects/{project}/locations/{location}/scopes/{scope}`.
13573 func (r *ProjectsLocationsScopesService) Patch(name string, scope *Scope) *ProjectsLocationsScopesPatchCall {
13574 c := &ProjectsLocationsScopesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13575 c.name = name
13576 c.scope = scope
13577 return c
13578 }
13579
13580 // UpdateMask sets the optional parameter "updateMask": Required. The fields to
13581 // be updated.
13582 func (c *ProjectsLocationsScopesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsScopesPatchCall {
13583 c.urlParams_.Set("updateMask", updateMask)
13584 return c
13585 }
13586
13587 // Fields allows partial responses to be retrieved. See
13588 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13589 // details.
13590 func (c *ProjectsLocationsScopesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesPatchCall {
13591 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13592 return c
13593 }
13594
13595 // Context sets the context to be used in this call's Do method.
13596 func (c *ProjectsLocationsScopesPatchCall) Context(ctx context.Context) *ProjectsLocationsScopesPatchCall {
13597 c.ctx_ = ctx
13598 return c
13599 }
13600
13601 // Header returns a http.Header that can be modified by the caller to add
13602 // headers to the request.
13603 func (c *ProjectsLocationsScopesPatchCall) Header() http.Header {
13604 if c.header_ == nil {
13605 c.header_ = make(http.Header)
13606 }
13607 return c.header_
13608 }
13609
13610 func (c *ProjectsLocationsScopesPatchCall) doRequest(alt string) (*http.Response, error) {
13611 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13612 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.scope)
13613 if err != nil {
13614 return nil, err
13615 }
13616 c.urlParams_.Set("alt", alt)
13617 c.urlParams_.Set("prettyPrint", "false")
13618 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
13619 urls += "?" + c.urlParams_.Encode()
13620 req, err := http.NewRequest("PATCH", urls, body)
13621 if err != nil {
13622 return nil, err
13623 }
13624 req.Header = reqHeaders
13625 googleapi.Expand(req.URL, map[string]string{
13626 "name": c.name,
13627 })
13628 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
13629 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13630 }
13631
13632 // Do executes the "gkehub.projects.locations.scopes.patch" call.
13633 // Any non-2xx status code is an error. Response headers are in either
13634 // *Operation.ServerResponse.Header or (if a response was returned at all) in
13635 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13636 // whether the returned error was because http.StatusNotModified was returned.
13637 func (c *ProjectsLocationsScopesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13638 gensupport.SetOptions(c.urlParams_, opts...)
13639 res, err := c.doRequest("json")
13640 if res != nil && res.StatusCode == http.StatusNotModified {
13641 if res.Body != nil {
13642 res.Body.Close()
13643 }
13644 return nil, gensupport.WrapError(&googleapi.Error{
13645 Code: res.StatusCode,
13646 Header: res.Header,
13647 })
13648 }
13649 if err != nil {
13650 return nil, err
13651 }
13652 defer googleapi.CloseBody(res)
13653 if err := googleapi.CheckResponse(res); err != nil {
13654 return nil, gensupport.WrapError(err)
13655 }
13656 ret := &Operation{
13657 ServerResponse: googleapi.ServerResponse{
13658 Header: res.Header,
13659 HTTPStatusCode: res.StatusCode,
13660 },
13661 }
13662 target := &ret
13663 b, err := gensupport.DecodeResponseBytes(target, res)
13664 if err != nil {
13665 return nil, err
13666 }
13667 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.patch", "response", internallog.HTTPResponse(res, b))
13668 return ret, nil
13669 }
13670
13671 type ProjectsLocationsScopesSetIamPolicyCall struct {
13672 s *Service
13673 resource string
13674 setiampolicyrequest *SetIamPolicyRequest
13675 urlParams_ gensupport.URLParams
13676 ctx_ context.Context
13677 header_ http.Header
13678 }
13679
13680 // SetIamPolicy: Sets the access control policy on the specified resource.
13681 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
13682 // and `PERMISSION_DENIED` errors.
13683 //
13684 // - resource: REQUIRED: The resource for which the policy is being specified.
13685 // See Resource names (https://cloud.google.com/apis/design/resource_names)
13686 // for the appropriate value for this field.
13687 func (r *ProjectsLocationsScopesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsScopesSetIamPolicyCall {
13688 c := &ProjectsLocationsScopesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13689 c.resource = resource
13690 c.setiampolicyrequest = setiampolicyrequest
13691 return c
13692 }
13693
13694 // Fields allows partial responses to be retrieved. See
13695 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13696 // details.
13697 func (c *ProjectsLocationsScopesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesSetIamPolicyCall {
13698 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13699 return c
13700 }
13701
13702 // Context sets the context to be used in this call's Do method.
13703 func (c *ProjectsLocationsScopesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsScopesSetIamPolicyCall {
13704 c.ctx_ = ctx
13705 return c
13706 }
13707
13708 // Header returns a http.Header that can be modified by the caller to add
13709 // headers to the request.
13710 func (c *ProjectsLocationsScopesSetIamPolicyCall) Header() http.Header {
13711 if c.header_ == nil {
13712 c.header_ = make(http.Header)
13713 }
13714 return c.header_
13715 }
13716
13717 func (c *ProjectsLocationsScopesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
13718 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13719 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
13720 if err != nil {
13721 return nil, err
13722 }
13723 c.urlParams_.Set("alt", alt)
13724 c.urlParams_.Set("prettyPrint", "false")
13725 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:setIamPolicy")
13726 urls += "?" + c.urlParams_.Encode()
13727 req, err := http.NewRequest("POST", urls, body)
13728 if err != nil {
13729 return nil, err
13730 }
13731 req.Header = reqHeaders
13732 googleapi.Expand(req.URL, map[string]string{
13733 "resource": c.resource,
13734 })
13735 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
13736 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13737 }
13738
13739 // Do executes the "gkehub.projects.locations.scopes.setIamPolicy" call.
13740 // Any non-2xx status code is an error. Response headers are in either
13741 // *Policy.ServerResponse.Header or (if a response was returned at all) in
13742 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13743 // whether the returned error was because http.StatusNotModified was returned.
13744 func (c *ProjectsLocationsScopesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
13745 gensupport.SetOptions(c.urlParams_, opts...)
13746 res, err := c.doRequest("json")
13747 if res != nil && res.StatusCode == http.StatusNotModified {
13748 if res.Body != nil {
13749 res.Body.Close()
13750 }
13751 return nil, gensupport.WrapError(&googleapi.Error{
13752 Code: res.StatusCode,
13753 Header: res.Header,
13754 })
13755 }
13756 if err != nil {
13757 return nil, err
13758 }
13759 defer googleapi.CloseBody(res)
13760 if err := googleapi.CheckResponse(res); err != nil {
13761 return nil, gensupport.WrapError(err)
13762 }
13763 ret := &Policy{
13764 ServerResponse: googleapi.ServerResponse{
13765 Header: res.Header,
13766 HTTPStatusCode: res.StatusCode,
13767 },
13768 }
13769 target := &ret
13770 b, err := gensupport.DecodeResponseBytes(target, res)
13771 if err != nil {
13772 return nil, err
13773 }
13774 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.setIamPolicy", "response", internallog.HTTPResponse(res, b))
13775 return ret, nil
13776 }
13777
13778 type ProjectsLocationsScopesTestIamPermissionsCall struct {
13779 s *Service
13780 resource string
13781 testiampermissionsrequest *TestIamPermissionsRequest
13782 urlParams_ gensupport.URLParams
13783 ctx_ context.Context
13784 header_ http.Header
13785 }
13786
13787 // TestIamPermissions: Returns permissions that a caller has on the specified
13788 // resource. If the resource does not exist, this will return an empty set of
13789 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
13790 // used for building permission-aware UIs and command-line tools, not for
13791 // authorization checking. This operation may "fail open" without warning.
13792 //
13793 // - resource: REQUIRED: The resource for which the policy detail is being
13794 // requested. See Resource names
13795 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
13796 // value for this field.
13797 func (r *ProjectsLocationsScopesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsScopesTestIamPermissionsCall {
13798 c := &ProjectsLocationsScopesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13799 c.resource = resource
13800 c.testiampermissionsrequest = testiampermissionsrequest
13801 return c
13802 }
13803
13804 // Fields allows partial responses to be retrieved. See
13805 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13806 // details.
13807 func (c *ProjectsLocationsScopesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesTestIamPermissionsCall {
13808 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13809 return c
13810 }
13811
13812 // Context sets the context to be used in this call's Do method.
13813 func (c *ProjectsLocationsScopesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsScopesTestIamPermissionsCall {
13814 c.ctx_ = ctx
13815 return c
13816 }
13817
13818 // Header returns a http.Header that can be modified by the caller to add
13819 // headers to the request.
13820 func (c *ProjectsLocationsScopesTestIamPermissionsCall) Header() http.Header {
13821 if c.header_ == nil {
13822 c.header_ = make(http.Header)
13823 }
13824 return c.header_
13825 }
13826
13827 func (c *ProjectsLocationsScopesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
13828 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13829 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
13830 if err != nil {
13831 return nil, err
13832 }
13833 c.urlParams_.Set("alt", alt)
13834 c.urlParams_.Set("prettyPrint", "false")
13835 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:testIamPermissions")
13836 urls += "?" + c.urlParams_.Encode()
13837 req, err := http.NewRequest("POST", urls, body)
13838 if err != nil {
13839 return nil, err
13840 }
13841 req.Header = reqHeaders
13842 googleapi.Expand(req.URL, map[string]string{
13843 "resource": c.resource,
13844 })
13845 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
13846 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13847 }
13848
13849 // Do executes the "gkehub.projects.locations.scopes.testIamPermissions" call.
13850 // Any non-2xx status code is an error. Response headers are in either
13851 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
13852 // returned at all) in error.(*googleapi.Error).Header. Use
13853 // googleapi.IsNotModified to check whether the returned error was because
13854 // http.StatusNotModified was returned.
13855 func (c *ProjectsLocationsScopesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
13856 gensupport.SetOptions(c.urlParams_, opts...)
13857 res, err := c.doRequest("json")
13858 if res != nil && res.StatusCode == http.StatusNotModified {
13859 if res.Body != nil {
13860 res.Body.Close()
13861 }
13862 return nil, gensupport.WrapError(&googleapi.Error{
13863 Code: res.StatusCode,
13864 Header: res.Header,
13865 })
13866 }
13867 if err != nil {
13868 return nil, err
13869 }
13870 defer googleapi.CloseBody(res)
13871 if err := googleapi.CheckResponse(res); err != nil {
13872 return nil, gensupport.WrapError(err)
13873 }
13874 ret := &TestIamPermissionsResponse{
13875 ServerResponse: googleapi.ServerResponse{
13876 Header: res.Header,
13877 HTTPStatusCode: res.StatusCode,
13878 },
13879 }
13880 target := &ret
13881 b, err := gensupport.DecodeResponseBytes(target, res)
13882 if err != nil {
13883 return nil, err
13884 }
13885 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.testIamPermissions", "response", internallog.HTTPResponse(res, b))
13886 return ret, nil
13887 }
13888
13889 type ProjectsLocationsScopesNamespacesCreateCall struct {
13890 s *Service
13891 parent string
13892 namespace *Namespace
13893 urlParams_ gensupport.URLParams
13894 ctx_ context.Context
13895 header_ http.Header
13896 }
13897
13898 // Create: Creates a fleet namespace.
13899 //
13900 // - parent: The parent (project and location) where the Namespace will be
13901 // created. Specified in the format `projects/*/locations/*/scopes/*`.
13902 func (r *ProjectsLocationsScopesNamespacesService) Create(parent string, namespace *Namespace) *ProjectsLocationsScopesNamespacesCreateCall {
13903 c := &ProjectsLocationsScopesNamespacesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13904 c.parent = parent
13905 c.namespace = namespace
13906 return c
13907 }
13908
13909 // ScopeNamespaceId sets the optional parameter "scopeNamespaceId": Required.
13910 // Client chosen ID for the Namespace. `namespace_id` must be a valid RFC 1123
13911 // compliant DNS label: 1. At most 63 characters in length 2. It must consist
13912 // of lower case alphanumeric characters or `-` 3. It must start and end with
13913 // an alphanumeric character Which can be expressed as the regex:
13914 // `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
13915 func (c *ProjectsLocationsScopesNamespacesCreateCall) ScopeNamespaceId(scopeNamespaceId string) *ProjectsLocationsScopesNamespacesCreateCall {
13916 c.urlParams_.Set("scopeNamespaceId", scopeNamespaceId)
13917 return c
13918 }
13919
13920 // Fields allows partial responses to be retrieved. See
13921 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13922 // details.
13923 func (c *ProjectsLocationsScopesNamespacesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesCreateCall {
13924 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13925 return c
13926 }
13927
13928 // Context sets the context to be used in this call's Do method.
13929 func (c *ProjectsLocationsScopesNamespacesCreateCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesCreateCall {
13930 c.ctx_ = ctx
13931 return c
13932 }
13933
13934 // Header returns a http.Header that can be modified by the caller to add
13935 // headers to the request.
13936 func (c *ProjectsLocationsScopesNamespacesCreateCall) Header() http.Header {
13937 if c.header_ == nil {
13938 c.header_ = make(http.Header)
13939 }
13940 return c.header_
13941 }
13942
13943 func (c *ProjectsLocationsScopesNamespacesCreateCall) doRequest(alt string) (*http.Response, error) {
13944 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13945 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.namespace)
13946 if err != nil {
13947 return nil, err
13948 }
13949 c.urlParams_.Set("alt", alt)
13950 c.urlParams_.Set("prettyPrint", "false")
13951 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/namespaces")
13952 urls += "?" + c.urlParams_.Encode()
13953 req, err := http.NewRequest("POST", urls, body)
13954 if err != nil {
13955 return nil, err
13956 }
13957 req.Header = reqHeaders
13958 googleapi.Expand(req.URL, map[string]string{
13959 "parent": c.parent,
13960 })
13961 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.create", "request", internallog.HTTPRequest(req, body.Bytes()))
13962 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13963 }
13964
13965 // Do executes the "gkehub.projects.locations.scopes.namespaces.create" call.
13966 // Any non-2xx status code is an error. Response headers are in either
13967 // *Operation.ServerResponse.Header or (if a response was returned at all) in
13968 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13969 // whether the returned error was because http.StatusNotModified was returned.
13970 func (c *ProjectsLocationsScopesNamespacesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13971 gensupport.SetOptions(c.urlParams_, opts...)
13972 res, err := c.doRequest("json")
13973 if res != nil && res.StatusCode == http.StatusNotModified {
13974 if res.Body != nil {
13975 res.Body.Close()
13976 }
13977 return nil, gensupport.WrapError(&googleapi.Error{
13978 Code: res.StatusCode,
13979 Header: res.Header,
13980 })
13981 }
13982 if err != nil {
13983 return nil, err
13984 }
13985 defer googleapi.CloseBody(res)
13986 if err := googleapi.CheckResponse(res); err != nil {
13987 return nil, gensupport.WrapError(err)
13988 }
13989 ret := &Operation{
13990 ServerResponse: googleapi.ServerResponse{
13991 Header: res.Header,
13992 HTTPStatusCode: res.StatusCode,
13993 },
13994 }
13995 target := &ret
13996 b, err := gensupport.DecodeResponseBytes(target, res)
13997 if err != nil {
13998 return nil, err
13999 }
14000 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.create", "response", internallog.HTTPResponse(res, b))
14001 return ret, nil
14002 }
14003
14004 type ProjectsLocationsScopesNamespacesDeleteCall struct {
14005 s *Service
14006 name string
14007 urlParams_ gensupport.URLParams
14008 ctx_ context.Context
14009 header_ http.Header
14010 }
14011
14012 // Delete: Deletes a fleet namespace.
14013 //
14014 // - name: The Namespace resource name in the format
14015 // `projects/*/locations/*/scopes/*/namespaces/*`.
14016 func (r *ProjectsLocationsScopesNamespacesService) Delete(name string) *ProjectsLocationsScopesNamespacesDeleteCall {
14017 c := &ProjectsLocationsScopesNamespacesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14018 c.name = name
14019 return c
14020 }
14021
14022 // Fields allows partial responses to be retrieved. See
14023 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14024 // details.
14025 func (c *ProjectsLocationsScopesNamespacesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesDeleteCall {
14026 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14027 return c
14028 }
14029
14030 // Context sets the context to be used in this call's Do method.
14031 func (c *ProjectsLocationsScopesNamespacesDeleteCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesDeleteCall {
14032 c.ctx_ = ctx
14033 return c
14034 }
14035
14036 // Header returns a http.Header that can be modified by the caller to add
14037 // headers to the request.
14038 func (c *ProjectsLocationsScopesNamespacesDeleteCall) Header() http.Header {
14039 if c.header_ == nil {
14040 c.header_ = make(http.Header)
14041 }
14042 return c.header_
14043 }
14044
14045 func (c *ProjectsLocationsScopesNamespacesDeleteCall) doRequest(alt string) (*http.Response, error) {
14046 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14047 c.urlParams_.Set("alt", alt)
14048 c.urlParams_.Set("prettyPrint", "false")
14049 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
14050 urls += "?" + c.urlParams_.Encode()
14051 req, err := http.NewRequest("DELETE", urls, nil)
14052 if err != nil {
14053 return nil, err
14054 }
14055 req.Header = reqHeaders
14056 googleapi.Expand(req.URL, map[string]string{
14057 "name": c.name,
14058 })
14059 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.delete", "request", internallog.HTTPRequest(req, nil))
14060 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14061 }
14062
14063 // Do executes the "gkehub.projects.locations.scopes.namespaces.delete" call.
14064 // Any non-2xx status code is an error. Response headers are in either
14065 // *Operation.ServerResponse.Header or (if a response was returned at all) in
14066 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14067 // whether the returned error was because http.StatusNotModified was returned.
14068 func (c *ProjectsLocationsScopesNamespacesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14069 gensupport.SetOptions(c.urlParams_, opts...)
14070 res, err := c.doRequest("json")
14071 if res != nil && res.StatusCode == http.StatusNotModified {
14072 if res.Body != nil {
14073 res.Body.Close()
14074 }
14075 return nil, gensupport.WrapError(&googleapi.Error{
14076 Code: res.StatusCode,
14077 Header: res.Header,
14078 })
14079 }
14080 if err != nil {
14081 return nil, err
14082 }
14083 defer googleapi.CloseBody(res)
14084 if err := googleapi.CheckResponse(res); err != nil {
14085 return nil, gensupport.WrapError(err)
14086 }
14087 ret := &Operation{
14088 ServerResponse: googleapi.ServerResponse{
14089 Header: res.Header,
14090 HTTPStatusCode: res.StatusCode,
14091 },
14092 }
14093 target := &ret
14094 b, err := gensupport.DecodeResponseBytes(target, res)
14095 if err != nil {
14096 return nil, err
14097 }
14098 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.delete", "response", internallog.HTTPResponse(res, b))
14099 return ret, nil
14100 }
14101
14102 type ProjectsLocationsScopesNamespacesGetCall struct {
14103 s *Service
14104 name string
14105 urlParams_ gensupport.URLParams
14106 ifNoneMatch_ string
14107 ctx_ context.Context
14108 header_ http.Header
14109 }
14110
14111 // Get: Returns the details of a fleet namespace.
14112 //
14113 // - name: The Namespace resource name in the format
14114 // `projects/*/locations/*/scopes/*/namespaces/*`.
14115 func (r *ProjectsLocationsScopesNamespacesService) Get(name string) *ProjectsLocationsScopesNamespacesGetCall {
14116 c := &ProjectsLocationsScopesNamespacesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14117 c.name = name
14118 return c
14119 }
14120
14121 // Fields allows partial responses to be retrieved. See
14122 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14123 // details.
14124 func (c *ProjectsLocationsScopesNamespacesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesGetCall {
14125 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14126 return c
14127 }
14128
14129 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14130 // object's ETag matches the given value. This is useful for getting updates
14131 // only after the object has changed since the last request.
14132 func (c *ProjectsLocationsScopesNamespacesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesNamespacesGetCall {
14133 c.ifNoneMatch_ = entityTag
14134 return c
14135 }
14136
14137 // Context sets the context to be used in this call's Do method.
14138 func (c *ProjectsLocationsScopesNamespacesGetCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesGetCall {
14139 c.ctx_ = ctx
14140 return c
14141 }
14142
14143 // Header returns a http.Header that can be modified by the caller to add
14144 // headers to the request.
14145 func (c *ProjectsLocationsScopesNamespacesGetCall) Header() http.Header {
14146 if c.header_ == nil {
14147 c.header_ = make(http.Header)
14148 }
14149 return c.header_
14150 }
14151
14152 func (c *ProjectsLocationsScopesNamespacesGetCall) doRequest(alt string) (*http.Response, error) {
14153 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14154 if c.ifNoneMatch_ != "" {
14155 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14156 }
14157 c.urlParams_.Set("alt", alt)
14158 c.urlParams_.Set("prettyPrint", "false")
14159 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
14160 urls += "?" + c.urlParams_.Encode()
14161 req, err := http.NewRequest("GET", urls, nil)
14162 if err != nil {
14163 return nil, err
14164 }
14165 req.Header = reqHeaders
14166 googleapi.Expand(req.URL, map[string]string{
14167 "name": c.name,
14168 })
14169 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.get", "request", internallog.HTTPRequest(req, nil))
14170 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14171 }
14172
14173 // Do executes the "gkehub.projects.locations.scopes.namespaces.get" call.
14174 // Any non-2xx status code is an error. Response headers are in either
14175 // *Namespace.ServerResponse.Header or (if a response was returned at all) in
14176 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14177 // whether the returned error was because http.StatusNotModified was returned.
14178 func (c *ProjectsLocationsScopesNamespacesGetCall) Do(opts ...googleapi.CallOption) (*Namespace, error) {
14179 gensupport.SetOptions(c.urlParams_, opts...)
14180 res, err := c.doRequest("json")
14181 if res != nil && res.StatusCode == http.StatusNotModified {
14182 if res.Body != nil {
14183 res.Body.Close()
14184 }
14185 return nil, gensupport.WrapError(&googleapi.Error{
14186 Code: res.StatusCode,
14187 Header: res.Header,
14188 })
14189 }
14190 if err != nil {
14191 return nil, err
14192 }
14193 defer googleapi.CloseBody(res)
14194 if err := googleapi.CheckResponse(res); err != nil {
14195 return nil, gensupport.WrapError(err)
14196 }
14197 ret := &Namespace{
14198 ServerResponse: googleapi.ServerResponse{
14199 Header: res.Header,
14200 HTTPStatusCode: res.StatusCode,
14201 },
14202 }
14203 target := &ret
14204 b, err := gensupport.DecodeResponseBytes(target, res)
14205 if err != nil {
14206 return nil, err
14207 }
14208 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.get", "response", internallog.HTTPResponse(res, b))
14209 return ret, nil
14210 }
14211
14212 type ProjectsLocationsScopesNamespacesListCall struct {
14213 s *Service
14214 parent string
14215 urlParams_ gensupport.URLParams
14216 ifNoneMatch_ string
14217 ctx_ context.Context
14218 header_ http.Header
14219 }
14220
14221 // List: Lists fleet namespaces.
14222 //
14223 // - parent: The parent (project and location) where the Features will be
14224 // listed. Specified in the format `projects/*/locations/*/scopes/*`.
14225 func (r *ProjectsLocationsScopesNamespacesService) List(parent string) *ProjectsLocationsScopesNamespacesListCall {
14226 c := &ProjectsLocationsScopesNamespacesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14227 c.parent = parent
14228 return c
14229 }
14230
14231 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
14232 // resources, `page_size` specifies number of resources to return. If
14233 // unspecified or set to 0, all resources will be returned.
14234 func (c *ProjectsLocationsScopesNamespacesListCall) PageSize(pageSize int64) *ProjectsLocationsScopesNamespacesListCall {
14235 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14236 return c
14237 }
14238
14239 // PageToken sets the optional parameter "pageToken": Token returned by
14240 // previous call to `ListFeatures` which specifies the position in the list
14241 // from where to continue listing the resources.
14242 func (c *ProjectsLocationsScopesNamespacesListCall) PageToken(pageToken string) *ProjectsLocationsScopesNamespacesListCall {
14243 c.urlParams_.Set("pageToken", pageToken)
14244 return c
14245 }
14246
14247 // Fields allows partial responses to be retrieved. See
14248 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14249 // details.
14250 func (c *ProjectsLocationsScopesNamespacesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesListCall {
14251 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14252 return c
14253 }
14254
14255 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14256 // object's ETag matches the given value. This is useful for getting updates
14257 // only after the object has changed since the last request.
14258 func (c *ProjectsLocationsScopesNamespacesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesNamespacesListCall {
14259 c.ifNoneMatch_ = entityTag
14260 return c
14261 }
14262
14263 // Context sets the context to be used in this call's Do method.
14264 func (c *ProjectsLocationsScopesNamespacesListCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesListCall {
14265 c.ctx_ = ctx
14266 return c
14267 }
14268
14269 // Header returns a http.Header that can be modified by the caller to add
14270 // headers to the request.
14271 func (c *ProjectsLocationsScopesNamespacesListCall) Header() http.Header {
14272 if c.header_ == nil {
14273 c.header_ = make(http.Header)
14274 }
14275 return c.header_
14276 }
14277
14278 func (c *ProjectsLocationsScopesNamespacesListCall) doRequest(alt string) (*http.Response, error) {
14279 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14280 if c.ifNoneMatch_ != "" {
14281 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14282 }
14283 c.urlParams_.Set("alt", alt)
14284 c.urlParams_.Set("prettyPrint", "false")
14285 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/namespaces")
14286 urls += "?" + c.urlParams_.Encode()
14287 req, err := http.NewRequest("GET", urls, nil)
14288 if err != nil {
14289 return nil, err
14290 }
14291 req.Header = reqHeaders
14292 googleapi.Expand(req.URL, map[string]string{
14293 "parent": c.parent,
14294 })
14295 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.list", "request", internallog.HTTPRequest(req, nil))
14296 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14297 }
14298
14299 // Do executes the "gkehub.projects.locations.scopes.namespaces.list" call.
14300 // Any non-2xx status code is an error. Response headers are in either
14301 // *ListScopeNamespacesResponse.ServerResponse.Header or (if a response was
14302 // returned at all) in error.(*googleapi.Error).Header. Use
14303 // googleapi.IsNotModified to check whether the returned error was because
14304 // http.StatusNotModified was returned.
14305 func (c *ProjectsLocationsScopesNamespacesListCall) Do(opts ...googleapi.CallOption) (*ListScopeNamespacesResponse, error) {
14306 gensupport.SetOptions(c.urlParams_, opts...)
14307 res, err := c.doRequest("json")
14308 if res != nil && res.StatusCode == http.StatusNotModified {
14309 if res.Body != nil {
14310 res.Body.Close()
14311 }
14312 return nil, gensupport.WrapError(&googleapi.Error{
14313 Code: res.StatusCode,
14314 Header: res.Header,
14315 })
14316 }
14317 if err != nil {
14318 return nil, err
14319 }
14320 defer googleapi.CloseBody(res)
14321 if err := googleapi.CheckResponse(res); err != nil {
14322 return nil, gensupport.WrapError(err)
14323 }
14324 ret := &ListScopeNamespacesResponse{
14325 ServerResponse: googleapi.ServerResponse{
14326 Header: res.Header,
14327 HTTPStatusCode: res.StatusCode,
14328 },
14329 }
14330 target := &ret
14331 b, err := gensupport.DecodeResponseBytes(target, res)
14332 if err != nil {
14333 return nil, err
14334 }
14335 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.list", "response", internallog.HTTPResponse(res, b))
14336 return ret, nil
14337 }
14338
14339 // Pages invokes f for each page of results.
14340 // A non-nil error returned from f will halt the iteration.
14341 // The provided context supersedes any context provided to the Context method.
14342 func (c *ProjectsLocationsScopesNamespacesListCall) Pages(ctx context.Context, f func(*ListScopeNamespacesResponse) error) error {
14343 c.ctx_ = ctx
14344 defer c.PageToken(c.urlParams_.Get("pageToken"))
14345 for {
14346 x, err := c.Do()
14347 if err != nil {
14348 return err
14349 }
14350 if err := f(x); err != nil {
14351 return err
14352 }
14353 if x.NextPageToken == "" {
14354 return nil
14355 }
14356 c.PageToken(x.NextPageToken)
14357 }
14358 }
14359
14360 type ProjectsLocationsScopesNamespacesPatchCall struct {
14361 s *Service
14362 name string
14363 namespace *Namespace
14364 urlParams_ gensupport.URLParams
14365 ctx_ context.Context
14366 header_ http.Header
14367 }
14368
14369 // Patch: Updates a fleet namespace.
14370 //
14371 // - name: The resource name for the namespace
14372 // `projects/{project}/locations/{location}/namespaces/{namespace}`.
14373 func (r *ProjectsLocationsScopesNamespacesService) Patch(name string, namespace *Namespace) *ProjectsLocationsScopesNamespacesPatchCall {
14374 c := &ProjectsLocationsScopesNamespacesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14375 c.name = name
14376 c.namespace = namespace
14377 return c
14378 }
14379
14380 // UpdateMask sets the optional parameter "updateMask": Required. The fields to
14381 // be updated.
14382 func (c *ProjectsLocationsScopesNamespacesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsScopesNamespacesPatchCall {
14383 c.urlParams_.Set("updateMask", updateMask)
14384 return c
14385 }
14386
14387 // Fields allows partial responses to be retrieved. See
14388 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14389 // details.
14390 func (c *ProjectsLocationsScopesNamespacesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesPatchCall {
14391 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14392 return c
14393 }
14394
14395 // Context sets the context to be used in this call's Do method.
14396 func (c *ProjectsLocationsScopesNamespacesPatchCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesPatchCall {
14397 c.ctx_ = ctx
14398 return c
14399 }
14400
14401 // Header returns a http.Header that can be modified by the caller to add
14402 // headers to the request.
14403 func (c *ProjectsLocationsScopesNamespacesPatchCall) Header() http.Header {
14404 if c.header_ == nil {
14405 c.header_ = make(http.Header)
14406 }
14407 return c.header_
14408 }
14409
14410 func (c *ProjectsLocationsScopesNamespacesPatchCall) doRequest(alt string) (*http.Response, error) {
14411 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14412 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.namespace)
14413 if err != nil {
14414 return nil, err
14415 }
14416 c.urlParams_.Set("alt", alt)
14417 c.urlParams_.Set("prettyPrint", "false")
14418 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
14419 urls += "?" + c.urlParams_.Encode()
14420 req, err := http.NewRequest("PATCH", urls, body)
14421 if err != nil {
14422 return nil, err
14423 }
14424 req.Header = reqHeaders
14425 googleapi.Expand(req.URL, map[string]string{
14426 "name": c.name,
14427 })
14428 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
14429 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14430 }
14431
14432 // Do executes the "gkehub.projects.locations.scopes.namespaces.patch" call.
14433 // Any non-2xx status code is an error. Response headers are in either
14434 // *Operation.ServerResponse.Header or (if a response was returned at all) in
14435 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14436 // whether the returned error was because http.StatusNotModified was returned.
14437 func (c *ProjectsLocationsScopesNamespacesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14438 gensupport.SetOptions(c.urlParams_, opts...)
14439 res, err := c.doRequest("json")
14440 if res != nil && res.StatusCode == http.StatusNotModified {
14441 if res.Body != nil {
14442 res.Body.Close()
14443 }
14444 return nil, gensupport.WrapError(&googleapi.Error{
14445 Code: res.StatusCode,
14446 Header: res.Header,
14447 })
14448 }
14449 if err != nil {
14450 return nil, err
14451 }
14452 defer googleapi.CloseBody(res)
14453 if err := googleapi.CheckResponse(res); err != nil {
14454 return nil, gensupport.WrapError(err)
14455 }
14456 ret := &Operation{
14457 ServerResponse: googleapi.ServerResponse{
14458 Header: res.Header,
14459 HTTPStatusCode: res.StatusCode,
14460 },
14461 }
14462 target := &ret
14463 b, err := gensupport.DecodeResponseBytes(target, res)
14464 if err != nil {
14465 return nil, err
14466 }
14467 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.patch", "response", internallog.HTTPResponse(res, b))
14468 return ret, nil
14469 }
14470
14471 type ProjectsLocationsScopesRbacrolebindingsCreateCall struct {
14472 s *Service
14473 parent string
14474 rbacrolebinding *RBACRoleBinding
14475 urlParams_ gensupport.URLParams
14476 ctx_ context.Context
14477 header_ http.Header
14478 }
14479
14480 // Create: Creates a Scope RBACRoleBinding.
14481 //
14482 // - parent: The parent (project and location) where the RBACRoleBinding will
14483 // be created. Specified in the format `projects/*/locations/*/scopes/*`.
14484 func (r *ProjectsLocationsScopesRbacrolebindingsService) Create(parent string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsScopesRbacrolebindingsCreateCall {
14485 c := &ProjectsLocationsScopesRbacrolebindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14486 c.parent = parent
14487 c.rbacrolebinding = rbacrolebinding
14488 return c
14489 }
14490
14491 // RbacrolebindingId sets the optional parameter "rbacrolebindingId": Required.
14492 // Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a
14493 // valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It
14494 // must consist of lower case alphanumeric characters or `-` 3. It must start
14495 // and end with an alphanumeric character Which can be expressed as the regex:
14496 // `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
14497 func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) RbacrolebindingId(rbacrolebindingId string) *ProjectsLocationsScopesRbacrolebindingsCreateCall {
14498 c.urlParams_.Set("rbacrolebindingId", rbacrolebindingId)
14499 return c
14500 }
14501
14502 // Fields allows partial responses to be retrieved. See
14503 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14504 // details.
14505 func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsCreateCall {
14506 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14507 return c
14508 }
14509
14510 // Context sets the context to be used in this call's Do method.
14511 func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsCreateCall {
14512 c.ctx_ = ctx
14513 return c
14514 }
14515
14516 // Header returns a http.Header that can be modified by the caller to add
14517 // headers to the request.
14518 func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) Header() http.Header {
14519 if c.header_ == nil {
14520 c.header_ = make(http.Header)
14521 }
14522 return c.header_
14523 }
14524
14525 func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) doRequest(alt string) (*http.Response, error) {
14526 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14527 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rbacrolebinding)
14528 if err != nil {
14529 return nil, err
14530 }
14531 c.urlParams_.Set("alt", alt)
14532 c.urlParams_.Set("prettyPrint", "false")
14533 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/rbacrolebindings")
14534 urls += "?" + c.urlParams_.Encode()
14535 req, err := http.NewRequest("POST", urls, body)
14536 if err != nil {
14537 return nil, err
14538 }
14539 req.Header = reqHeaders
14540 googleapi.Expand(req.URL, map[string]string{
14541 "parent": c.parent,
14542 })
14543 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.create", "request", internallog.HTTPRequest(req, body.Bytes()))
14544 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14545 }
14546
14547 // Do executes the "gkehub.projects.locations.scopes.rbacrolebindings.create" call.
14548 // Any non-2xx status code is an error. Response headers are in either
14549 // *Operation.ServerResponse.Header or (if a response was returned at all) in
14550 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14551 // whether the returned error was because http.StatusNotModified was returned.
14552 func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14553 gensupport.SetOptions(c.urlParams_, opts...)
14554 res, err := c.doRequest("json")
14555 if res != nil && res.StatusCode == http.StatusNotModified {
14556 if res.Body != nil {
14557 res.Body.Close()
14558 }
14559 return nil, gensupport.WrapError(&googleapi.Error{
14560 Code: res.StatusCode,
14561 Header: res.Header,
14562 })
14563 }
14564 if err != nil {
14565 return nil, err
14566 }
14567 defer googleapi.CloseBody(res)
14568 if err := googleapi.CheckResponse(res); err != nil {
14569 return nil, gensupport.WrapError(err)
14570 }
14571 ret := &Operation{
14572 ServerResponse: googleapi.ServerResponse{
14573 Header: res.Header,
14574 HTTPStatusCode: res.StatusCode,
14575 },
14576 }
14577 target := &ret
14578 b, err := gensupport.DecodeResponseBytes(target, res)
14579 if err != nil {
14580 return nil, err
14581 }
14582 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.create", "response", internallog.HTTPResponse(res, b))
14583 return ret, nil
14584 }
14585
14586 type ProjectsLocationsScopesRbacrolebindingsDeleteCall struct {
14587 s *Service
14588 name string
14589 urlParams_ gensupport.URLParams
14590 ctx_ context.Context
14591 header_ http.Header
14592 }
14593
14594 // Delete: Deletes a Scope RBACRoleBinding.
14595 //
14596 // - name: The RBACRoleBinding resource name in the format
14597 // `projects/*/locations/*/scopes/*/rbacrolebindings/*`.
14598 func (r *ProjectsLocationsScopesRbacrolebindingsService) Delete(name string) *ProjectsLocationsScopesRbacrolebindingsDeleteCall {
14599 c := &ProjectsLocationsScopesRbacrolebindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14600 c.name = name
14601 return c
14602 }
14603
14604 // Fields allows partial responses to be retrieved. See
14605 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14606 // details.
14607 func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsDeleteCall {
14608 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14609 return c
14610 }
14611
14612 // Context sets the context to be used in this call's Do method.
14613 func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsDeleteCall {
14614 c.ctx_ = ctx
14615 return c
14616 }
14617
14618 // Header returns a http.Header that can be modified by the caller to add
14619 // headers to the request.
14620 func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Header() http.Header {
14621 if c.header_ == nil {
14622 c.header_ = make(http.Header)
14623 }
14624 return c.header_
14625 }
14626
14627 func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) doRequest(alt string) (*http.Response, error) {
14628 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14629 c.urlParams_.Set("alt", alt)
14630 c.urlParams_.Set("prettyPrint", "false")
14631 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
14632 urls += "?" + c.urlParams_.Encode()
14633 req, err := http.NewRequest("DELETE", urls, nil)
14634 if err != nil {
14635 return nil, err
14636 }
14637 req.Header = reqHeaders
14638 googleapi.Expand(req.URL, map[string]string{
14639 "name": c.name,
14640 })
14641 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.delete", "request", internallog.HTTPRequest(req, nil))
14642 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14643 }
14644
14645 // Do executes the "gkehub.projects.locations.scopes.rbacrolebindings.delete" call.
14646 // Any non-2xx status code is an error. Response headers are in either
14647 // *Operation.ServerResponse.Header or (if a response was returned at all) in
14648 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14649 // whether the returned error was because http.StatusNotModified was returned.
14650 func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14651 gensupport.SetOptions(c.urlParams_, opts...)
14652 res, err := c.doRequest("json")
14653 if res != nil && res.StatusCode == http.StatusNotModified {
14654 if res.Body != nil {
14655 res.Body.Close()
14656 }
14657 return nil, gensupport.WrapError(&googleapi.Error{
14658 Code: res.StatusCode,
14659 Header: res.Header,
14660 })
14661 }
14662 if err != nil {
14663 return nil, err
14664 }
14665 defer googleapi.CloseBody(res)
14666 if err := googleapi.CheckResponse(res); err != nil {
14667 return nil, gensupport.WrapError(err)
14668 }
14669 ret := &Operation{
14670 ServerResponse: googleapi.ServerResponse{
14671 Header: res.Header,
14672 HTTPStatusCode: res.StatusCode,
14673 },
14674 }
14675 target := &ret
14676 b, err := gensupport.DecodeResponseBytes(target, res)
14677 if err != nil {
14678 return nil, err
14679 }
14680 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.delete", "response", internallog.HTTPResponse(res, b))
14681 return ret, nil
14682 }
14683
14684 type ProjectsLocationsScopesRbacrolebindingsGetCall struct {
14685 s *Service
14686 name string
14687 urlParams_ gensupport.URLParams
14688 ifNoneMatch_ string
14689 ctx_ context.Context
14690 header_ http.Header
14691 }
14692
14693 // Get: Returns the details of a Scope RBACRoleBinding.
14694 //
14695 // - name: The RBACRoleBinding resource name in the format
14696 // `projects/*/locations/*/scopes/*/rbacrolebindings/*`.
14697 func (r *ProjectsLocationsScopesRbacrolebindingsService) Get(name string) *ProjectsLocationsScopesRbacrolebindingsGetCall {
14698 c := &ProjectsLocationsScopesRbacrolebindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14699 c.name = name
14700 return c
14701 }
14702
14703 // Fields allows partial responses to be retrieved. See
14704 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14705 // details.
14706 func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsGetCall {
14707 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14708 return c
14709 }
14710
14711 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14712 // object's ETag matches the given value. This is useful for getting updates
14713 // only after the object has changed since the last request.
14714 func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesRbacrolebindingsGetCall {
14715 c.ifNoneMatch_ = entityTag
14716 return c
14717 }
14718
14719 // Context sets the context to be used in this call's Do method.
14720 func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsGetCall {
14721 c.ctx_ = ctx
14722 return c
14723 }
14724
14725 // Header returns a http.Header that can be modified by the caller to add
14726 // headers to the request.
14727 func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Header() http.Header {
14728 if c.header_ == nil {
14729 c.header_ = make(http.Header)
14730 }
14731 return c.header_
14732 }
14733
14734 func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) doRequest(alt string) (*http.Response, error) {
14735 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14736 if c.ifNoneMatch_ != "" {
14737 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14738 }
14739 c.urlParams_.Set("alt", alt)
14740 c.urlParams_.Set("prettyPrint", "false")
14741 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
14742 urls += "?" + c.urlParams_.Encode()
14743 req, err := http.NewRequest("GET", urls, nil)
14744 if err != nil {
14745 return nil, err
14746 }
14747 req.Header = reqHeaders
14748 googleapi.Expand(req.URL, map[string]string{
14749 "name": c.name,
14750 })
14751 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.get", "request", internallog.HTTPRequest(req, nil))
14752 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14753 }
14754
14755 // Do executes the "gkehub.projects.locations.scopes.rbacrolebindings.get" call.
14756 // Any non-2xx status code is an error. Response headers are in either
14757 // *RBACRoleBinding.ServerResponse.Header or (if a response was returned at
14758 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14759 // check whether the returned error was because http.StatusNotModified was
14760 // returned.
14761 func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Do(opts ...googleapi.CallOption) (*RBACRoleBinding, error) {
14762 gensupport.SetOptions(c.urlParams_, opts...)
14763 res, err := c.doRequest("json")
14764 if res != nil && res.StatusCode == http.StatusNotModified {
14765 if res.Body != nil {
14766 res.Body.Close()
14767 }
14768 return nil, gensupport.WrapError(&googleapi.Error{
14769 Code: res.StatusCode,
14770 Header: res.Header,
14771 })
14772 }
14773 if err != nil {
14774 return nil, err
14775 }
14776 defer googleapi.CloseBody(res)
14777 if err := googleapi.CheckResponse(res); err != nil {
14778 return nil, gensupport.WrapError(err)
14779 }
14780 ret := &RBACRoleBinding{
14781 ServerResponse: googleapi.ServerResponse{
14782 Header: res.Header,
14783 HTTPStatusCode: res.StatusCode,
14784 },
14785 }
14786 target := &ret
14787 b, err := gensupport.DecodeResponseBytes(target, res)
14788 if err != nil {
14789 return nil, err
14790 }
14791 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.get", "response", internallog.HTTPResponse(res, b))
14792 return ret, nil
14793 }
14794
14795 type ProjectsLocationsScopesRbacrolebindingsListCall struct {
14796 s *Service
14797 parent string
14798 urlParams_ gensupport.URLParams
14799 ifNoneMatch_ string
14800 ctx_ context.Context
14801 header_ http.Header
14802 }
14803
14804 // List: Lists all Scope RBACRoleBindings.
14805 //
14806 // - parent: The parent (project and location) where the Features will be
14807 // listed. Specified in the format `projects/*/locations/*/scopes/*`.
14808 func (r *ProjectsLocationsScopesRbacrolebindingsService) List(parent string) *ProjectsLocationsScopesRbacrolebindingsListCall {
14809 c := &ProjectsLocationsScopesRbacrolebindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14810 c.parent = parent
14811 return c
14812 }
14813
14814 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
14815 // resources, `page_size` specifies number of resources to return. If
14816 // unspecified or set to 0, all resources will be returned.
14817 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) PageSize(pageSize int64) *ProjectsLocationsScopesRbacrolebindingsListCall {
14818 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14819 return c
14820 }
14821
14822 // PageToken sets the optional parameter "pageToken": Token returned by
14823 // previous call to `ListScopeRBACRoleBindings` which specifies the position in
14824 // the list from where to continue listing the resources.
14825 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) PageToken(pageToken string) *ProjectsLocationsScopesRbacrolebindingsListCall {
14826 c.urlParams_.Set("pageToken", pageToken)
14827 return c
14828 }
14829
14830 // Fields allows partial responses to be retrieved. See
14831 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14832 // details.
14833 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsListCall {
14834 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14835 return c
14836 }
14837
14838 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14839 // object's ETag matches the given value. This is useful for getting updates
14840 // only after the object has changed since the last request.
14841 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesRbacrolebindingsListCall {
14842 c.ifNoneMatch_ = entityTag
14843 return c
14844 }
14845
14846 // Context sets the context to be used in this call's Do method.
14847 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsListCall {
14848 c.ctx_ = ctx
14849 return c
14850 }
14851
14852 // Header returns a http.Header that can be modified by the caller to add
14853 // headers to the request.
14854 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Header() http.Header {
14855 if c.header_ == nil {
14856 c.header_ = make(http.Header)
14857 }
14858 return c.header_
14859 }
14860
14861 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) doRequest(alt string) (*http.Response, error) {
14862 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14863 if c.ifNoneMatch_ != "" {
14864 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14865 }
14866 c.urlParams_.Set("alt", alt)
14867 c.urlParams_.Set("prettyPrint", "false")
14868 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/rbacrolebindings")
14869 urls += "?" + c.urlParams_.Encode()
14870 req, err := http.NewRequest("GET", urls, nil)
14871 if err != nil {
14872 return nil, err
14873 }
14874 req.Header = reqHeaders
14875 googleapi.Expand(req.URL, map[string]string{
14876 "parent": c.parent,
14877 })
14878 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.list", "request", internallog.HTTPRequest(req, nil))
14879 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14880 }
14881
14882 // Do executes the "gkehub.projects.locations.scopes.rbacrolebindings.list" call.
14883 // Any non-2xx status code is an error. Response headers are in either
14884 // *ListScopeRBACRoleBindingsResponse.ServerResponse.Header or (if a response
14885 // was returned at all) in error.(*googleapi.Error).Header. Use
14886 // googleapi.IsNotModified to check whether the returned error was because
14887 // http.StatusNotModified was returned.
14888 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Do(opts ...googleapi.CallOption) (*ListScopeRBACRoleBindingsResponse, error) {
14889 gensupport.SetOptions(c.urlParams_, opts...)
14890 res, err := c.doRequest("json")
14891 if res != nil && res.StatusCode == http.StatusNotModified {
14892 if res.Body != nil {
14893 res.Body.Close()
14894 }
14895 return nil, gensupport.WrapError(&googleapi.Error{
14896 Code: res.StatusCode,
14897 Header: res.Header,
14898 })
14899 }
14900 if err != nil {
14901 return nil, err
14902 }
14903 defer googleapi.CloseBody(res)
14904 if err := googleapi.CheckResponse(res); err != nil {
14905 return nil, gensupport.WrapError(err)
14906 }
14907 ret := &ListScopeRBACRoleBindingsResponse{
14908 ServerResponse: googleapi.ServerResponse{
14909 Header: res.Header,
14910 HTTPStatusCode: res.StatusCode,
14911 },
14912 }
14913 target := &ret
14914 b, err := gensupport.DecodeResponseBytes(target, res)
14915 if err != nil {
14916 return nil, err
14917 }
14918 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.list", "response", internallog.HTTPResponse(res, b))
14919 return ret, nil
14920 }
14921
14922 // Pages invokes f for each page of results.
14923 // A non-nil error returned from f will halt the iteration.
14924 // The provided context supersedes any context provided to the Context method.
14925 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Pages(ctx context.Context, f func(*ListScopeRBACRoleBindingsResponse) error) error {
14926 c.ctx_ = ctx
14927 defer c.PageToken(c.urlParams_.Get("pageToken"))
14928 for {
14929 x, err := c.Do()
14930 if err != nil {
14931 return err
14932 }
14933 if err := f(x); err != nil {
14934 return err
14935 }
14936 if x.NextPageToken == "" {
14937 return nil
14938 }
14939 c.PageToken(x.NextPageToken)
14940 }
14941 }
14942
14943 type ProjectsLocationsScopesRbacrolebindingsPatchCall struct {
14944 s *Service
14945 name string
14946 rbacrolebinding *RBACRoleBinding
14947 urlParams_ gensupport.URLParams
14948 ctx_ context.Context
14949 header_ http.Header
14950 }
14951
14952 // Patch: Updates a Scope RBACRoleBinding.
14953 //
14954 // - name: The resource name for the rbacrolebinding
14955 // `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{r
14956 // bacrolebinding}` or
14957 // `projects/{project}/locations/{location}/memberships/{membership}/rbacroleb
14958 // indings/{rbacrolebinding}`.
14959 func (r *ProjectsLocationsScopesRbacrolebindingsService) Patch(name string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsScopesRbacrolebindingsPatchCall {
14960 c := &ProjectsLocationsScopesRbacrolebindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14961 c.name = name
14962 c.rbacrolebinding = rbacrolebinding
14963 return c
14964 }
14965
14966 // UpdateMask sets the optional parameter "updateMask": Required. The fields to
14967 // be updated.
14968 func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsScopesRbacrolebindingsPatchCall {
14969 c.urlParams_.Set("updateMask", updateMask)
14970 return c
14971 }
14972
14973 // Fields allows partial responses to be retrieved. See
14974 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14975 // details.
14976 func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsPatchCall {
14977 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14978 return c
14979 }
14980
14981 // Context sets the context to be used in this call's Do method.
14982 func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsPatchCall {
14983 c.ctx_ = ctx
14984 return c
14985 }
14986
14987 // Header returns a http.Header that can be modified by the caller to add
14988 // headers to the request.
14989 func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) Header() http.Header {
14990 if c.header_ == nil {
14991 c.header_ = make(http.Header)
14992 }
14993 return c.header_
14994 }
14995
14996 func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) doRequest(alt string) (*http.Response, error) {
14997 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14998 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rbacrolebinding)
14999 if err != nil {
15000 return nil, err
15001 }
15002 c.urlParams_.Set("alt", alt)
15003 c.urlParams_.Set("prettyPrint", "false")
15004 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
15005 urls += "?" + c.urlParams_.Encode()
15006 req, err := http.NewRequest("PATCH", urls, body)
15007 if err != nil {
15008 return nil, err
15009 }
15010 req.Header = reqHeaders
15011 googleapi.Expand(req.URL, map[string]string{
15012 "name": c.name,
15013 })
15014 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
15015 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15016 }
15017
15018 // Do executes the "gkehub.projects.locations.scopes.rbacrolebindings.patch" call.
15019 // Any non-2xx status code is an error. Response headers are in either
15020 // *Operation.ServerResponse.Header or (if a response was returned at all) in
15021 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15022 // whether the returned error was because http.StatusNotModified was returned.
15023 func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15024 gensupport.SetOptions(c.urlParams_, opts...)
15025 res, err := c.doRequest("json")
15026 if res != nil && res.StatusCode == http.StatusNotModified {
15027 if res.Body != nil {
15028 res.Body.Close()
15029 }
15030 return nil, gensupport.WrapError(&googleapi.Error{
15031 Code: res.StatusCode,
15032 Header: res.Header,
15033 })
15034 }
15035 if err != nil {
15036 return nil, err
15037 }
15038 defer googleapi.CloseBody(res)
15039 if err := googleapi.CheckResponse(res); err != nil {
15040 return nil, gensupport.WrapError(err)
15041 }
15042 ret := &Operation{
15043 ServerResponse: googleapi.ServerResponse{
15044 Header: res.Header,
15045 HTTPStatusCode: res.StatusCode,
15046 },
15047 }
15048 target := &ret
15049 b, err := gensupport.DecodeResponseBytes(target, res)
15050 if err != nil {
15051 return nil, err
15052 }
15053 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.patch", "response", internallog.HTTPResponse(res, b))
15054 return ret, nil
15055 }