Debian Codegraph @

gkehub/v1alpha/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/v1alpha"
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/v1alpha"
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:v1alpha"
93 const apiName = "gkehub"
94 const apiVersion = "v1alpha"
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 // CloudAuditLoggingFeatureSpec: **Cloud Audit Logging**: Spec for Audit
664 // Logging Allowlisting.
665 type CloudAuditLoggingFeatureSpec struct {
666 // AllowlistedServiceAccounts: Service account that should be allowlisted to
667 // send the audit logs; eg
668 // [email protected]. These accounts must
669 // already exist, but do not need to have any permissions granted to them. The
670 // customer's entitlements will be checked prior to allowlisting (i.e. the
671 // customer must be an Anthos customer.)
672 AllowlistedServiceAccounts []string `json:"allowlistedServiceAccounts,omitempty"`
673 // ForceSendFields is a list of field names (e.g. "AllowlistedServiceAccounts")
674 // to unconditionally include in API requests. By default, fields with empty or
675 // default values are omitted from API requests. See
676 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
677 // details.
678 ForceSendFields []string `json:"-"`
679 // NullFields is a list of field names (e.g. "AllowlistedServiceAccounts") to
680 // include in API requests with the JSON null value. By default, fields with
681 // empty values are omitted from API requests. See
682 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
683 NullFields []string `json:"-"`
684 }
685
686 func (s CloudAuditLoggingFeatureSpec) MarshalJSON() ([]byte, error) {
687 type NoMethod CloudAuditLoggingFeatureSpec
688 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
689 }
690
691 // CloudBuildMembershipSpec: **Cloud Build**: Configurations for each Cloud
692 // Build enabled cluster.
693 type CloudBuildMembershipSpec struct {
694 // SecurityPolicy: Whether it is allowed to run the privileged builds on the
695 // cluster or not.
696 //
697 // Possible values:
698 // "SECURITY_POLICY_UNSPECIFIED" - Unspecified policy
699 // "NON_PRIVILEGED" - Privileged build pods are disallowed
700 // "PRIVILEGED" - Privileged build pods are allowed
701 SecurityPolicy string `json:"securityPolicy,omitempty"`
702 // Version: Version of the cloud build software on the cluster.
703 Version string `json:"version,omitempty"`
704 // ForceSendFields is a list of field names (e.g. "SecurityPolicy") to
705 // unconditionally include in API requests. By default, fields with empty or
706 // default values are omitted from API requests. See
707 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
708 // details.
709 ForceSendFields []string `json:"-"`
710 // NullFields is a list of field names (e.g. "SecurityPolicy") to include in
711 // API requests with the JSON null value. By default, fields with empty values
712 // are omitted from API requests. See
713 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
714 NullFields []string `json:"-"`
715 }
716
717 func (s CloudBuildMembershipSpec) MarshalJSON() ([]byte, error) {
718 type NoMethod CloudBuildMembershipSpec
719 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
720 }
721
722 // ClusterSelector: Selector for clusters.
723 type ClusterSelector struct {
724 // LabelSelector: Required. A valid CEL (Common Expression Language) expression
725 // which evaluates `resource.labels`.
726 LabelSelector string `json:"labelSelector,omitempty"`
727 // ForceSendFields is a list of field names (e.g. "LabelSelector") to
728 // unconditionally include in API requests. By default, fields with empty or
729 // default values are omitted from API requests. See
730 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
731 // details.
732 ForceSendFields []string `json:"-"`
733 // NullFields is a list of field names (e.g. "LabelSelector") to include in API
734 // requests with the JSON null value. By default, fields with empty values are
735 // omitted from API requests. See
736 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
737 NullFields []string `json:"-"`
738 }
739
740 func (s ClusterSelector) MarshalJSON() ([]byte, error) {
741 type NoMethod ClusterSelector
742 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
743 }
744
745 // ClusterUpgradeFleetSpec: **ClusterUpgrade**: The configuration for the
746 // fleet-level ClusterUpgrade feature.
747 type ClusterUpgradeFleetSpec struct {
748 // GkeUpgradeOverrides: Allow users to override some properties of each GKE
749 // upgrade.
750 GkeUpgradeOverrides []*ClusterUpgradeGKEUpgradeOverride `json:"gkeUpgradeOverrides,omitempty"`
751 // PostConditions: Required. Post conditions to evaluate to mark an upgrade
752 // COMPLETE. Required.
753 PostConditions *ClusterUpgradePostConditions `json:"postConditions,omitempty"`
754 // UpgradeEngine: Output only. The effective upgrade engine for the fleet.
755 //
756 // Possible values:
757 // "UPGRADE_ENGINE_UNSPECIFIED" - Default value.
758 // "SEQUENCING_V1" - Upgrades are managed using fleet-based rollout
759 // sequencing.
760 // "SEQUENCING_V2" - Upgrades are managed using rollout sequencing with
761 // custom stages.
762 UpgradeEngine string `json:"upgradeEngine,omitempty"`
763 // UpstreamFleets: This fleet consumes upgrades that have COMPLETE status code
764 // in the upstream fleets. See UpgradeStatus.Code for code definitions. The
765 // fleet name should be either fleet project number or id. This is defined as
766 // repeated for future proof reasons. Initial implementation will enforce at
767 // most one upstream fleet.
768 UpstreamFleets []string `json:"upstreamFleets,omitempty"`
769 // ForceSendFields is a list of field names (e.g. "GkeUpgradeOverrides") to
770 // unconditionally include in API requests. By default, fields with empty or
771 // default values are omitted from API requests. See
772 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
773 // details.
774 ForceSendFields []string `json:"-"`
775 // NullFields is a list of field names (e.g. "GkeUpgradeOverrides") to include
776 // in API requests with the JSON null value. By default, fields with empty
777 // values are omitted from API requests. See
778 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
779 NullFields []string `json:"-"`
780 }
781
782 func (s ClusterUpgradeFleetSpec) MarshalJSON() ([]byte, error) {
783 type NoMethod ClusterUpgradeFleetSpec
784 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
785 }
786
787 // ClusterUpgradeFleetState: **ClusterUpgrade**: The state for the fleet-level
788 // ClusterUpgrade feature.
789 type ClusterUpgradeFleetState struct {
790 // DownstreamFleets: This fleets whose upstream_fleets contain the current
791 // fleet. The fleet name should be either fleet project number or id.
792 DownstreamFleets []string `json:"downstreamFleets,omitempty"`
793 // GkeState: Feature state for GKE clusters.
794 GkeState *ClusterUpgradeGKEUpgradeFeatureState `json:"gkeState,omitempty"`
795 // Ignored: A list of memberships ignored by the feature. For example, manually
796 // upgraded clusters can be ignored if they are newer than the default versions
797 // of its release channel. The membership resource is in the format:
798 // `projects/{p}/locations/{l}/membership/{m}`.
799 Ignored map[string]ClusterUpgradeIgnoredMembership `json:"ignored,omitempty"`
800 // ForceSendFields is a list of field names (e.g. "DownstreamFleets") to
801 // unconditionally include in API requests. By default, fields with empty or
802 // default values are omitted from API requests. See
803 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
804 // details.
805 ForceSendFields []string `json:"-"`
806 // NullFields is a list of field names (e.g. "DownstreamFleets") to include in
807 // API requests with the JSON null value. By default, fields with empty values
808 // are omitted from API requests. See
809 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
810 NullFields []string `json:"-"`
811 }
812
813 func (s ClusterUpgradeFleetState) MarshalJSON() ([]byte, error) {
814 type NoMethod ClusterUpgradeFleetState
815 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
816 }
817
818 // ClusterUpgradeGKEUpgrade: GKEUpgrade represents a GKE provided upgrade,
819 // e.g., control plane upgrade.
820 type ClusterUpgradeGKEUpgrade struct {
821 // Name: Name of the upgrade, e.g., "k8s_control_plane". It should be a valid
822 // upgrade name. It must not exceet 99 characters.
823 Name string `json:"name,omitempty"`
824 // Version: Version of the upgrade, e.g., "1.22.1-gke.100". It should be a
825 // valid version. It must not exceet 99 characters.
826 Version string `json:"version,omitempty"`
827 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
828 // include in API requests. By default, fields with empty or default values are
829 // omitted from API requests. See
830 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
831 // details.
832 ForceSendFields []string `json:"-"`
833 // NullFields is a list of field names (e.g. "Name") to include in API requests
834 // with the JSON null value. By default, fields with empty values are omitted
835 // from API requests. See
836 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
837 NullFields []string `json:"-"`
838 }
839
840 func (s ClusterUpgradeGKEUpgrade) MarshalJSON() ([]byte, error) {
841 type NoMethod ClusterUpgradeGKEUpgrade
842 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
843 }
844
845 // ClusterUpgradeGKEUpgradeFeatureCondition: GKEUpgradeFeatureCondition
846 // describes the condition of the feature for GKE clusters at a certain point
847 // of time.
848 type ClusterUpgradeGKEUpgradeFeatureCondition struct {
849 // Reason: Reason why the feature is in this status.
850 Reason string `json:"reason,omitempty"`
851 // Status: Status of the condition, one of True, False, Unknown.
852 Status string `json:"status,omitempty"`
853 // Type: Type of the condition, for example, "ready".
854 Type string `json:"type,omitempty"`
855 // UpdateTime: Last timestamp the condition was updated.
856 UpdateTime string `json:"updateTime,omitempty"`
857 // ForceSendFields is a list of field names (e.g. "Reason") to unconditionally
858 // include in API requests. By default, fields with empty or default values are
859 // omitted from API requests. See
860 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
861 // details.
862 ForceSendFields []string `json:"-"`
863 // NullFields is a list of field names (e.g. "Reason") to include in API
864 // requests with the JSON null value. By default, fields with empty values are
865 // omitted from API requests. See
866 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
867 NullFields []string `json:"-"`
868 }
869
870 func (s ClusterUpgradeGKEUpgradeFeatureCondition) MarshalJSON() ([]byte, error) {
871 type NoMethod ClusterUpgradeGKEUpgradeFeatureCondition
872 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
873 }
874
875 // ClusterUpgradeGKEUpgradeFeatureState: GKEUpgradeFeatureState contains
876 // feature states for GKE clusters in the scope.
877 type ClusterUpgradeGKEUpgradeFeatureState struct {
878 // Conditions: Current conditions of the feature.
879 Conditions []*ClusterUpgradeGKEUpgradeFeatureCondition `json:"conditions,omitempty"`
880 // UpgradeState: Upgrade state. It will eventually replace `state`.
881 UpgradeState []*ClusterUpgradeGKEUpgradeState `json:"upgradeState,omitempty"`
882 // ForceSendFields is a list of field names (e.g. "Conditions") to
883 // unconditionally include in API requests. By default, fields with empty or
884 // default values are omitted from API requests. See
885 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
886 // details.
887 ForceSendFields []string `json:"-"`
888 // NullFields is a list of field names (e.g. "Conditions") to include in API
889 // requests with the JSON null value. By default, fields with empty values are
890 // omitted from API requests. See
891 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
892 NullFields []string `json:"-"`
893 }
894
895 func (s ClusterUpgradeGKEUpgradeFeatureState) MarshalJSON() ([]byte, error) {
896 type NoMethod ClusterUpgradeGKEUpgradeFeatureState
897 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
898 }
899
900 // ClusterUpgradeGKEUpgradeOverride: Properties of a GKE upgrade that can be
901 // overridden by the user. For example, a user can skip soaking by overriding
902 // the soaking to 0.
903 type ClusterUpgradeGKEUpgradeOverride struct {
904 // PostConditions: Required. Post conditions to override for the specified
905 // upgrade (name + version). Required.
906 PostConditions *ClusterUpgradePostConditions `json:"postConditions,omitempty"`
907 // Upgrade: Required. Which upgrade to override. Required.
908 Upgrade *ClusterUpgradeGKEUpgrade `json:"upgrade,omitempty"`
909 // ForceSendFields is a list of field names (e.g. "PostConditions") to
910 // unconditionally include in API requests. By default, fields with empty or
911 // default values are omitted from API requests. See
912 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
913 // details.
914 ForceSendFields []string `json:"-"`
915 // NullFields is a list of field names (e.g. "PostConditions") to include in
916 // API requests with the JSON null value. By default, fields with empty values
917 // are omitted from API requests. See
918 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
919 NullFields []string `json:"-"`
920 }
921
922 func (s ClusterUpgradeGKEUpgradeOverride) MarshalJSON() ([]byte, error) {
923 type NoMethod ClusterUpgradeGKEUpgradeOverride
924 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
925 }
926
927 // ClusterUpgradeGKEUpgradeState: GKEUpgradeState is a GKEUpgrade and its state
928 // at the scope and fleet level.
929 type ClusterUpgradeGKEUpgradeState struct {
930 // Stats: Number of GKE clusters in each status code.
931 Stats map[string]string `json:"stats,omitempty"`
932 // Status: Status of the upgrade.
933 Status *ClusterUpgradeUpgradeStatus `json:"status,omitempty"`
934 // Upgrade: Which upgrade to track the state.
935 Upgrade *ClusterUpgradeGKEUpgrade `json:"upgrade,omitempty"`
936 // ForceSendFields is a list of field names (e.g. "Stats") to unconditionally
937 // include in API requests. By default, fields with empty or default values are
938 // omitted from API requests. See
939 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
940 // details.
941 ForceSendFields []string `json:"-"`
942 // NullFields is a list of field names (e.g. "Stats") to include in API
943 // requests with the JSON null value. By default, fields with empty values are
944 // omitted from API requests. See
945 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
946 NullFields []string `json:"-"`
947 }
948
949 func (s ClusterUpgradeGKEUpgradeState) MarshalJSON() ([]byte, error) {
950 type NoMethod ClusterUpgradeGKEUpgradeState
951 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
952 }
953
954 // ClusterUpgradeIgnoredMembership: IgnoredMembership represents a membership
955 // ignored by the feature. A membership can be ignored because it was manually
956 // upgraded to a newer version than RC default.
957 type ClusterUpgradeIgnoredMembership struct {
958 // IgnoredTime: Time when the membership was first set to ignored.
959 IgnoredTime string `json:"ignoredTime,omitempty"`
960 // Reason: Reason why the membership is ignored.
961 Reason string `json:"reason,omitempty"`
962 // ForceSendFields is a list of field names (e.g. "IgnoredTime") to
963 // unconditionally include in API requests. By default, fields with empty or
964 // default values are omitted from API requests. See
965 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
966 // details.
967 ForceSendFields []string `json:"-"`
968 // NullFields is a list of field names (e.g. "IgnoredTime") to include in API
969 // requests with the JSON null value. By default, fields with empty values are
970 // omitted from API requests. See
971 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
972 NullFields []string `json:"-"`
973 }
974
975 func (s ClusterUpgradeIgnoredMembership) MarshalJSON() ([]byte, error) {
976 type NoMethod ClusterUpgradeIgnoredMembership
977 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
978 }
979
980 // ClusterUpgradeMembershipGKEUpgradeState: ScopeGKEUpgradeState is a
981 // GKEUpgrade and its state per-membership.
982 type ClusterUpgradeMembershipGKEUpgradeState struct {
983 // Status: Status of the upgrade.
984 Status *ClusterUpgradeUpgradeStatus `json:"status,omitempty"`
985 // Upgrade: Which upgrade to track the state.
986 Upgrade *ClusterUpgradeGKEUpgrade `json:"upgrade,omitempty"`
987 // ForceSendFields is a list of field names (e.g. "Status") to unconditionally
988 // include in API requests. By default, fields with empty or default values are
989 // omitted from API requests. See
990 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
991 // details.
992 ForceSendFields []string `json:"-"`
993 // NullFields is a list of field names (e.g. "Status") to include in API
994 // requests with the JSON null value. By default, fields with empty values are
995 // omitted from API requests. See
996 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
997 NullFields []string `json:"-"`
998 }
999
1000 func (s ClusterUpgradeMembershipGKEUpgradeState) MarshalJSON() ([]byte, error) {
1001 type NoMethod ClusterUpgradeMembershipGKEUpgradeState
1002 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1003 }
1004
1005 // ClusterUpgradeMembershipState: Per-membership state for this feature.
1006 type ClusterUpgradeMembershipState struct {
1007 // Ignored: Whether this membership is ignored by the feature. For example,
1008 // manually upgraded clusters can be ignored if they are newer than the default
1009 // versions of its release channel.
1010 Ignored *ClusterUpgradeIgnoredMembership `json:"ignored,omitempty"`
1011 // Scopes: Fully qualified scope names that this clusters is bound to which
1012 // also have rollout sequencing enabled.
1013 Scopes []string `json:"scopes,omitempty"`
1014 // Upgrades: Actual upgrade state against desired.
1015 Upgrades []*ClusterUpgradeMembershipGKEUpgradeState `json:"upgrades,omitempty"`
1016 // ForceSendFields is a list of field names (e.g. "Ignored") to unconditionally
1017 // include in API requests. By default, fields with empty or default values are
1018 // omitted from API requests. See
1019 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1020 // details.
1021 ForceSendFields []string `json:"-"`
1022 // NullFields is a list of field names (e.g. "Ignored") to include in API
1023 // requests with the JSON null value. By default, fields with empty values are
1024 // omitted from API requests. See
1025 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1026 NullFields []string `json:"-"`
1027 }
1028
1029 func (s ClusterUpgradeMembershipState) MarshalJSON() ([]byte, error) {
1030 type NoMethod ClusterUpgradeMembershipState
1031 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1032 }
1033
1034 // ClusterUpgradePostConditions: Post conditional checks after an upgrade has
1035 // been applied on all eligible clusters.
1036 type ClusterUpgradePostConditions struct {
1037 // Soaking: Required. Amount of time to "soak" after a rollout has been
1038 // finished before marking it COMPLETE. Cannot exceed 30 days. Required.
1039 Soaking string `json:"soaking,omitempty"`
1040 // ForceSendFields is a list of field names (e.g. "Soaking") to unconditionally
1041 // include in API requests. By default, fields with empty or default values are
1042 // omitted from API requests. See
1043 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1044 // details.
1045 ForceSendFields []string `json:"-"`
1046 // NullFields is a list of field names (e.g. "Soaking") to include in API
1047 // requests with the JSON null value. By default, fields with empty values are
1048 // omitted from API requests. See
1049 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1050 NullFields []string `json:"-"`
1051 }
1052
1053 func (s ClusterUpgradePostConditions) MarshalJSON() ([]byte, error) {
1054 type NoMethod ClusterUpgradePostConditions
1055 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1056 }
1057
1058 // ClusterUpgradeScopeSpec: **ClusterUpgrade**: The configuration for the
1059 // scope-level ClusterUpgrade feature.
1060 type ClusterUpgradeScopeSpec struct {
1061 // GkeUpgradeOverrides: Allow users to override some properties of each GKE
1062 // upgrade.
1063 GkeUpgradeOverrides []*ClusterUpgradeGKEUpgradeOverride `json:"gkeUpgradeOverrides,omitempty"`
1064 // PostConditions: Required. Post conditions to evaluate to mark an upgrade
1065 // COMPLETE. Required.
1066 PostConditions *ClusterUpgradePostConditions `json:"postConditions,omitempty"`
1067 // UpstreamScopes: This scope consumes upgrades that have COMPLETE status code
1068 // in the upstream scopes. See UpgradeStatus.Code for code definitions. The
1069 // scope name should be in the form: `projects/{p}/locations/global/scopes/{s}`
1070 // Where {p} is the project, {s} is a valid Scope in this project. {p} WILL
1071 // match the Feature's project. This is defined as repeated for future proof
1072 // reasons. Initial implementation will enforce at most one upstream scope.
1073 UpstreamScopes []string `json:"upstreamScopes,omitempty"`
1074 // ForceSendFields is a list of field names (e.g. "GkeUpgradeOverrides") to
1075 // unconditionally include in API requests. By default, fields with empty or
1076 // default values are omitted from API requests. See
1077 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1078 // details.
1079 ForceSendFields []string `json:"-"`
1080 // NullFields is a list of field names (e.g. "GkeUpgradeOverrides") to include
1081 // in API requests with the JSON null value. By default, fields with empty
1082 // values are omitted from API requests. See
1083 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1084 NullFields []string `json:"-"`
1085 }
1086
1087 func (s ClusterUpgradeScopeSpec) MarshalJSON() ([]byte, error) {
1088 type NoMethod ClusterUpgradeScopeSpec
1089 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1090 }
1091
1092 // ClusterUpgradeScopeState: **ClusterUpgrade**: The state for the scope-level
1093 // ClusterUpgrade feature.
1094 type ClusterUpgradeScopeState struct {
1095 // DownstreamScopes: This scopes whose upstream_scopes contain the current
1096 // scope. The scope name should be in the form:
1097 // `projects/{p}/locations/gloobal/scopes/{s}` Where {p} is the project, {s} is
1098 // a valid Scope in this project. {p} WILL match the Feature's project.
1099 DownstreamScopes []string `json:"downstreamScopes,omitempty"`
1100 // GkeState: Feature state for GKE clusters.
1101 GkeState *ClusterUpgradeGKEUpgradeFeatureState `json:"gkeState,omitempty"`
1102 // Ignored: A list of memberships ignored by the feature. For example, manually
1103 // upgraded clusters can be ignored if they are newer than the default versions
1104 // of its release channel. The membership resource is in the format:
1105 // `projects/{p}/locations/{l}/membership/{m}`.
1106 Ignored map[string]ClusterUpgradeIgnoredMembership `json:"ignored,omitempty"`
1107 // ForceSendFields is a list of field names (e.g. "DownstreamScopes") to
1108 // unconditionally include in API requests. By default, fields with empty or
1109 // default values are omitted from API requests. See
1110 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1111 // details.
1112 ForceSendFields []string `json:"-"`
1113 // NullFields is a list of field names (e.g. "DownstreamScopes") to include in
1114 // API requests with the JSON null value. By default, fields with empty values
1115 // are omitted from API requests. See
1116 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1117 NullFields []string `json:"-"`
1118 }
1119
1120 func (s ClusterUpgradeScopeState) MarshalJSON() ([]byte, error) {
1121 type NoMethod ClusterUpgradeScopeState
1122 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1123 }
1124
1125 // ClusterUpgradeUpgradeStatus: UpgradeStatus provides status information for
1126 // each upgrade.
1127 type ClusterUpgradeUpgradeStatus struct {
1128 // Code: Status code of the upgrade.
1129 //
1130 // Possible values:
1131 // "CODE_UNSPECIFIED" - Required by https://linter.aip.dev/126/unspecified.
1132 // "INELIGIBLE" - The upgrade is ineligible. At the scope level, this means
1133 // the upgrade is ineligible for all the clusters in the scope.
1134 // "PENDING" - The upgrade is pending. At the scope level, this means the
1135 // upgrade is pending for all the clusters in the scope.
1136 // "IN_PROGRESS" - The upgrade is in progress. At the scope level, this means
1137 // the upgrade is in progress for at least one cluster in the scope.
1138 // "SOAKING" - The upgrade has finished and is soaking until the soaking time
1139 // is up. At the scope level, this means at least one cluster is in soaking
1140 // while the rest are either soaking or complete.
1141 // "FORCED_SOAKING" - A cluster will be forced to enter soaking if an upgrade
1142 // doesn't finish within a certain limit, despite it's actual status.
1143 // "COMPLETE" - The upgrade has passed all post conditions (soaking). At the
1144 // scope level, this means all eligible clusters are in COMPLETE status.
1145 Code string `json:"code,omitempty"`
1146 // Reason: Reason for this status.
1147 Reason string `json:"reason,omitempty"`
1148 // UpdateTime: Last timestamp the status was updated.
1149 UpdateTime string `json:"updateTime,omitempty"`
1150 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
1151 // include in API requests. By default, fields with empty or default values are
1152 // omitted from API requests. See
1153 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1154 // details.
1155 ForceSendFields []string `json:"-"`
1156 // NullFields is a list of field names (e.g. "Code") to include in API requests
1157 // with the JSON null value. By default, fields with empty values are omitted
1158 // from API requests. See
1159 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1160 NullFields []string `json:"-"`
1161 }
1162
1163 func (s ClusterUpgradeUpgradeStatus) MarshalJSON() ([]byte, error) {
1164 type NoMethod ClusterUpgradeUpgradeStatus
1165 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1166 }
1167
1168 // CommonFeatureSpec: CommonFeatureSpec contains Fleet-wide configuration
1169 // information
1170 type CommonFeatureSpec struct {
1171 // Appdevexperience: Appdevexperience specific spec.
1172 Appdevexperience *AppDevExperienceFeatureSpec `json:"appdevexperience,omitempty"`
1173 // Cloudauditlogging: Cloud Audit Logging-specific spec.
1174 Cloudauditlogging *CloudAuditLoggingFeatureSpec `json:"cloudauditlogging,omitempty"`
1175 // Clusterupgrade: ClusterUpgrade (fleet-based) feature spec.
1176 Clusterupgrade *ClusterUpgradeFleetSpec `json:"clusterupgrade,omitempty"`
1177 // Dataplanev2: DataplaneV2 feature spec.
1178 Dataplanev2 *DataplaneV2FeatureSpec `json:"dataplanev2,omitempty"`
1179 // Fleetobservability: FleetObservability feature spec.
1180 Fleetobservability *FleetObservabilityFeatureSpec `json:"fleetobservability,omitempty"`
1181 // Multiclusteringress: Multicluster Ingress-specific spec.
1182 Multiclusteringress *MultiClusterIngressFeatureSpec `json:"multiclusteringress,omitempty"`
1183 // Namespaceactuation: Namespace Actuation feature spec
1184 Namespaceactuation *NamespaceActuationFeatureSpec `json:"namespaceactuation,omitempty"`
1185 // Rbacrolebindingactuation: RBAC Role Binding Actuation feature spec
1186 Rbacrolebindingactuation *RBACRoleBindingActuationFeatureSpec `json:"rbacrolebindingactuation,omitempty"`
1187 // Workloadcertificate: Workload Certificate spec.
1188 Workloadcertificate *FeatureSpec `json:"workloadcertificate,omitempty"`
1189 // Workloadidentity: Workload Identity feature spec.
1190 Workloadidentity *WorkloadIdentityFeatureSpec `json:"workloadidentity,omitempty"`
1191 // ForceSendFields is a list of field names (e.g. "Appdevexperience") to
1192 // unconditionally include in API requests. By default, fields with empty or
1193 // default values are omitted from API requests. See
1194 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1195 // details.
1196 ForceSendFields []string `json:"-"`
1197 // NullFields is a list of field names (e.g. "Appdevexperience") to include in
1198 // API requests with the JSON null value. By default, fields with empty values
1199 // are omitted from API requests. See
1200 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1201 NullFields []string `json:"-"`
1202 }
1203
1204 func (s CommonFeatureSpec) MarshalJSON() ([]byte, error) {
1205 type NoMethod CommonFeatureSpec
1206 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1207 }
1208
1209 // CommonFeatureState: CommonFeatureState contains Fleet-wide Feature status
1210 // information.
1211 type CommonFeatureState struct {
1212 // Appdevexperience: Appdevexperience specific state.
1213 Appdevexperience *AppDevExperienceFeatureState `json:"appdevexperience,omitempty"`
1214 // Clusterupgrade: ClusterUpgrade fleet-level state.
1215 Clusterupgrade *ClusterUpgradeFleetState `json:"clusterupgrade,omitempty"`
1216 // Fleetobservability: FleetObservability feature state.
1217 Fleetobservability *FleetObservabilityFeatureState `json:"fleetobservability,omitempty"`
1218 // Namespaceactuation: Namespace Actuation feature state.
1219 Namespaceactuation *NamespaceActuationFeatureState `json:"namespaceactuation,omitempty"`
1220 // Rbacrolebindingactuation: RBAC Role Binding Actuation feature state
1221 Rbacrolebindingactuation *RBACRoleBindingActuationFeatureState `json:"rbacrolebindingactuation,omitempty"`
1222 // Servicemesh: Service Mesh-specific state.
1223 Servicemesh *ServiceMeshFeatureState `json:"servicemesh,omitempty"`
1224 // State: Output only. The "running state" of the Feature in this Fleet.
1225 State *FeatureState `json:"state,omitempty"`
1226 // Workloadidentity: WorkloadIdentity fleet-level state.
1227 Workloadidentity *WorkloadIdentityFeatureState `json:"workloadidentity,omitempty"`
1228 // ForceSendFields is a list of field names (e.g. "Appdevexperience") to
1229 // unconditionally include in API requests. By default, fields with empty or
1230 // default values are omitted from API requests. See
1231 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1232 // details.
1233 ForceSendFields []string `json:"-"`
1234 // NullFields is a list of field names (e.g. "Appdevexperience") to include in
1235 // API requests with the JSON null value. By default, fields with empty values
1236 // are omitted from API requests. See
1237 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1238 NullFields []string `json:"-"`
1239 }
1240
1241 func (s CommonFeatureState) MarshalJSON() ([]byte, error) {
1242 type NoMethod CommonFeatureState
1243 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1244 }
1245
1246 // CommonFleetDefaultMemberConfigSpec: CommonFleetDefaultMemberConfigSpec
1247 // contains default configuration information for memberships of a fleet
1248 type CommonFleetDefaultMemberConfigSpec struct {
1249 // Configmanagement: Config Management-specific spec.
1250 Configmanagement *ConfigManagementMembershipSpec `json:"configmanagement,omitempty"`
1251 // Identityservice: Identity Service-specific spec.
1252 Identityservice *IdentityServiceMembershipSpec `json:"identityservice,omitempty"`
1253 // Mesh: Anthos Service Mesh-specific spec
1254 Mesh *ServiceMeshMembershipSpec `json:"mesh,omitempty"`
1255 // Policycontroller: Policy Controller spec.
1256 Policycontroller *PolicyControllerMembershipSpec `json:"policycontroller,omitempty"`
1257 // ForceSendFields is a list of field names (e.g. "Configmanagement") to
1258 // unconditionally include in API requests. By default, fields with empty or
1259 // default values are omitted from API requests. See
1260 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1261 // details.
1262 ForceSendFields []string `json:"-"`
1263 // NullFields is a list of field names (e.g. "Configmanagement") to include in
1264 // API requests with the JSON null value. By default, fields with empty values
1265 // are omitted from API requests. See
1266 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1267 NullFields []string `json:"-"`
1268 }
1269
1270 func (s CommonFleetDefaultMemberConfigSpec) MarshalJSON() ([]byte, error) {
1271 type NoMethod CommonFleetDefaultMemberConfigSpec
1272 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1273 }
1274
1275 // CompliancePostureConfig: Deprecated: Compliance Posture is no longer
1276 // supported. For more details, see
1277 // https://cloud.google.com/kubernetes-engine/docs/deprecations/posture-management-deprecation.
1278 // CompliancePostureConfig defines the settings needed to enable/disable
1279 // features for the Compliance Posture.
1280 type CompliancePostureConfig struct {
1281 // ComplianceStandards: List of enabled compliance standards.
1282 ComplianceStandards []*ComplianceStandard `json:"complianceStandards,omitempty"`
1283 // Mode: Defines the enablement mode for Compliance Posture.
1284 //
1285 // Possible values:
1286 // "MODE_UNSPECIFIED" - Default value not specified.
1287 // "DISABLED" - Disables Compliance Posture features on the cluster.
1288 // "ENABLED" - Enables Compliance Posture features on the cluster.
1289 Mode string `json:"mode,omitempty"`
1290 // ForceSendFields is a list of field names (e.g. "ComplianceStandards") to
1291 // unconditionally include in API requests. By default, fields with empty or
1292 // default values are omitted from API requests. See
1293 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1294 // details.
1295 ForceSendFields []string `json:"-"`
1296 // NullFields is a list of field names (e.g. "ComplianceStandards") to include
1297 // in API requests with the JSON null value. By default, fields with empty
1298 // values are omitted from API requests. See
1299 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1300 NullFields []string `json:"-"`
1301 }
1302
1303 func (s CompliancePostureConfig) MarshalJSON() ([]byte, error) {
1304 type NoMethod CompliancePostureConfig
1305 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1306 }
1307
1308 type ComplianceStandard struct {
1309 // Standard: Name of the compliance standard.
1310 Standard string `json:"standard,omitempty"`
1311 // ForceSendFields is a list of field names (e.g. "Standard") to
1312 // unconditionally include in API requests. By default, fields with empty or
1313 // default values are omitted from API requests. See
1314 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1315 // details.
1316 ForceSendFields []string `json:"-"`
1317 // NullFields is a list of field names (e.g. "Standard") to include in API
1318 // requests with the JSON null value. By default, fields with empty values are
1319 // omitted from API requests. See
1320 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1321 NullFields []string `json:"-"`
1322 }
1323
1324 func (s ComplianceStandard) MarshalJSON() ([]byte, error) {
1325 type NoMethod ComplianceStandard
1326 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1327 }
1328
1329 // ConfigManagementBinauthzConfig: Configuration for Binauthz
1330 type ConfigManagementBinauthzConfig struct {
1331 // Enabled: Whether binauthz is enabled in this cluster.
1332 Enabled bool `json:"enabled,omitempty"`
1333 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
1334 // include in API requests. By default, fields with empty or default values are
1335 // omitted from API requests. See
1336 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1337 // details.
1338 ForceSendFields []string `json:"-"`
1339 // NullFields is a list of field names (e.g. "Enabled") to include in API
1340 // requests with the JSON null value. By default, fields with empty values are
1341 // omitted from API requests. See
1342 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1343 NullFields []string `json:"-"`
1344 }
1345
1346 func (s ConfigManagementBinauthzConfig) MarshalJSON() ([]byte, error) {
1347 type NoMethod ConfigManagementBinauthzConfig
1348 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1349 }
1350
1351 // ConfigManagementBinauthzState: State for Binauthz
1352 type ConfigManagementBinauthzState struct {
1353 // Version: The version of binauthz that is installed.
1354 Version *ConfigManagementBinauthzVersion `json:"version,omitempty"`
1355 // Webhook: The state of the binauthz webhook.
1356 //
1357 // Possible values:
1358 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1359 // "NOT_INSTALLED" - Deployment is not installed
1360 // "INSTALLED" - Deployment is installed
1361 // "ERROR" - Deployment was attempted to be installed, but has errors
1362 // "PENDING" - Deployment is installing or terminating
1363 Webhook string `json:"webhook,omitempty"`
1364 // ForceSendFields is a list of field names (e.g. "Version") to unconditionally
1365 // include in API requests. By default, fields with empty or default values are
1366 // omitted from API requests. See
1367 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1368 // details.
1369 ForceSendFields []string `json:"-"`
1370 // NullFields is a list of field names (e.g. "Version") to include in API
1371 // requests with the JSON null value. By default, fields with empty values are
1372 // omitted from API requests. See
1373 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1374 NullFields []string `json:"-"`
1375 }
1376
1377 func (s ConfigManagementBinauthzState) MarshalJSON() ([]byte, error) {
1378 type NoMethod ConfigManagementBinauthzState
1379 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1380 }
1381
1382 // ConfigManagementBinauthzVersion: The version of binauthz.
1383 type ConfigManagementBinauthzVersion struct {
1384 // WebhookVersion: The version of the binauthz webhook.
1385 WebhookVersion string `json:"webhookVersion,omitempty"`
1386 // ForceSendFields is a list of field names (e.g. "WebhookVersion") to
1387 // unconditionally include in API requests. By default, fields with empty or
1388 // default values are omitted from API requests. See
1389 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1390 // details.
1391 ForceSendFields []string `json:"-"`
1392 // NullFields is a list of field names (e.g. "WebhookVersion") to include in
1393 // API requests with the JSON null value. By default, fields with empty values
1394 // are omitted from API requests. See
1395 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1396 NullFields []string `json:"-"`
1397 }
1398
1399 func (s ConfigManagementBinauthzVersion) MarshalJSON() ([]byte, error) {
1400 type NoMethod ConfigManagementBinauthzVersion
1401 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1402 }
1403
1404 // ConfigManagementConfigSync: Configuration for Config Sync
1405 type ConfigManagementConfigSync struct {
1406 // DeploymentOverrides: Optional. Configuration for deployment overrides.
1407 // Applies only to Config Sync deployments with containers that are not a root
1408 // or namespace reconciler: `reconciler-manager`, `otel-collector`,
1409 // `resource-group-controller-manager`, `admission-webhook`. To override a root
1410 // or namespace reconciler, use the rootsync or reposync fields at
1411 // https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rootsync-reposync-fields#override-resources
1412 // instead.
1413 DeploymentOverrides []*ConfigManagementDeploymentOverride `json:"deploymentOverrides,omitempty"`
1414 // Enabled: Optional. Enables the installation of Config Sync. If set to true,
1415 // the Feature will manage Config Sync resources, and apply the other
1416 // ConfigSync fields if they exist. If set to false, the Feature will ignore
1417 // all other ConfigSync fields and delete the Config Sync resources. If
1418 // omitted, ConfigSync is considered enabled if the git or oci field is
1419 // present.
1420 Enabled bool `json:"enabled,omitempty"`
1421 // Git: Optional. Git repo configuration for the cluster.
1422 Git *ConfigManagementGitConfig `json:"git,omitempty"`
1423 // MetricsGcpServiceAccountEmail: Optional. The Email of the Google Cloud
1424 // Service Account (GSA) used for exporting Config Sync metrics to Cloud
1425 // Monitoring and Cloud Monarch when Workload Identity is enabled. The GSA
1426 // should have the Monitoring Metric Writer (roles/monitoring.metricWriter) IAM
1427 // role. The Kubernetes ServiceAccount `default` in the namespace
1428 // `config-management-monitoring` should be bound to the GSA. Deprecated: If
1429 // Workload Identity Federation for GKE is enabled, Google Cloud Service
1430 // Account is no longer needed for exporting Config Sync metrics:
1431 // https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/how-to/monitor-config-sync-cloud-monitoring#custom-monitoring.
1432 MetricsGcpServiceAccountEmail string `json:"metricsGcpServiceAccountEmail,omitempty"`
1433 // Oci: Optional. OCI repo configuration for the cluster
1434 Oci *ConfigManagementOciConfig `json:"oci,omitempty"`
1435 // PreventDrift: Optional. Set to true to enable the Config Sync admission
1436 // webhook to prevent drifts. If set to false, disables the Config Sync
1437 // admission webhook and does not prevent drifts. Defaults to false. See
1438 // https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/how-to/prevent-config-drift
1439 // for details.
1440 PreventDrift bool `json:"preventDrift,omitempty"`
1441 // SourceFormat: Optional. Specifies whether the Config Sync repo is in
1442 // `hierarchical` or `unstructured` mode. Defaults to `hierarchical`. See
1443 // https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/concepts/configs#organize-configs
1444 // for an explanation.
1445 SourceFormat string `json:"sourceFormat,omitempty"`
1446 // StopSyncing: Optional. Set to true to stop syncing configs for a single
1447 // cluster. Default to false.
1448 StopSyncing bool `json:"stopSyncing,omitempty"`
1449 // ForceSendFields is a list of field names (e.g. "DeploymentOverrides") to
1450 // unconditionally include in API requests. By default, fields with empty or
1451 // default values are omitted from API requests. See
1452 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1453 // details.
1454 ForceSendFields []string `json:"-"`
1455 // NullFields is a list of field names (e.g. "DeploymentOverrides") to include
1456 // in API requests with the JSON null value. By default, fields with empty
1457 // values are omitted from API requests. See
1458 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1459 NullFields []string `json:"-"`
1460 }
1461
1462 func (s ConfigManagementConfigSync) MarshalJSON() ([]byte, error) {
1463 type NoMethod ConfigManagementConfigSync
1464 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1465 }
1466
1467 // ConfigManagementConfigSyncDeploymentState: The state of ConfigSync's
1468 // deployment on a cluster
1469 type ConfigManagementConfigSyncDeploymentState struct {
1470 // AdmissionWebhook: Deployment state of admission-webhook
1471 //
1472 // Possible values:
1473 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1474 // "NOT_INSTALLED" - Deployment is not installed
1475 // "INSTALLED" - Deployment is installed
1476 // "ERROR" - Deployment was attempted to be installed, but has errors
1477 // "PENDING" - Deployment is installing or terminating
1478 AdmissionWebhook string `json:"admissionWebhook,omitempty"`
1479 // GitSync: Deployment state of the git-sync pod
1480 //
1481 // Possible values:
1482 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1483 // "NOT_INSTALLED" - Deployment is not installed
1484 // "INSTALLED" - Deployment is installed
1485 // "ERROR" - Deployment was attempted to be installed, but has errors
1486 // "PENDING" - Deployment is installing or terminating
1487 GitSync string `json:"gitSync,omitempty"`
1488 // Importer: Deployment state of the importer pod
1489 //
1490 // Possible values:
1491 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1492 // "NOT_INSTALLED" - Deployment is not installed
1493 // "INSTALLED" - Deployment is installed
1494 // "ERROR" - Deployment was attempted to be installed, but has errors
1495 // "PENDING" - Deployment is installing or terminating
1496 Importer string `json:"importer,omitempty"`
1497 // Monitor: Deployment state of the monitor pod
1498 //
1499 // Possible values:
1500 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1501 // "NOT_INSTALLED" - Deployment is not installed
1502 // "INSTALLED" - Deployment is installed
1503 // "ERROR" - Deployment was attempted to be installed, but has errors
1504 // "PENDING" - Deployment is installing or terminating
1505 Monitor string `json:"monitor,omitempty"`
1506 // OtelCollector: Deployment state of otel-collector
1507 //
1508 // Possible values:
1509 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1510 // "NOT_INSTALLED" - Deployment is not installed
1511 // "INSTALLED" - Deployment is installed
1512 // "ERROR" - Deployment was attempted to be installed, but has errors
1513 // "PENDING" - Deployment is installing or terminating
1514 OtelCollector string `json:"otelCollector,omitempty"`
1515 // ReconcilerManager: Deployment state of reconciler-manager pod
1516 //
1517 // Possible values:
1518 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1519 // "NOT_INSTALLED" - Deployment is not installed
1520 // "INSTALLED" - Deployment is installed
1521 // "ERROR" - Deployment was attempted to be installed, but has errors
1522 // "PENDING" - Deployment is installing or terminating
1523 ReconcilerManager string `json:"reconcilerManager,omitempty"`
1524 // ResourceGroupControllerManager: Deployment state of
1525 // resource-group-controller-manager
1526 //
1527 // Possible values:
1528 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1529 // "NOT_INSTALLED" - Deployment is not installed
1530 // "INSTALLED" - Deployment is installed
1531 // "ERROR" - Deployment was attempted to be installed, but has errors
1532 // "PENDING" - Deployment is installing or terminating
1533 ResourceGroupControllerManager string `json:"resourceGroupControllerManager,omitempty"`
1534 // RootReconciler: Deployment state of root-reconciler
1535 //
1536 // Possible values:
1537 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1538 // "NOT_INSTALLED" - Deployment is not installed
1539 // "INSTALLED" - Deployment is installed
1540 // "ERROR" - Deployment was attempted to be installed, but has errors
1541 // "PENDING" - Deployment is installing or terminating
1542 RootReconciler string `json:"rootReconciler,omitempty"`
1543 // Syncer: Deployment state of the syncer pod
1544 //
1545 // Possible values:
1546 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1547 // "NOT_INSTALLED" - Deployment is not installed
1548 // "INSTALLED" - Deployment is installed
1549 // "ERROR" - Deployment was attempted to be installed, but has errors
1550 // "PENDING" - Deployment is installing or terminating
1551 Syncer string `json:"syncer,omitempty"`
1552 // ForceSendFields is a list of field names (e.g. "AdmissionWebhook") to
1553 // unconditionally include in API requests. By default, fields with empty or
1554 // default values are omitted from API requests. See
1555 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1556 // details.
1557 ForceSendFields []string `json:"-"`
1558 // NullFields is a list of field names (e.g. "AdmissionWebhook") to include in
1559 // API requests with the JSON null value. By default, fields with empty values
1560 // are omitted from API requests. See
1561 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1562 NullFields []string `json:"-"`
1563 }
1564
1565 func (s ConfigManagementConfigSyncDeploymentState) MarshalJSON() ([]byte, error) {
1566 type NoMethod ConfigManagementConfigSyncDeploymentState
1567 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1568 }
1569
1570 // ConfigManagementConfigSyncError: Errors pertaining to the installation of
1571 // Config Sync
1572 type ConfigManagementConfigSyncError struct {
1573 // ErrorMessage: A string representing the user facing error message
1574 ErrorMessage string `json:"errorMessage,omitempty"`
1575 // ForceSendFields is a list of field names (e.g. "ErrorMessage") to
1576 // unconditionally include in API requests. By default, fields with empty or
1577 // default values are omitted from API requests. See
1578 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1579 // details.
1580 ForceSendFields []string `json:"-"`
1581 // NullFields is a list of field names (e.g. "ErrorMessage") to include in API
1582 // requests with the JSON null value. By default, fields with empty values are
1583 // omitted from API requests. See
1584 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1585 NullFields []string `json:"-"`
1586 }
1587
1588 func (s ConfigManagementConfigSyncError) MarshalJSON() ([]byte, error) {
1589 type NoMethod ConfigManagementConfigSyncError
1590 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1591 }
1592
1593 // ConfigManagementConfigSyncState: State information for ConfigSync
1594 type ConfigManagementConfigSyncState struct {
1595 // ClusterLevelStopSyncingState: Output only. Whether syncing resources to the
1596 // cluster is stopped at the cluster level.
1597 //
1598 // Possible values:
1599 // "STOP_SYNCING_STATE_UNSPECIFIED" - State cannot be determined
1600 // "NOT_STOPPED" - Syncing resources to the cluster is not stopped at the
1601 // cluster level.
1602 // "PENDING" - Some reconcilers stop syncing resources to the cluster, while
1603 // others are still syncing.
1604 // "STOPPED" - Syncing resources to the cluster is stopped at the cluster
1605 // level.
1606 ClusterLevelStopSyncingState string `json:"clusterLevelStopSyncingState,omitempty"`
1607 // CrCount: Output only. The number of RootSync and RepoSync CRs in the
1608 // cluster.
1609 CrCount int64 `json:"crCount,omitempty"`
1610 // DeploymentState: Output only. Information about the deployment of
1611 // ConfigSync, including the version of the various Pods deployed
1612 DeploymentState *ConfigManagementConfigSyncDeploymentState `json:"deploymentState,omitempty"`
1613 // Errors: Output only. Errors pertaining to the installation of Config Sync.
1614 Errors []*ConfigManagementConfigSyncError `json:"errors,omitempty"`
1615 // ReposyncCrd: Output only. The state of the Reposync CRD
1616 //
1617 // Possible values:
1618 // "CRD_STATE_UNSPECIFIED" - CRD's state cannot be determined
1619 // "NOT_INSTALLED" - CRD is not installed
1620 // "INSTALLED" - CRD is installed
1621 // "TERMINATING" - CRD is terminating (i.e., it has been deleted and is
1622 // cleaning up)
1623 // "INSTALLING" - CRD is installing
1624 ReposyncCrd string `json:"reposyncCrd,omitempty"`
1625 // RootsyncCrd: Output only. The state of the RootSync CRD
1626 //
1627 // Possible values:
1628 // "CRD_STATE_UNSPECIFIED" - CRD's state cannot be determined
1629 // "NOT_INSTALLED" - CRD is not installed
1630 // "INSTALLED" - CRD is installed
1631 // "TERMINATING" - CRD is terminating (i.e., it has been deleted and is
1632 // cleaning up)
1633 // "INSTALLING" - CRD is installing
1634 RootsyncCrd string `json:"rootsyncCrd,omitempty"`
1635 // State: Output only. The state of CS This field summarizes the other fields
1636 // in this message.
1637 //
1638 // Possible values:
1639 // "STATE_UNSPECIFIED" - CS's state cannot be determined.
1640 // "CONFIG_SYNC_NOT_INSTALLED" - CS is not installed.
1641 // "CONFIG_SYNC_INSTALLED" - The expected CS version is installed
1642 // successfully.
1643 // "CONFIG_SYNC_ERROR" - CS encounters errors.
1644 // "CONFIG_SYNC_PENDING" - CS is installing or terminating.
1645 State string `json:"state,omitempty"`
1646 // SyncState: Output only. The state of ConfigSync's process to sync configs to
1647 // a cluster
1648 SyncState *ConfigManagementSyncState `json:"syncState,omitempty"`
1649 // Version: Output only. The version of ConfigSync deployed
1650 Version *ConfigManagementConfigSyncVersion `json:"version,omitempty"`
1651 // ForceSendFields is a list of field names (e.g.
1652 // "ClusterLevelStopSyncingState") to unconditionally include in API requests.
1653 // By default, fields with empty or default values are omitted from API
1654 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
1655 // for more details.
1656 ForceSendFields []string `json:"-"`
1657 // NullFields is a list of field names (e.g. "ClusterLevelStopSyncingState") to
1658 // include in API requests with the JSON null value. By default, fields with
1659 // empty values are omitted from API requests. See
1660 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1661 NullFields []string `json:"-"`
1662 }
1663
1664 func (s ConfigManagementConfigSyncState) MarshalJSON() ([]byte, error) {
1665 type NoMethod ConfigManagementConfigSyncState
1666 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1667 }
1668
1669 // ConfigManagementConfigSyncVersion: Specific versioning information
1670 // pertaining to ConfigSync's Pods
1671 type ConfigManagementConfigSyncVersion struct {
1672 // AdmissionWebhook: Version of the deployed admission-webhook pod
1673 AdmissionWebhook string `json:"admissionWebhook,omitempty"`
1674 // GitSync: Version of the deployed git-sync pod
1675 GitSync string `json:"gitSync,omitempty"`
1676 // Importer: Version of the deployed importer pod
1677 Importer string `json:"importer,omitempty"`
1678 // Monitor: Version of the deployed monitor pod
1679 Monitor string `json:"monitor,omitempty"`
1680 // OtelCollector: Version of the deployed otel-collector pod
1681 OtelCollector string `json:"otelCollector,omitempty"`
1682 // ReconcilerManager: Version of the deployed reconciler-manager pod
1683 ReconcilerManager string `json:"reconcilerManager,omitempty"`
1684 // ResourceGroupControllerManager: Version of the deployed
1685 // resource-group-controller-manager pod
1686 ResourceGroupControllerManager string `json:"resourceGroupControllerManager,omitempty"`
1687 // RootReconciler: Version of the deployed reconciler container in
1688 // root-reconciler pod
1689 RootReconciler string `json:"rootReconciler,omitempty"`
1690 // Syncer: Version of the deployed syncer pod
1691 Syncer string `json:"syncer,omitempty"`
1692 // ForceSendFields is a list of field names (e.g. "AdmissionWebhook") to
1693 // unconditionally include in API requests. By default, fields with empty or
1694 // default values are omitted from API requests. See
1695 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1696 // details.
1697 ForceSendFields []string `json:"-"`
1698 // NullFields is a list of field names (e.g. "AdmissionWebhook") to include in
1699 // API requests with the JSON null value. By default, fields with empty values
1700 // are omitted from API requests. See
1701 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1702 NullFields []string `json:"-"`
1703 }
1704
1705 func (s ConfigManagementConfigSyncVersion) MarshalJSON() ([]byte, error) {
1706 type NoMethod ConfigManagementConfigSyncVersion
1707 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1708 }
1709
1710 // ConfigManagementContainerOverride: Configuration for a container override.
1711 type ConfigManagementContainerOverride struct {
1712 // ContainerName: Required. The name of the container.
1713 ContainerName string `json:"containerName,omitempty"`
1714 // CpuLimit: Optional. The cpu limit of the container. Use the following CPU
1715 // resource units:
1716 // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.
1717 CpuLimit string `json:"cpuLimit,omitempty"`
1718 // CpuRequest: Optional. The cpu request of the container. Use the following
1719 // CPU resource units:
1720 // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.
1721 CpuRequest string `json:"cpuRequest,omitempty"`
1722 // MemoryLimit: Optional. The memory limit of the container. Use the following
1723 // memory resource units:
1724 // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory.
1725 MemoryLimit string `json:"memoryLimit,omitempty"`
1726 // MemoryRequest: Optional. The memory request of the container. Use the
1727 // following memory resource units:
1728 // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory.
1729 MemoryRequest string `json:"memoryRequest,omitempty"`
1730 // ForceSendFields is a list of field names (e.g. "ContainerName") to
1731 // unconditionally include in API requests. By default, fields with empty or
1732 // default values are omitted from API requests. See
1733 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1734 // details.
1735 ForceSendFields []string `json:"-"`
1736 // NullFields is a list of field names (e.g. "ContainerName") to include in API
1737 // requests with the JSON null value. By default, fields with empty values are
1738 // omitted from API requests. See
1739 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1740 NullFields []string `json:"-"`
1741 }
1742
1743 func (s ConfigManagementContainerOverride) MarshalJSON() ([]byte, error) {
1744 type NoMethod ConfigManagementContainerOverride
1745 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1746 }
1747
1748 // ConfigManagementDeploymentOverride: Configuration for a deployment override.
1749 type ConfigManagementDeploymentOverride struct {
1750 // Containers: Optional. The containers of the deployment resource to be
1751 // overridden.
1752 Containers []*ConfigManagementContainerOverride `json:"containers,omitempty"`
1753 // DeploymentName: Required. The name of the deployment resource to be
1754 // overridden.
1755 DeploymentName string `json:"deploymentName,omitempty"`
1756 // DeploymentNamespace: Required. The namespace of the deployment resource to
1757 // be overridden.
1758 DeploymentNamespace string `json:"deploymentNamespace,omitempty"`
1759 // ForceSendFields is a list of field names (e.g. "Containers") to
1760 // unconditionally include in API requests. By default, fields with empty or
1761 // default values are omitted from API requests. See
1762 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1763 // details.
1764 ForceSendFields []string `json:"-"`
1765 // NullFields is a list of field names (e.g. "Containers") to include in API
1766 // requests with the JSON null value. By default, fields with empty values are
1767 // omitted from API requests. See
1768 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1769 NullFields []string `json:"-"`
1770 }
1771
1772 func (s ConfigManagementDeploymentOverride) MarshalJSON() ([]byte, error) {
1773 type NoMethod ConfigManagementDeploymentOverride
1774 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1775 }
1776
1777 // ConfigManagementErrorResource: Model for a config file in the git repo with
1778 // an associated Sync error
1779 type ConfigManagementErrorResource struct {
1780 // ResourceGvk: Group/version/kind of the resource that is causing an error
1781 ResourceGvk *ConfigManagementGroupVersionKind `json:"resourceGvk,omitempty"`
1782 // ResourceName: Metadata name of the resource that is causing an error
1783 ResourceName string `json:"resourceName,omitempty"`
1784 // ResourceNamespace: Namespace of the resource that is causing an error
1785 ResourceNamespace string `json:"resourceNamespace,omitempty"`
1786 // SourcePath: Path in the git repo of the erroneous config
1787 SourcePath string `json:"sourcePath,omitempty"`
1788 // ForceSendFields is a list of field names (e.g. "ResourceGvk") to
1789 // unconditionally include in API requests. By default, fields with empty or
1790 // default values are omitted from API requests. See
1791 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1792 // details.
1793 ForceSendFields []string `json:"-"`
1794 // NullFields is a list of field names (e.g. "ResourceGvk") to include in API
1795 // requests with the JSON null value. By default, fields with empty values are
1796 // omitted from API requests. See
1797 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1798 NullFields []string `json:"-"`
1799 }
1800
1801 func (s ConfigManagementErrorResource) MarshalJSON() ([]byte, error) {
1802 type NoMethod ConfigManagementErrorResource
1803 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1804 }
1805
1806 // ConfigManagementGatekeeperDeploymentState: State of Policy Controller
1807 // installation.
1808 type ConfigManagementGatekeeperDeploymentState struct {
1809 // GatekeeperAudit: Status of gatekeeper-audit deployment.
1810 //
1811 // Possible values:
1812 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1813 // "NOT_INSTALLED" - Deployment is not installed
1814 // "INSTALLED" - Deployment is installed
1815 // "ERROR" - Deployment was attempted to be installed, but has errors
1816 // "PENDING" - Deployment is installing or terminating
1817 GatekeeperAudit string `json:"gatekeeperAudit,omitempty"`
1818 // GatekeeperControllerManagerState: Status of gatekeeper-controller-manager
1819 // pod.
1820 //
1821 // Possible values:
1822 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1823 // "NOT_INSTALLED" - Deployment is not installed
1824 // "INSTALLED" - Deployment is installed
1825 // "ERROR" - Deployment was attempted to be installed, but has errors
1826 // "PENDING" - Deployment is installing or terminating
1827 GatekeeperControllerManagerState string `json:"gatekeeperControllerManagerState,omitempty"`
1828 // GatekeeperMutation: Status of the pod serving the mutation webhook.
1829 //
1830 // Possible values:
1831 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1832 // "NOT_INSTALLED" - Deployment is not installed
1833 // "INSTALLED" - Deployment is installed
1834 // "ERROR" - Deployment was attempted to be installed, but has errors
1835 // "PENDING" - Deployment is installing or terminating
1836 GatekeeperMutation string `json:"gatekeeperMutation,omitempty"`
1837 // ForceSendFields is a list of field names (e.g. "GatekeeperAudit") to
1838 // unconditionally include in API requests. By default, fields with empty or
1839 // default values are omitted from API requests. See
1840 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1841 // details.
1842 ForceSendFields []string `json:"-"`
1843 // NullFields is a list of field names (e.g. "GatekeeperAudit") to include in
1844 // API requests with the JSON null value. By default, fields with empty values
1845 // are omitted from API requests. See
1846 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1847 NullFields []string `json:"-"`
1848 }
1849
1850 func (s ConfigManagementGatekeeperDeploymentState) MarshalJSON() ([]byte, error) {
1851 type NoMethod ConfigManagementGatekeeperDeploymentState
1852 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1853 }
1854
1855 // ConfigManagementGitConfig: Git repo configuration for a single cluster.
1856 type ConfigManagementGitConfig struct {
1857 // GcpServiceAccountEmail: Optional. The Google Cloud Service Account Email
1858 // used for auth when secret_type is `gcpserviceaccount`.
1859 GcpServiceAccountEmail string `json:"gcpServiceAccountEmail,omitempty"`
1860 // HttpsProxy: Optional. URL for the HTTPS proxy to be used when communicating
1861 // with the Git repo. Only specify when secret_type is `cookiefile`, `token`,
1862 // or `none`.
1863 HttpsProxy string `json:"httpsProxy,omitempty"`
1864 // PolicyDir: Optional. The path within the Git repository that represents the
1865 // top level of the repo to sync. Default: the root directory of the
1866 // repository.
1867 PolicyDir string `json:"policyDir,omitempty"`
1868 // SecretType: Required. Type of secret configured for access to the Git repo.
1869 // Must be one of `ssh`, `cookiefile`, `gcenode`, `token`, `gcpserviceaccount`,
1870 // `githubapp` or `none`. The validation of this is case-sensitive.
1871 SecretType string `json:"secretType,omitempty"`
1872 // SyncBranch: Optional. The branch of the repository to sync from. Default:
1873 // master.
1874 SyncBranch string `json:"syncBranch,omitempty"`
1875 // SyncRepo: Required. The URL of the Git repository to use as the source of
1876 // truth.
1877 SyncRepo string `json:"syncRepo,omitempty"`
1878 // SyncRev: Optional. Git revision (tag or hash) to check out. Default HEAD.
1879 SyncRev string `json:"syncRev,omitempty"`
1880 // SyncWaitSecs: Optional. Period in seconds between consecutive syncs.
1881 // Default: 15.
1882 SyncWaitSecs int64 `json:"syncWaitSecs,omitempty,string"`
1883 // ForceSendFields is a list of field names (e.g. "GcpServiceAccountEmail") to
1884 // unconditionally include in API requests. By default, fields with empty or
1885 // default values are omitted from API requests. See
1886 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1887 // details.
1888 ForceSendFields []string `json:"-"`
1889 // NullFields is a list of field names (e.g. "GcpServiceAccountEmail") to
1890 // include in API requests with the JSON null value. By default, fields with
1891 // empty values are omitted from API requests. See
1892 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1893 NullFields []string `json:"-"`
1894 }
1895
1896 func (s ConfigManagementGitConfig) MarshalJSON() ([]byte, error) {
1897 type NoMethod ConfigManagementGitConfig
1898 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1899 }
1900
1901 // ConfigManagementGroupVersionKind: A Kubernetes object's GVK
1902 type ConfigManagementGroupVersionKind struct {
1903 // Group: Kubernetes Group
1904 Group string `json:"group,omitempty"`
1905 // Kind: Kubernetes Kind
1906 Kind string `json:"kind,omitempty"`
1907 // Version: Kubernetes Version
1908 Version string `json:"version,omitempty"`
1909 // ForceSendFields is a list of field names (e.g. "Group") to unconditionally
1910 // include in API requests. By default, fields with empty or default values are
1911 // omitted from API requests. See
1912 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1913 // details.
1914 ForceSendFields []string `json:"-"`
1915 // NullFields is a list of field names (e.g. "Group") to include in API
1916 // requests with the JSON null value. By default, fields with empty values are
1917 // omitted from API requests. See
1918 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1919 NullFields []string `json:"-"`
1920 }
1921
1922 func (s ConfigManagementGroupVersionKind) MarshalJSON() ([]byte, error) {
1923 type NoMethod ConfigManagementGroupVersionKind
1924 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1925 }
1926
1927 // ConfigManagementHierarchyControllerConfig: Configuration for Hierarchy
1928 // Controller
1929 type ConfigManagementHierarchyControllerConfig struct {
1930 // EnableHierarchicalResourceQuota: Whether hierarchical resource quota is
1931 // enabled in this cluster.
1932 EnableHierarchicalResourceQuota bool `json:"enableHierarchicalResourceQuota,omitempty"`
1933 // EnablePodTreeLabels: Whether pod tree labels are enabled in this cluster.
1934 EnablePodTreeLabels bool `json:"enablePodTreeLabels,omitempty"`
1935 // Enabled: Whether Hierarchy Controller is enabled in this cluster.
1936 Enabled bool `json:"enabled,omitempty"`
1937 // ForceSendFields is a list of field names (e.g.
1938 // "EnableHierarchicalResourceQuota") to unconditionally include in API
1939 // requests. By default, fields with empty or default values are omitted from
1940 // API requests. See
1941 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1942 // details.
1943 ForceSendFields []string `json:"-"`
1944 // NullFields is a list of field names (e.g. "EnableHierarchicalResourceQuota")
1945 // to include in API requests with the JSON null value. By default, fields with
1946 // empty values are omitted from API requests. See
1947 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1948 NullFields []string `json:"-"`
1949 }
1950
1951 func (s ConfigManagementHierarchyControllerConfig) MarshalJSON() ([]byte, error) {
1952 type NoMethod ConfigManagementHierarchyControllerConfig
1953 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1954 }
1955
1956 // ConfigManagementHierarchyControllerDeploymentState: Deployment state for
1957 // Hierarchy Controller
1958 type ConfigManagementHierarchyControllerDeploymentState struct {
1959 // Extension: The deployment state for Hierarchy Controller extension (e.g.
1960 // v0.7.0-hc.1)
1961 //
1962 // Possible values:
1963 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1964 // "NOT_INSTALLED" - Deployment is not installed
1965 // "INSTALLED" - Deployment is installed
1966 // "ERROR" - Deployment was attempted to be installed, but has errors
1967 // "PENDING" - Deployment is installing or terminating
1968 Extension string `json:"extension,omitempty"`
1969 // Hnc: The deployment state for open source HNC (e.g. v0.7.0-hc.0)
1970 //
1971 // Possible values:
1972 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1973 // "NOT_INSTALLED" - Deployment is not installed
1974 // "INSTALLED" - Deployment is installed
1975 // "ERROR" - Deployment was attempted to be installed, but has errors
1976 // "PENDING" - Deployment is installing or terminating
1977 Hnc string `json:"hnc,omitempty"`
1978 // ForceSendFields is a list of field names (e.g. "Extension") to
1979 // unconditionally include in API requests. By default, fields with empty or
1980 // default values are omitted from API requests. See
1981 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1982 // details.
1983 ForceSendFields []string `json:"-"`
1984 // NullFields is a list of field names (e.g. "Extension") to include in API
1985 // requests with the JSON null value. By default, fields with empty values are
1986 // omitted from API requests. See
1987 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1988 NullFields []string `json:"-"`
1989 }
1990
1991 func (s ConfigManagementHierarchyControllerDeploymentState) MarshalJSON() ([]byte, error) {
1992 type NoMethod ConfigManagementHierarchyControllerDeploymentState
1993 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1994 }
1995
1996 // ConfigManagementHierarchyControllerState: State for Hierarchy Controller
1997 type ConfigManagementHierarchyControllerState struct {
1998 // State: The deployment state for Hierarchy Controller
1999 State *ConfigManagementHierarchyControllerDeploymentState `json:"state,omitempty"`
2000 // Version: The version for Hierarchy Controller
2001 Version *ConfigManagementHierarchyControllerVersion `json:"version,omitempty"`
2002 // ForceSendFields is a list of field names (e.g. "State") to unconditionally
2003 // include in API requests. By default, fields with empty or default values are
2004 // omitted from API requests. See
2005 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2006 // details.
2007 ForceSendFields []string `json:"-"`
2008 // NullFields is a list of field names (e.g. "State") to include in API
2009 // requests with the JSON null value. By default, fields with empty values are
2010 // omitted from API requests. See
2011 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2012 NullFields []string `json:"-"`
2013 }
2014
2015 func (s ConfigManagementHierarchyControllerState) MarshalJSON() ([]byte, error) {
2016 type NoMethod ConfigManagementHierarchyControllerState
2017 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2018 }
2019
2020 // ConfigManagementHierarchyControllerVersion: Version for Hierarchy Controller
2021 type ConfigManagementHierarchyControllerVersion struct {
2022 // Extension: Version for Hierarchy Controller extension
2023 Extension string `json:"extension,omitempty"`
2024 // Hnc: Version for open source HNC
2025 Hnc string `json:"hnc,omitempty"`
2026 // ForceSendFields is a list of field names (e.g. "Extension") to
2027 // unconditionally include in API requests. By default, fields with empty or
2028 // default values are omitted from API requests. See
2029 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2030 // details.
2031 ForceSendFields []string `json:"-"`
2032 // NullFields is a list of field names (e.g. "Extension") to include in API
2033 // requests with the JSON null value. By default, fields with empty values are
2034 // omitted from API requests. See
2035 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2036 NullFields []string `json:"-"`
2037 }
2038
2039 func (s ConfigManagementHierarchyControllerVersion) MarshalJSON() ([]byte, error) {
2040 type NoMethod ConfigManagementHierarchyControllerVersion
2041 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2042 }
2043
2044 // ConfigManagementInstallError: Errors pertaining to the installation of ACM
2045 type ConfigManagementInstallError struct {
2046 // ErrorMessage: A string representing the user facing error message
2047 ErrorMessage string `json:"errorMessage,omitempty"`
2048 // ForceSendFields is a list of field names (e.g. "ErrorMessage") to
2049 // unconditionally include in API requests. By default, fields with empty or
2050 // default values are omitted from API requests. See
2051 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2052 // details.
2053 ForceSendFields []string `json:"-"`
2054 // NullFields is a list of field names (e.g. "ErrorMessage") to include in API
2055 // requests with the JSON null value. By default, fields with empty values are
2056 // omitted from API requests. See
2057 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2058 NullFields []string `json:"-"`
2059 }
2060
2061 func (s ConfigManagementInstallError) MarshalJSON() ([]byte, error) {
2062 type NoMethod ConfigManagementInstallError
2063 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2064 }
2065
2066 // ConfigManagementMembershipSpec: **Anthos Config Management**: Configuration
2067 // for a single cluster. Intended to parallel the ConfigManagement CR.
2068 type ConfigManagementMembershipSpec struct {
2069 // Binauthz: Optional. Deprecated: Binauthz configuration will be ignored and
2070 // should not be set.
2071 Binauthz *ConfigManagementBinauthzConfig `json:"binauthz,omitempty"`
2072 // Cluster: Optional. User-specified cluster name used by the Config Sync
2073 // cluster-name-selector annotation or ClusterSelector object, for applying
2074 // configs to only a subset of clusters. Read more about the
2075 // cluster-name-selector annotation and ClusterSelector object at
2076 // https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/how-to/cluster-scoped-objects#limiting-configs.
2077 // Only set this field if a name different from the cluster's fleet membership
2078 // name is used by the Config Sync cluster-name-selector annotation or
2079 // ClusterSelector.
2080 Cluster string `json:"cluster,omitempty"`
2081 // ConfigSync: Optional. Config Sync configuration for the cluster.
2082 ConfigSync *ConfigManagementConfigSync `json:"configSync,omitempty"`
2083 // HierarchyController: Optional. Hierarchy Controller configuration for the
2084 // cluster. Deprecated: Configuring Hierarchy Controller through the
2085 // configmanagement feature is no longer recommended. Use
2086 // https://github.com/kubernetes-sigs/hierarchical-namespaces instead.
2087 HierarchyController *ConfigManagementHierarchyControllerConfig `json:"hierarchyController,omitempty"`
2088 // Management: Optional. Deprecated: From version 1.21.0, automatic Feature
2089 // management is unavailable, and Config Sync only supports manual upgrades.
2090 //
2091 // Possible values:
2092 // "MANAGEMENT_UNSPECIFIED" - Unspecified
2093 // "MANAGEMENT_AUTOMATIC" - Google will manage the Feature for the cluster.
2094 // "MANAGEMENT_MANUAL" - User will manually manage the Feature for the
2095 // cluster.
2096 Management string `json:"management,omitempty"`
2097 // PolicyController: Optional. Policy Controller configuration for the cluster.
2098 // Deprecated: Configuring Policy Controller through the configmanagement
2099 // feature is no longer recommended. Use the policycontroller feature instead.
2100 PolicyController *ConfigManagementPolicyController `json:"policyController,omitempty"`
2101 // Version: Optional. Version of Config Sync to install. Defaults to the latest
2102 // supported Config Sync version if the config_sync field is enabled. See
2103 // supported versions at
2104 // https://cloud.google.com/kubernetes-engine/config-sync/docs/get-support-config-sync#version_support_policy.
2105 Version string `json:"version,omitempty"`
2106 // ForceSendFields is a list of field names (e.g. "Binauthz") to
2107 // unconditionally include in API requests. By default, fields with empty or
2108 // default values are omitted from API requests. See
2109 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2110 // details.
2111 ForceSendFields []string `json:"-"`
2112 // NullFields is a list of field names (e.g. "Binauthz") to include in API
2113 // requests with the JSON null value. By default, fields with empty values are
2114 // omitted from API requests. See
2115 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2116 NullFields []string `json:"-"`
2117 }
2118
2119 func (s ConfigManagementMembershipSpec) MarshalJSON() ([]byte, error) {
2120 type NoMethod ConfigManagementMembershipSpec
2121 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2122 }
2123
2124 // ConfigManagementMembershipState: **Anthos Config Management**: State for a
2125 // single cluster.
2126 type ConfigManagementMembershipState struct {
2127 // BinauthzState: Output only. Binauthz status
2128 BinauthzState *ConfigManagementBinauthzState `json:"binauthzState,omitempty"`
2129 // ClusterName: Output only. This field is set to the `cluster_name` field of
2130 // the Membership Spec if it is not empty. Otherwise, it is set to the
2131 // cluster's fleet membership name.
2132 ClusterName string `json:"clusterName,omitempty"`
2133 // ConfigSyncState: Output only. Current sync status
2134 ConfigSyncState *ConfigManagementConfigSyncState `json:"configSyncState,omitempty"`
2135 // HierarchyControllerState: Output only. Hierarchy Controller status
2136 HierarchyControllerState *ConfigManagementHierarchyControllerState `json:"hierarchyControllerState,omitempty"`
2137 // KubernetesApiServerVersion: Output only. The Kubernetes API server version
2138 // of the cluster.
2139 KubernetesApiServerVersion string `json:"kubernetesApiServerVersion,omitempty"`
2140 // MembershipSpec: Output only. Membership configuration in the cluster. This
2141 // represents the actual state in the cluster, while the MembershipSpec in the
2142 // FeatureSpec represents the intended state
2143 MembershipSpec *ConfigManagementMembershipSpec `json:"membershipSpec,omitempty"`
2144 // OperatorState: Output only. Current install status of ACM's Operator
2145 OperatorState *ConfigManagementOperatorState `json:"operatorState,omitempty"`
2146 // PolicyControllerState: Output only. PolicyController status
2147 PolicyControllerState *ConfigManagementPolicyControllerState `json:"policyControllerState,omitempty"`
2148 // ForceSendFields is a list of field names (e.g. "BinauthzState") to
2149 // unconditionally include in API requests. By default, fields with empty or
2150 // default values are omitted from API requests. See
2151 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2152 // details.
2153 ForceSendFields []string `json:"-"`
2154 // NullFields is a list of field names (e.g. "BinauthzState") to include in API
2155 // requests with the JSON null value. By default, fields with empty values are
2156 // omitted from API requests. See
2157 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2158 NullFields []string `json:"-"`
2159 }
2160
2161 func (s ConfigManagementMembershipState) MarshalJSON() ([]byte, error) {
2162 type NoMethod ConfigManagementMembershipState
2163 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2164 }
2165
2166 // ConfigManagementOciConfig: OCI repo configuration for a single cluster
2167 type ConfigManagementOciConfig struct {
2168 // GcpServiceAccountEmail: Optional. The Google Cloud Service Account Email
2169 // used for auth when secret_type is `gcpserviceaccount`.
2170 GcpServiceAccountEmail string `json:"gcpServiceAccountEmail,omitempty"`
2171 // PolicyDir: Optional. The absolute path of the directory that contains the
2172 // local resources. Default: the root directory of the image.
2173 PolicyDir string `json:"policyDir,omitempty"`
2174 // SecretType: Required. Type of secret configured for access to the OCI repo.
2175 // Must be one of `gcenode`, `gcpserviceaccount`, `k8sserviceaccount` or
2176 // `none`. The validation of this is case-sensitive.
2177 SecretType string `json:"secretType,omitempty"`
2178 // SyncRepo: Required. The OCI image repository URL for the package to sync
2179 // from. e.g.
2180 // `LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME`.
2181 SyncRepo string `json:"syncRepo,omitempty"`
2182 // SyncWaitSecs: Optional. Period in seconds between consecutive syncs.
2183 // Default: 15.
2184 SyncWaitSecs int64 `json:"syncWaitSecs,omitempty,string"`
2185 // ForceSendFields is a list of field names (e.g. "GcpServiceAccountEmail") to
2186 // unconditionally include in API requests. By default, fields with empty or
2187 // default values are omitted from API requests. See
2188 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2189 // details.
2190 ForceSendFields []string `json:"-"`
2191 // NullFields is a list of field names (e.g. "GcpServiceAccountEmail") to
2192 // include in API requests with the JSON null value. By default, fields with
2193 // empty values are omitted from API requests. See
2194 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2195 NullFields []string `json:"-"`
2196 }
2197
2198 func (s ConfigManagementOciConfig) MarshalJSON() ([]byte, error) {
2199 type NoMethod ConfigManagementOciConfig
2200 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2201 }
2202
2203 // ConfigManagementOperatorState: State information for an ACM's Operator
2204 type ConfigManagementOperatorState struct {
2205 // DeploymentState: The state of the Operator's deployment
2206 //
2207 // Possible values:
2208 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
2209 // "NOT_INSTALLED" - Deployment is not installed
2210 // "INSTALLED" - Deployment is installed
2211 // "ERROR" - Deployment was attempted to be installed, but has errors
2212 // "PENDING" - Deployment is installing or terminating
2213 DeploymentState string `json:"deploymentState,omitempty"`
2214 // Errors: Install errors.
2215 Errors []*ConfigManagementInstallError `json:"errors,omitempty"`
2216 // Version: The semenatic version number of the operator
2217 Version string `json:"version,omitempty"`
2218 // ForceSendFields is a list of field names (e.g. "DeploymentState") to
2219 // unconditionally include in API requests. By default, fields with empty or
2220 // default values are omitted from API requests. See
2221 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2222 // details.
2223 ForceSendFields []string `json:"-"`
2224 // NullFields is a list of field names (e.g. "DeploymentState") to include in
2225 // API requests with the JSON null value. By default, fields with empty values
2226 // are omitted from API requests. See
2227 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2228 NullFields []string `json:"-"`
2229 }
2230
2231 func (s ConfigManagementOperatorState) MarshalJSON() ([]byte, error) {
2232 type NoMethod ConfigManagementOperatorState
2233 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2234 }
2235
2236 // ConfigManagementPolicyController: Configuration for Policy Controller
2237 type ConfigManagementPolicyController struct {
2238 // AuditIntervalSeconds: Sets the interval for Policy Controller Audit Scans
2239 // (in seconds). When set to 0, this disables audit functionality altogether.
2240 AuditIntervalSeconds int64 `json:"auditIntervalSeconds,omitempty,string"`
2241 // Enabled: Enables the installation of Policy Controller. If false, the rest
2242 // of PolicyController fields take no effect.
2243 Enabled bool `json:"enabled,omitempty"`
2244 // ExemptableNamespaces: The set of namespaces that are excluded from Policy
2245 // Controller checks. Namespaces do not need to currently exist on the cluster.
2246 ExemptableNamespaces []string `json:"exemptableNamespaces,omitempty"`
2247 // LogDeniesEnabled: Logs all denies and dry run failures.
2248 LogDeniesEnabled bool `json:"logDeniesEnabled,omitempty"`
2249 // Monitoring: Monitoring specifies the configuration of monitoring.
2250 Monitoring *ConfigManagementPolicyControllerMonitoring `json:"monitoring,omitempty"`
2251 // MutationEnabled: Enable or disable mutation in policy controller. If true,
2252 // mutation CRDs, webhook and controller deployment will be deployed to the
2253 // cluster.
2254 MutationEnabled bool `json:"mutationEnabled,omitempty"`
2255 // ReferentialRulesEnabled: Enables the ability to use Constraint Templates
2256 // that reference to objects other than the object currently being evaluated.
2257 ReferentialRulesEnabled bool `json:"referentialRulesEnabled,omitempty"`
2258 // TemplateLibraryInstalled: Installs the default template library along with
2259 // Policy Controller.
2260 TemplateLibraryInstalled bool `json:"templateLibraryInstalled,omitempty"`
2261 // UpdateTime: Output only. Last time this membership spec was updated.
2262 UpdateTime string `json:"updateTime,omitempty"`
2263 // ForceSendFields is a list of field names (e.g. "AuditIntervalSeconds") to
2264 // unconditionally include in API requests. By default, fields with empty or
2265 // default values are omitted from API requests. See
2266 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2267 // details.
2268 ForceSendFields []string `json:"-"`
2269 // NullFields is a list of field names (e.g. "AuditIntervalSeconds") to include
2270 // in API requests with the JSON null value. By default, fields with empty
2271 // values are omitted from API requests. See
2272 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2273 NullFields []string `json:"-"`
2274 }
2275
2276 func (s ConfigManagementPolicyController) MarshalJSON() ([]byte, error) {
2277 type NoMethod ConfigManagementPolicyController
2278 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2279 }
2280
2281 // ConfigManagementPolicyControllerMigration: State for the migration of
2282 // PolicyController from ACM -> PoCo Hub.
2283 type ConfigManagementPolicyControllerMigration struct {
2284 // CopyTime: Last time this membership spec was copied to PoCo feature.
2285 CopyTime string `json:"copyTime,omitempty"`
2286 // Stage: Stage of the migration.
2287 //
2288 // Possible values:
2289 // "STAGE_UNSPECIFIED" - Unknown state of migration.
2290 // "ACM_MANAGED" - ACM Hub/Operator manages policycontroller. No migration
2291 // yet completed.
2292 // "POCO_MANAGED" - All migrations steps complete; Poco Hub now manages
2293 // policycontroller.
2294 Stage string `json:"stage,omitempty"`
2295 // ForceSendFields is a list of field names (e.g. "CopyTime") to
2296 // unconditionally include in API requests. By default, fields with empty or
2297 // default values are omitted from API requests. See
2298 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2299 // details.
2300 ForceSendFields []string `json:"-"`
2301 // NullFields is a list of field names (e.g. "CopyTime") to include in API
2302 // requests with the JSON null value. By default, fields with empty values are
2303 // omitted from API requests. See
2304 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2305 NullFields []string `json:"-"`
2306 }
2307
2308 func (s ConfigManagementPolicyControllerMigration) MarshalJSON() ([]byte, error) {
2309 type NoMethod ConfigManagementPolicyControllerMigration
2310 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2311 }
2312
2313 // ConfigManagementPolicyControllerMonitoring: PolicyControllerMonitoring
2314 // specifies the backends Policy Controller should export metrics to. For
2315 // example, to specify metrics should be exported to Cloud Monitoring and
2316 // Prometheus, specify backends: ["cloudmonitoring", "prometheus"]
2317 type ConfigManagementPolicyControllerMonitoring struct {
2318 // Backends: Specifies the list of backends Policy Controller will export to.
2319 // An empty list would effectively disable metrics export.
2320 //
2321 // Possible values:
2322 // "MONITORING_BACKEND_UNSPECIFIED" - Backend cannot be determined
2323 // "PROMETHEUS" - Prometheus backend for monitoring
2324 // "CLOUD_MONITORING" - Stackdriver/Cloud Monitoring backend for monitoring
2325 Backends []string `json:"backends,omitempty"`
2326 // ForceSendFields is a list of field names (e.g. "Backends") to
2327 // unconditionally include in API requests. By default, fields with empty or
2328 // default values are omitted from API requests. See
2329 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2330 // details.
2331 ForceSendFields []string `json:"-"`
2332 // NullFields is a list of field names (e.g. "Backends") to include in API
2333 // requests with the JSON null value. By default, fields with empty values are
2334 // omitted from API requests. See
2335 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2336 NullFields []string `json:"-"`
2337 }
2338
2339 func (s ConfigManagementPolicyControllerMonitoring) MarshalJSON() ([]byte, error) {
2340 type NoMethod ConfigManagementPolicyControllerMonitoring
2341 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2342 }
2343
2344 // ConfigManagementPolicyControllerState: State for PolicyControllerState.
2345 type ConfigManagementPolicyControllerState struct {
2346 // DeploymentState: The state about the policy controller installation.
2347 DeploymentState *ConfigManagementGatekeeperDeploymentState `json:"deploymentState,omitempty"`
2348 // Migration: Record state of ACM -> PoCo Hub migration for this feature.
2349 Migration *ConfigManagementPolicyControllerMigration `json:"migration,omitempty"`
2350 // Version: The version of Gatekeeper Policy Controller deployed.
2351 Version *ConfigManagementPolicyControllerVersion `json:"version,omitempty"`
2352 // ForceSendFields is a list of field names (e.g. "DeploymentState") to
2353 // unconditionally include in API requests. By default, fields with empty or
2354 // default values are omitted from API requests. See
2355 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2356 // details.
2357 ForceSendFields []string `json:"-"`
2358 // NullFields is a list of field names (e.g. "DeploymentState") to include in
2359 // API requests with the JSON null value. By default, fields with empty values
2360 // are omitted from API requests. See
2361 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2362 NullFields []string `json:"-"`
2363 }
2364
2365 func (s ConfigManagementPolicyControllerState) MarshalJSON() ([]byte, error) {
2366 type NoMethod ConfigManagementPolicyControllerState
2367 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2368 }
2369
2370 // ConfigManagementPolicyControllerVersion: The build version of Gatekeeper
2371 // Policy Controller is using.
2372 type ConfigManagementPolicyControllerVersion struct {
2373 // Version: The gatekeeper image tag that is composed of ACM version, git tag,
2374 // build number.
2375 Version string `json:"version,omitempty"`
2376 // ForceSendFields is a list of field names (e.g. "Version") to unconditionally
2377 // include in API requests. By default, fields with empty or default values are
2378 // omitted from API requests. See
2379 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2380 // details.
2381 ForceSendFields []string `json:"-"`
2382 // NullFields is a list of field names (e.g. "Version") to include in API
2383 // requests with the JSON null value. By default, fields with empty values are
2384 // omitted from API requests. See
2385 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2386 NullFields []string `json:"-"`
2387 }
2388
2389 func (s ConfigManagementPolicyControllerVersion) MarshalJSON() ([]byte, error) {
2390 type NoMethod ConfigManagementPolicyControllerVersion
2391 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2392 }
2393
2394 // ConfigManagementSyncError: An ACM created error representing a problem
2395 // syncing configurations
2396 type ConfigManagementSyncError struct {
2397 // Code: An ACM defined error code
2398 Code string `json:"code,omitempty"`
2399 // ErrorMessage: A description of the error
2400 ErrorMessage string `json:"errorMessage,omitempty"`
2401 // ErrorResources: A list of config(s) associated with the error, if any
2402 ErrorResources []*ConfigManagementErrorResource `json:"errorResources,omitempty"`
2403 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2404 // include in API requests. By default, fields with empty or default values are
2405 // omitted from API requests. See
2406 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2407 // details.
2408 ForceSendFields []string `json:"-"`
2409 // NullFields is a list of field names (e.g. "Code") to include in API requests
2410 // with the JSON null value. By default, fields with empty values are omitted
2411 // from API requests. See
2412 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2413 NullFields []string `json:"-"`
2414 }
2415
2416 func (s ConfigManagementSyncError) MarshalJSON() ([]byte, error) {
2417 type NoMethod ConfigManagementSyncError
2418 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2419 }
2420
2421 // ConfigManagementSyncState: State indicating an ACM's progress syncing
2422 // configurations to a cluster
2423 type ConfigManagementSyncState struct {
2424 // Code: Sync status code
2425 //
2426 // Possible values:
2427 // "SYNC_CODE_UNSPECIFIED" - Config Sync cannot determine a sync code
2428 // "SYNCED" - Config Sync successfully synced the git Repo with the cluster
2429 // "PENDING" - Config Sync is in the progress of syncing a new change
2430 // "ERROR" - Indicates an error configuring Config Sync, and user action is
2431 // required
2432 // "NOT_CONFIGURED" - Config Sync has been installed but not configured
2433 // "NOT_INSTALLED" - Config Sync has not been installed
2434 // "UNAUTHORIZED" - Error authorizing with the cluster
2435 // "UNREACHABLE" - Cluster could not be reached
2436 Code string `json:"code,omitempty"`
2437 // Errors: A list of errors resulting from problematic configs. This list will
2438 // be truncated after 100 errors, although it is unlikely for that many errors
2439 // to simultaneously exist.
2440 Errors []*ConfigManagementSyncError `json:"errors,omitempty"`
2441 // ImportToken: Token indicating the state of the importer.
2442 ImportToken string `json:"importToken,omitempty"`
2443 // LastSync: Deprecated: use last_sync_time instead. Timestamp of when ACM last
2444 // successfully synced the repo The time format is specified in
2445 // https://golang.org/pkg/time/#Time.String
2446 LastSync string `json:"lastSync,omitempty"`
2447 // LastSyncTime: Timestamp type of when ACM last successfully synced the repo
2448 LastSyncTime string `json:"lastSyncTime,omitempty"`
2449 // SourceToken: Token indicating the state of the repo.
2450 SourceToken string `json:"sourceToken,omitempty"`
2451 // SyncToken: Token indicating the state of the syncer.
2452 SyncToken string `json:"syncToken,omitempty"`
2453 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2454 // include in API requests. By default, fields with empty or default values are
2455 // omitted from API requests. See
2456 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2457 // details.
2458 ForceSendFields []string `json:"-"`
2459 // NullFields is a list of field names (e.g. "Code") to include in API requests
2460 // with the JSON null value. By default, fields with empty values are omitted
2461 // from API requests. See
2462 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2463 NullFields []string `json:"-"`
2464 }
2465
2466 func (s ConfigManagementSyncState) MarshalJSON() ([]byte, error) {
2467 type NoMethod ConfigManagementSyncState
2468 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2469 }
2470
2471 // ConnectAgentResource: ConnectAgentResource represents a Kubernetes resource
2472 // manifest for Connect Agent deployment.
2473 type ConnectAgentResource struct {
2474 // Manifest: YAML manifest of the resource.
2475 Manifest string `json:"manifest,omitempty"`
2476 // Type: Kubernetes type of the resource.
2477 Type *TypeMeta `json:"type,omitempty"`
2478 // ForceSendFields is a list of field names (e.g. "Manifest") to
2479 // unconditionally include in API requests. By default, fields with empty or
2480 // default values are omitted from API requests. See
2481 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2482 // details.
2483 ForceSendFields []string `json:"-"`
2484 // NullFields is a list of field names (e.g. "Manifest") to include in API
2485 // requests with the JSON null value. By default, fields with empty values are
2486 // omitted from API requests. See
2487 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2488 NullFields []string `json:"-"`
2489 }
2490
2491 func (s ConnectAgentResource) MarshalJSON() ([]byte, error) {
2492 type NoMethod ConnectAgentResource
2493 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2494 }
2495
2496 // DataplaneV2FeatureSpec: **Dataplane V2**: Spec
2497 type DataplaneV2FeatureSpec struct {
2498 // EnableEncryption: Enable dataplane-v2 based encryption for multiple
2499 // clusters.
2500 EnableEncryption bool `json:"enableEncryption,omitempty"`
2501 // ForceSendFields is a list of field names (e.g. "EnableEncryption") to
2502 // unconditionally include in API requests. By default, fields with empty or
2503 // default values are omitted from API requests. See
2504 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2505 // details.
2506 ForceSendFields []string `json:"-"`
2507 // NullFields is a list of field names (e.g. "EnableEncryption") to include in
2508 // API requests with the JSON null value. By default, fields with empty values
2509 // are omitted from API requests. See
2510 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2511 NullFields []string `json:"-"`
2512 }
2513
2514 func (s DataplaneV2FeatureSpec) MarshalJSON() ([]byte, error) {
2515 type NoMethod DataplaneV2FeatureSpec
2516 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2517 }
2518
2519 // DefaultClusterConfig: DefaultClusterConfig describes the default cluster
2520 // configurations to be applied to all clusters born-in-fleet.
2521 type DefaultClusterConfig struct {
2522 // BinaryAuthorizationConfig: Optional. Enable/Disable binary authorization
2523 // features for the cluster.
2524 BinaryAuthorizationConfig *BinaryAuthorizationConfig `json:"binaryAuthorizationConfig,omitempty"`
2525 // CompliancePostureConfig: Optional. Deprecated: Compliance Posture is no
2526 // longer supported. For more details, see
2527 // https://cloud.google.com/kubernetes-engine/docs/deprecations/posture-management-deprecation.
2528 // Enable/Disable Compliance Posture features for the cluster. Note that on
2529 // UpdateFleet, only full replacement of this field is allowed. Users are not
2530 // allowed for partial updates through field mask.
2531 CompliancePostureConfig *CompliancePostureConfig `json:"compliancePostureConfig,omitempty"`
2532 // SecurityPostureConfig: Optional. Enable/Disable Security Posture features
2533 // for the cluster.
2534 SecurityPostureConfig *SecurityPostureConfig `json:"securityPostureConfig,omitempty"`
2535 // ForceSendFields is a list of field names (e.g. "BinaryAuthorizationConfig")
2536 // to unconditionally include in API requests. By default, fields with empty or
2537 // default values are omitted from API requests. See
2538 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2539 // details.
2540 ForceSendFields []string `json:"-"`
2541 // NullFields is a list of field names (e.g. "BinaryAuthorizationConfig") to
2542 // include in API requests with the JSON null value. By default, fields with
2543 // empty values are omitted from API requests. See
2544 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2545 NullFields []string `json:"-"`
2546 }
2547
2548 func (s DefaultClusterConfig) MarshalJSON() ([]byte, error) {
2549 type NoMethod DefaultClusterConfig
2550 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2551 }
2552
2553 // EdgeCluster: EdgeCluster contains information specific to Google Edge
2554 // Clusters.
2555 type EdgeCluster struct {
2556 // ResourceLink: Immutable. Self-link of the Google Cloud resource for the Edge
2557 // Cluster. For example:
2558 // //edgecontainer.googleapis.com/projects/my-project/locations/us-west1-a/clust
2559 // ers/my-cluster
2560 ResourceLink string `json:"resourceLink,omitempty"`
2561 // ForceSendFields is a list of field names (e.g. "ResourceLink") to
2562 // unconditionally include in API requests. By default, fields with empty or
2563 // default values are omitted from API requests. See
2564 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2565 // details.
2566 ForceSendFields []string `json:"-"`
2567 // NullFields is a list of field names (e.g. "ResourceLink") to include in API
2568 // requests with the JSON null value. By default, fields with empty values are
2569 // omitted from API requests. See
2570 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2571 NullFields []string `json:"-"`
2572 }
2573
2574 func (s EdgeCluster) MarshalJSON() ([]byte, error) {
2575 type NoMethod EdgeCluster
2576 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2577 }
2578
2579 // Empty: A generic empty message that you can re-use to avoid defining
2580 // duplicated empty messages in your APIs. A typical example is to use it as
2581 // the request or the response type of an API method. For instance: service Foo
2582 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
2583 type Empty struct {
2584 // ServerResponse contains the HTTP response code and headers from the server.
2585 googleapi.ServerResponse `json:"-"`
2586 }
2587
2588 // Expr: Represents a textual expression in the Common Expression Language
2589 // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
2590 // of CEL are documented at https://github.com/google/cel-spec. Example
2591 // (Comparison): title: "Summary size limit" description: "Determines if a
2592 // summary is less than 100 chars" expression: "document.summary.size() < 100"
2593 // Example (Equality): title: "Requestor is owner" description: "Determines if
2594 // requestor is the document owner" expression: "document.owner ==
2595 // request.auth.claims.email" Example (Logic): title: "Public documents"
2596 // description: "Determine whether the document should be publicly visible"
2597 // expression: "document.type != 'private' && document.type != 'internal'"
2598 // Example (Data Manipulation): title: "Notification string" description:
2599 // "Create a notification string with a timestamp." expression: "'New message
2600 // received at ' + string(document.create_time)" The exact variables and
2601 // functions that may be referenced within an expression are determined by the
2602 // service that evaluates it. See the service documentation for additional
2603 // information.
2604 type Expr struct {
2605 // Description: Optional. Description of the expression. This is a longer text
2606 // which describes the expression, e.g. when hovered over it in a UI.
2607 Description string `json:"description,omitempty"`
2608 // Expression: Textual representation of an expression in Common Expression
2609 // Language syntax.
2610 Expression string `json:"expression,omitempty"`
2611 // Location: Optional. String indicating the location of the expression for
2612 // error reporting, e.g. a file name and a position in the file.
2613 Location string `json:"location,omitempty"`
2614 // Title: Optional. Title for the expression, i.e. a short string describing
2615 // its purpose. This can be used e.g. in UIs which allow to enter the
2616 // expression.
2617 Title string `json:"title,omitempty"`
2618 // ForceSendFields is a list of field names (e.g. "Description") to
2619 // unconditionally include in API requests. By default, fields with empty or
2620 // default values are omitted from API requests. See
2621 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2622 // details.
2623 ForceSendFields []string `json:"-"`
2624 // NullFields is a list of field names (e.g. "Description") to include in API
2625 // requests with the JSON null value. By default, fields with empty values are
2626 // omitted from API requests. See
2627 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2628 NullFields []string `json:"-"`
2629 }
2630
2631 func (s Expr) MarshalJSON() ([]byte, error) {
2632 type NoMethod Expr
2633 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2634 }
2635
2636 // Feature: Feature represents the settings and status of any Fleet Feature.
2637 type Feature struct {
2638 // CreateTime: Output only. When the Feature resource was created.
2639 CreateTime string `json:"createTime,omitempty"`
2640 // DeleteTime: Output only. When the Feature resource was deleted.
2641 DeleteTime string `json:"deleteTime,omitempty"`
2642 // FleetDefaultMemberConfig: Optional. Feature configuration applicable to all
2643 // memberships of the fleet.
2644 FleetDefaultMemberConfig *CommonFleetDefaultMemberConfigSpec `json:"fleetDefaultMemberConfig,omitempty"`
2645 // Labels: Labels for this Feature.
2646 Labels map[string]string `json:"labels,omitempty"`
2647 // MembershipSpecs: Optional. Membership-specific configuration for this
2648 // Feature. If this Feature does not support any per-Membership configuration,
2649 // this field may be unused. The keys indicate which Membership the
2650 // configuration is for, in the form:
2651 // `projects/{p}/locations/{l}/memberships/{m}` Where {p} is the project, {l}
2652 // is a valid location and {m} is a valid Membership in this project at that
2653 // location. {p} WILL match the Feature's project. {p} will always be returned
2654 // as the project number, but the project ID is also accepted during input. If
2655 // the same Membership is specified in the map twice (using the project ID
2656 // form, and the project number form), exactly ONE of the entries will be
2657 // saved, with no guarantees as to which. For this reason, it is recommended
2658 // the same format be used for all entries when mutating a Feature.
2659 MembershipSpecs map[string]MembershipFeatureSpec `json:"membershipSpecs,omitempty"`
2660 // MembershipStates: Output only. Membership-specific Feature status. If this
2661 // Feature does report any per-Membership status, this field may be unused. The
2662 // keys indicate which Membership the state is for, in the form:
2663 // `projects/{p}/locations/{l}/memberships/{m}` Where {p} is the project
2664 // number, {l} is a valid location and {m} is a valid Membership in this
2665 // project at that location. {p} MUST match the Feature's project number.
2666 MembershipStates map[string]MembershipFeatureState `json:"membershipStates,omitempty"`
2667 // Name: Output only. The full, unique name of this Feature resource in the
2668 // format `projects/*/locations/*/features/*`.
2669 Name string `json:"name,omitempty"`
2670 // ResourceState: Output only. State of the Feature resource itself.
2671 ResourceState *FeatureResourceState `json:"resourceState,omitempty"`
2672 // ScopeSpecs: Optional. Scope-specific configuration for this Feature. If this
2673 // Feature does not support any per-Scope configuration, this field may be
2674 // unused. The keys indicate which Scope the configuration is for, in the form:
2675 // `projects/{p}/locations/global/scopes/{s}` Where {p} is the project, {s} is
2676 // a valid Scope in this project. {p} WILL match the Feature's project. {p}
2677 // will always be returned as the project number, but the project ID is also
2678 // accepted during input. If the same Scope is specified in the map twice
2679 // (using the project ID form, and the project number form), exactly ONE of the
2680 // entries will be saved, with no guarantees as to which. For this reason, it
2681 // is recommended the same format be used for all entries when mutating a
2682 // Feature.
2683 ScopeSpecs map[string]ScopeFeatureSpec `json:"scopeSpecs,omitempty"`
2684 // ScopeStates: Output only. Scope-specific Feature status. If this Feature
2685 // does report any per-Scope status, this field may be unused. The keys
2686 // indicate which Scope the state is for, in the form:
2687 // `projects/{p}/locations/global/scopes/{s}` Where {p} is the project, {s} is
2688 // a valid Scope in this project. {p} WILL match the Feature's project.
2689 ScopeStates map[string]ScopeFeatureState `json:"scopeStates,omitempty"`
2690 // Spec: Optional. Fleet-wide Feature configuration. If this Feature does not
2691 // support any Fleet-wide configuration, this field may be unused.
2692 Spec *CommonFeatureSpec `json:"spec,omitempty"`
2693 // State: Output only. The Fleet-wide Feature state.
2694 State *CommonFeatureState `json:"state,omitempty"`
2695 // Unreachable: Output only. List of locations that could not be reached while
2696 // fetching this feature.
2697 Unreachable []string `json:"unreachable,omitempty"`
2698 // UpdateTime: Output only. When the Feature resource was last updated.
2699 UpdateTime string `json:"updateTime,omitempty"`
2700
2701 // ServerResponse contains the HTTP response code and headers from the server.
2702 googleapi.ServerResponse `json:"-"`
2703 // ForceSendFields is a list of field names (e.g. "CreateTime") to
2704 // unconditionally include in API requests. By default, fields with empty or
2705 // default values are omitted from API requests. See
2706 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2707 // details.
2708 ForceSendFields []string `json:"-"`
2709 // NullFields is a list of field names (e.g. "CreateTime") to include in API
2710 // requests with the JSON null value. By default, fields with empty values are
2711 // omitted from API requests. See
2712 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2713 NullFields []string `json:"-"`
2714 }
2715
2716 func (s Feature) MarshalJSON() ([]byte, error) {
2717 type NoMethod Feature
2718 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2719 }
2720
2721 // FeatureResourceState: FeatureResourceState describes the state of a Feature
2722 // *resource* in the GkeHub API. See `FeatureState` for the "running state" of
2723 // the Feature in the Fleet and across Memberships.
2724 type FeatureResourceState struct {
2725 // State: The current state of the Feature resource in the Hub API.
2726 //
2727 // Possible values:
2728 // "STATE_UNSPECIFIED" - State is unknown or not set.
2729 // "ENABLING" - The Feature is being enabled, and the Feature resource is
2730 // being created. Once complete, the corresponding Feature will be enabled in
2731 // this Fleet.
2732 // "ACTIVE" - The Feature is enabled in this Fleet, and the Feature resource
2733 // is fully available.
2734 // "DISABLING" - The Feature is being disabled in this Fleet, and the Feature
2735 // resource is being deleted.
2736 // "UPDATING" - The Feature resource is being updated.
2737 // "SERVICE_UPDATING" - The Feature resource is being updated by the Hub
2738 // Service.
2739 State string `json:"state,omitempty"`
2740 // ForceSendFields is a list of field names (e.g. "State") to unconditionally
2741 // include in API requests. By default, fields with empty or default values are
2742 // omitted from API requests. See
2743 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2744 // details.
2745 ForceSendFields []string `json:"-"`
2746 // NullFields is a list of field names (e.g. "State") to include in API
2747 // requests with the JSON null value. By default, fields with empty values are
2748 // omitted from API requests. See
2749 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2750 NullFields []string `json:"-"`
2751 }
2752
2753 func (s FeatureResourceState) MarshalJSON() ([]byte, error) {
2754 type NoMethod FeatureResourceState
2755 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2756 }
2757
2758 // FeatureSpec: **Workload Certificate**: The Hub-wide input for the
2759 // WorkloadCertificate feature.
2760 type FeatureSpec struct {
2761 // DefaultConfig: Specifies default membership spec. Users can override the
2762 // default in the member_configs for each member.
2763 DefaultConfig *MembershipSpec `json:"defaultConfig,omitempty"`
2764 // ProvisionGoogleCa: Immutable. Specifies CA configuration.
2765 //
2766 // Possible values:
2767 // "GOOGLE_CA_PROVISIONING_UNSPECIFIED" - Disable default Google managed CA.
2768 // "DISABLED" - Disable default Google managed CA.
2769 // "ENABLED" - Use default Google managed CA.
2770 // "ENABLED_WITH_MANAGED_CA" - Workload certificate feature is enabled, and
2771 // the entire certificate provisioning process is managed by Google with
2772 // managed CAS which is more secure than the default CA.
2773 // "ENABLED_WITH_DEFAULT_CA" - Workload certificate feature is enabled, and
2774 // the entire certificate provisioning process is using the default CA which is
2775 // free.
2776 ProvisionGoogleCa string `json:"provisionGoogleCa,omitempty"`
2777 // ForceSendFields is a list of field names (e.g. "DefaultConfig") to
2778 // unconditionally include in API requests. By default, fields with empty or
2779 // default values are omitted from API requests. See
2780 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2781 // details.
2782 ForceSendFields []string `json:"-"`
2783 // NullFields is a list of field names (e.g. "DefaultConfig") to include in API
2784 // requests with the JSON null value. By default, fields with empty values are
2785 // omitted from API requests. See
2786 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2787 NullFields []string `json:"-"`
2788 }
2789
2790 func (s FeatureSpec) MarshalJSON() ([]byte, error) {
2791 type NoMethod FeatureSpec
2792 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2793 }
2794
2795 // FeatureState: FeatureState describes the high-level state of a Feature. It
2796 // may be used to describe a Feature's state at the environ-level, or
2797 // per-membershop, depending on the context.
2798 type FeatureState struct {
2799 // Code: The high-level, machine-readable status of this Feature.
2800 //
2801 // Possible values:
2802 // "CODE_UNSPECIFIED" - Unknown or not set.
2803 // "OK" - The Feature is operating normally.
2804 // "WARNING" - The Feature has encountered an issue, and is operating in a
2805 // degraded state. The Feature may need intervention to return to normal
2806 // operation. See the description and any associated Feature-specific details
2807 // for more information.
2808 // "ERROR" - The Feature is not operating or is in a severely degraded state.
2809 // The Feature may need intervention to return to normal operation. See the
2810 // description and any associated Feature-specific details for more
2811 // information.
2812 Code string `json:"code,omitempty"`
2813 // Description: A human-readable description of the current status.
2814 Description string `json:"description,omitempty"`
2815 // UpdateTime: The time this status and any related Feature-specific details
2816 // were updated.
2817 UpdateTime string `json:"updateTime,omitempty"`
2818 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2819 // include in API requests. By default, fields with empty or default values are
2820 // omitted from API requests. See
2821 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2822 // details.
2823 ForceSendFields []string `json:"-"`
2824 // NullFields is a list of field names (e.g. "Code") to include in API requests
2825 // with the JSON null value. By default, fields with empty values are omitted
2826 // from API requests. See
2827 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2828 NullFields []string `json:"-"`
2829 }
2830
2831 func (s FeatureState) MarshalJSON() ([]byte, error) {
2832 type NoMethod FeatureState
2833 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2834 }
2835
2836 // Fleet: Fleet contains the Fleet-wide metadata and configuration.
2837 type Fleet struct {
2838 // CreateTime: Output only. When the Fleet was created.
2839 CreateTime string `json:"createTime,omitempty"`
2840 // DefaultClusterConfig: Optional. The default cluster configurations to apply
2841 // across the fleet.
2842 DefaultClusterConfig *DefaultClusterConfig `json:"defaultClusterConfig,omitempty"`
2843 // DeleteTime: Output only. When the Fleet was deleted.
2844 DeleteTime string `json:"deleteTime,omitempty"`
2845 // DisplayName: Optional. A user-assigned display name of the Fleet. When
2846 // present, it must be between 4 to 30 characters. Allowed characters are:
2847 // lowercase and uppercase letters, numbers, hyphen, single-quote,
2848 // double-quote, space, and exclamation point. Example: `Production Fleet`
2849 DisplayName string `json:"displayName,omitempty"`
2850 // Labels: Optional. Labels for this Fleet.
2851 Labels map[string]string `json:"labels,omitempty"`
2852 // Name: Output only. The full, unique resource name of this fleet in the
2853 // format of `projects/{project}/locations/{location}/fleets/{fleet}`. Each
2854 // Google Cloud project can have at most one fleet resource, named "default".
2855 Name string `json:"name,omitempty"`
2856 // State: Output only. State of the namespace resource.
2857 State *FleetLifecycleState `json:"state,omitempty"`
2858 // Uid: Output only. Google-generated UUID for this resource. This is unique
2859 // across all Fleet resources. If a Fleet resource is deleted and another
2860 // resource with the same name is created, it gets a different uid.
2861 Uid string `json:"uid,omitempty"`
2862 // UpdateTime: Output only. When the Fleet was last updated.
2863 UpdateTime string `json:"updateTime,omitempty"`
2864
2865 // ServerResponse contains the HTTP response code and headers from the server.
2866 googleapi.ServerResponse `json:"-"`
2867 // ForceSendFields is a list of field names (e.g. "CreateTime") to
2868 // unconditionally include in API requests. By default, fields with empty or
2869 // default values are omitted from API requests. See
2870 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2871 // details.
2872 ForceSendFields []string `json:"-"`
2873 // NullFields is a list of field names (e.g. "CreateTime") to include in API
2874 // requests with the JSON null value. By default, fields with empty values are
2875 // omitted from API requests. See
2876 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2877 NullFields []string `json:"-"`
2878 }
2879
2880 func (s Fleet) MarshalJSON() ([]byte, error) {
2881 type NoMethod Fleet
2882 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2883 }
2884
2885 // FleetLifecycleState: FleetLifecycleState describes the state of a Fleet
2886 // resource.
2887 type FleetLifecycleState struct {
2888 // Code: Output only. The current state of the Fleet resource.
2889 //
2890 // Possible values:
2891 // "CODE_UNSPECIFIED" - The code is not set.
2892 // "CREATING" - The fleet is being created.
2893 // "READY" - The fleet active.
2894 // "DELETING" - The fleet is being deleted.
2895 // "UPDATING" - The fleet is being updated.
2896 Code string `json:"code,omitempty"`
2897 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2898 // include in API requests. By default, fields with empty or default values are
2899 // omitted from API requests. See
2900 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2901 // details.
2902 ForceSendFields []string `json:"-"`
2903 // NullFields is a list of field names (e.g. "Code") to include in API requests
2904 // with the JSON null value. By default, fields with empty values are omitted
2905 // from API requests. See
2906 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2907 NullFields []string `json:"-"`
2908 }
2909
2910 func (s FleetLifecycleState) MarshalJSON() ([]byte, error) {
2911 type NoMethod FleetLifecycleState
2912 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2913 }
2914
2915 // FleetObservabilityFeatureError: All error details of the fleet observability
2916 // feature.
2917 type FleetObservabilityFeatureError struct {
2918 // Code: The code of the error.
2919 Code string `json:"code,omitempty"`
2920 // Description: A human-readable description of the current status.
2921 Description string `json:"description,omitempty"`
2922 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2923 // include in API requests. By default, fields with empty or default values are
2924 // omitted from API requests. See
2925 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2926 // details.
2927 ForceSendFields []string `json:"-"`
2928 // NullFields is a list of field names (e.g. "Code") to include in API requests
2929 // with the JSON null value. By default, fields with empty values are omitted
2930 // from API requests. See
2931 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2932 NullFields []string `json:"-"`
2933 }
2934
2935 func (s FleetObservabilityFeatureError) MarshalJSON() ([]byte, error) {
2936 type NoMethod FleetObservabilityFeatureError
2937 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2938 }
2939
2940 // FleetObservabilityFeatureSpec: **Fleet Observability**: The Hub-wide input
2941 // for the FleetObservability feature.
2942 type FleetObservabilityFeatureSpec struct {
2943 // LoggingConfig: Specified if fleet logging feature is enabled for the entire
2944 // fleet. If UNSPECIFIED, fleet logging feature is disabled for the entire
2945 // fleet.
2946 LoggingConfig *FleetObservabilityLoggingConfig `json:"loggingConfig,omitempty"`
2947 // ForceSendFields is a list of field names (e.g. "LoggingConfig") to
2948 // unconditionally include in API requests. By default, fields with empty or
2949 // default values are omitted from API requests. See
2950 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2951 // details.
2952 ForceSendFields []string `json:"-"`
2953 // NullFields is a list of field names (e.g. "LoggingConfig") to include in API
2954 // requests with the JSON null value. By default, fields with empty values are
2955 // omitted from API requests. See
2956 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2957 NullFields []string `json:"-"`
2958 }
2959
2960 func (s FleetObservabilityFeatureSpec) MarshalJSON() ([]byte, error) {
2961 type NoMethod FleetObservabilityFeatureSpec
2962 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2963 }
2964
2965 // FleetObservabilityFeatureState: **FleetObservability**: Hub-wide Feature for
2966 // FleetObservability feature. state.
2967 type FleetObservabilityFeatureState struct {
2968 // Logging: The feature state of default logging.
2969 Logging *FleetObservabilityFleetObservabilityLoggingState `json:"logging,omitempty"`
2970 // Monitoring: The feature state of fleet monitoring.
2971 Monitoring *FleetObservabilityFleetObservabilityMonitoringState `json:"monitoring,omitempty"`
2972 // ForceSendFields is a list of field names (e.g. "Logging") to unconditionally
2973 // include in API requests. By default, fields with empty or default values are
2974 // omitted from API requests. See
2975 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2976 // details.
2977 ForceSendFields []string `json:"-"`
2978 // NullFields is a list of field names (e.g. "Logging") to include in API
2979 // requests with the JSON null value. By default, fields with empty values are
2980 // omitted from API requests. See
2981 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2982 NullFields []string `json:"-"`
2983 }
2984
2985 func (s FleetObservabilityFeatureState) MarshalJSON() ([]byte, error) {
2986 type NoMethod FleetObservabilityFeatureState
2987 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2988 }
2989
2990 // FleetObservabilityFleetObservabilityBaseFeatureState: Base state for fleet
2991 // observability feature.
2992 type FleetObservabilityFleetObservabilityBaseFeatureState struct {
2993 // Code: The high-level, machine-readable status of this Feature.
2994 //
2995 // Possible values:
2996 // "CODE_UNSPECIFIED" - Unknown or not set.
2997 // "OK" - The Feature is operating normally.
2998 // "ERROR" - The Feature is encountering errors in the reconciliation. The
2999 // Feature may need intervention to return to normal operation. See the
3000 // description and any associated Feature-specific details for more
3001 // information.
3002 Code string `json:"code,omitempty"`
3003 // Errors: Errors after reconciling the monitoring and logging feature if the
3004 // code is not OK.
3005 Errors []*FleetObservabilityFeatureError `json:"errors,omitempty"`
3006 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
3007 // include in API requests. By default, fields with empty or default values are
3008 // omitted from API requests. See
3009 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3010 // details.
3011 ForceSendFields []string `json:"-"`
3012 // NullFields is a list of field names (e.g. "Code") to include in API requests
3013 // with the JSON null value. By default, fields with empty values are omitted
3014 // from API requests. See
3015 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3016 NullFields []string `json:"-"`
3017 }
3018
3019 func (s FleetObservabilityFleetObservabilityBaseFeatureState) MarshalJSON() ([]byte, error) {
3020 type NoMethod FleetObservabilityFleetObservabilityBaseFeatureState
3021 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3022 }
3023
3024 // FleetObservabilityFleetObservabilityLoggingState: Feature state for logging
3025 // feature.
3026 type FleetObservabilityFleetObservabilityLoggingState struct {
3027 // DefaultLog: The base feature state of fleet default log.
3028 DefaultLog *FleetObservabilityFleetObservabilityBaseFeatureState `json:"defaultLog,omitempty"`
3029 // ScopeLog: The base feature state of fleet scope log.
3030 ScopeLog *FleetObservabilityFleetObservabilityBaseFeatureState `json:"scopeLog,omitempty"`
3031 // ForceSendFields is a list of field names (e.g. "DefaultLog") to
3032 // unconditionally include in API requests. By default, fields with empty or
3033 // default values are omitted from API requests. See
3034 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3035 // details.
3036 ForceSendFields []string `json:"-"`
3037 // NullFields is a list of field names (e.g. "DefaultLog") to include in API
3038 // requests with the JSON null value. By default, fields with empty values are
3039 // omitted from API requests. See
3040 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3041 NullFields []string `json:"-"`
3042 }
3043
3044 func (s FleetObservabilityFleetObservabilityLoggingState) MarshalJSON() ([]byte, error) {
3045 type NoMethod FleetObservabilityFleetObservabilityLoggingState
3046 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3047 }
3048
3049 // FleetObservabilityFleetObservabilityMonitoringState: Feature state for
3050 // monitoring feature.
3051 type FleetObservabilityFleetObservabilityMonitoringState struct {
3052 // State: The base feature state of fleet monitoring feature.
3053 State *FleetObservabilityFleetObservabilityBaseFeatureState `json:"state,omitempty"`
3054 // ForceSendFields is a list of field names (e.g. "State") to unconditionally
3055 // include in API requests. By default, fields with empty or default values are
3056 // omitted from API requests. See
3057 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3058 // details.
3059 ForceSendFields []string `json:"-"`
3060 // NullFields is a list of field names (e.g. "State") to include in API
3061 // requests with the JSON null value. By default, fields with empty values are
3062 // omitted from API requests. See
3063 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3064 NullFields []string `json:"-"`
3065 }
3066
3067 func (s FleetObservabilityFleetObservabilityMonitoringState) MarshalJSON() ([]byte, error) {
3068 type NoMethod FleetObservabilityFleetObservabilityMonitoringState
3069 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3070 }
3071
3072 // FleetObservabilityLoggingConfig: LoggingConfig defines the configuration for
3073 // different types of logs.
3074 type FleetObservabilityLoggingConfig struct {
3075 // DefaultConfig: Specified if applying the default routing config to logs not
3076 // specified in other configs.
3077 DefaultConfig *FleetObservabilityRoutingConfig `json:"defaultConfig,omitempty"`
3078 // FleetScopeLogsConfig: Specified if applying the routing config to all logs
3079 // for all fleet scopes.
3080 FleetScopeLogsConfig *FleetObservabilityRoutingConfig `json:"fleetScopeLogsConfig,omitempty"`
3081 // ForceSendFields is a list of field names (e.g. "DefaultConfig") to
3082 // unconditionally include in API requests. By default, fields with empty or
3083 // default values are omitted from API requests. See
3084 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3085 // details.
3086 ForceSendFields []string `json:"-"`
3087 // NullFields is a list of field names (e.g. "DefaultConfig") to include in API
3088 // requests with the JSON null value. By default, fields with empty values are
3089 // omitted from API requests. See
3090 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3091 NullFields []string `json:"-"`
3092 }
3093
3094 func (s FleetObservabilityLoggingConfig) MarshalJSON() ([]byte, error) {
3095 type NoMethod FleetObservabilityLoggingConfig
3096 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3097 }
3098
3099 // FleetObservabilityMembershipSpec: **FleetObservability**: The
3100 // membership-specific input for FleetObservability feature.
3101 type FleetObservabilityMembershipSpec struct {
3102 }
3103
3104 // FleetObservabilityMembershipState: **FleetObservability**:
3105 // Membership-specific Feature state for fleetobservability.
3106 type FleetObservabilityMembershipState struct {
3107 }
3108
3109 // FleetObservabilityRoutingConfig: RoutingConfig configures the behaviour of
3110 // fleet logging feature.
3111 type FleetObservabilityRoutingConfig struct {
3112 // Mode: mode configures the logs routing mode.
3113 //
3114 // Possible values:
3115 // "MODE_UNSPECIFIED" - If UNSPECIFIED, fleet logging feature is disabled.
3116 // "COPY" - logs will be copied to the destination project.
3117 // "MOVE" - logs will be moved to the destination project.
3118 Mode string `json:"mode,omitempty"`
3119 // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally
3120 // include in API requests. By default, fields with empty or default values are
3121 // omitted from API requests. See
3122 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3123 // details.
3124 ForceSendFields []string `json:"-"`
3125 // NullFields is a list of field names (e.g. "Mode") to include in API requests
3126 // with the JSON null value. By default, fields with empty values are omitted
3127 // from API requests. See
3128 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3129 NullFields []string `json:"-"`
3130 }
3131
3132 func (s FleetObservabilityRoutingConfig) MarshalJSON() ([]byte, error) {
3133 type NoMethod FleetObservabilityRoutingConfig
3134 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3135 }
3136
3137 // GenerateConnectManifestResponse: GenerateConnectManifestResponse contains
3138 // manifest information for installing/upgrading a Connect agent.
3139 type GenerateConnectManifestResponse struct {
3140 // Manifest: The ordered list of Kubernetes resources that need to be applied
3141 // to the cluster for GKE Connect agent installation/upgrade.
3142 Manifest []*ConnectAgentResource `json:"manifest,omitempty"`
3143
3144 // ServerResponse contains the HTTP response code and headers from the server.
3145 googleapi.ServerResponse `json:"-"`
3146 // ForceSendFields is a list of field names (e.g. "Manifest") to
3147 // unconditionally include in API requests. By default, fields with empty or
3148 // default values are omitted from API requests. See
3149 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3150 // details.
3151 ForceSendFields []string `json:"-"`
3152 // NullFields is a list of field names (e.g. "Manifest") to include in API
3153 // requests with the JSON null value. By default, fields with empty values are
3154 // omitted from API requests. See
3155 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3156 NullFields []string `json:"-"`
3157 }
3158
3159 func (s GenerateConnectManifestResponse) MarshalJSON() ([]byte, error) {
3160 type NoMethod GenerateConnectManifestResponse
3161 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3162 }
3163
3164 // GenerateExclusivityManifestResponse: The response of the exclusivity
3165 // artifacts manifests for the client to apply.
3166 type GenerateExclusivityManifestResponse struct {
3167 // CrManifest: The YAML manifest of the membership CR to apply if a new version
3168 // of the CR is available. Empty if no update needs to be applied.
3169 CrManifest string `json:"crManifest,omitempty"`
3170 // CrdManifest: The YAML manifest of the membership CRD to apply if a newer
3171 // version of the CRD is available. Empty if no update needs to be applied.
3172 CrdManifest string `json:"crdManifest,omitempty"`
3173
3174 // ServerResponse contains the HTTP response code and headers from the server.
3175 googleapi.ServerResponse `json:"-"`
3176 // ForceSendFields is a list of field names (e.g. "CrManifest") to
3177 // unconditionally include in API requests. By default, fields with empty or
3178 // default values are omitted from API requests. See
3179 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3180 // details.
3181 ForceSendFields []string `json:"-"`
3182 // NullFields is a list of field names (e.g. "CrManifest") to include in API
3183 // requests with the JSON null value. By default, fields with empty values are
3184 // omitted from API requests. See
3185 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3186 NullFields []string `json:"-"`
3187 }
3188
3189 func (s GenerateExclusivityManifestResponse) MarshalJSON() ([]byte, error) {
3190 type NoMethod GenerateExclusivityManifestResponse
3191 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3192 }
3193
3194 // GenerateMembershipRBACRoleBindingYAMLResponse: Response for
3195 // GenerateRBACRoleBindingYAML.
3196 type GenerateMembershipRBACRoleBindingYAMLResponse struct {
3197 // RoleBindingsYaml: a yaml text blob including the RBAC policies.
3198 RoleBindingsYaml string `json:"roleBindingsYaml,omitempty"`
3199
3200 // ServerResponse contains the HTTP response code and headers from the server.
3201 googleapi.ServerResponse `json:"-"`
3202 // ForceSendFields is a list of field names (e.g. "RoleBindingsYaml") to
3203 // unconditionally include in API requests. By default, fields with empty or
3204 // default values are omitted from API requests. See
3205 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3206 // details.
3207 ForceSendFields []string `json:"-"`
3208 // NullFields is a list of field names (e.g. "RoleBindingsYaml") to include in
3209 // API requests with the JSON null value. By default, fields with empty values
3210 // are omitted from API requests. See
3211 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3212 NullFields []string `json:"-"`
3213 }
3214
3215 func (s GenerateMembershipRBACRoleBindingYAMLResponse) MarshalJSON() ([]byte, error) {
3216 type NoMethod GenerateMembershipRBACRoleBindingYAMLResponse
3217 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3218 }
3219
3220 // GkeCluster: GkeCluster contains information specific to GKE clusters.
3221 type GkeCluster struct {
3222 // ClusterMissing: Output only. If cluster_missing is set then it denotes that
3223 // the GKE cluster no longer exists in the GKE Control Plane.
3224 ClusterMissing bool `json:"clusterMissing,omitempty"`
3225 // ResourceLink: Immutable. Self-link of the Google Cloud resource for the GKE
3226 // cluster. For example:
3227 // //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/
3228 // my-cluster Zonal clusters are also supported.
3229 ResourceLink string `json:"resourceLink,omitempty"`
3230 // ForceSendFields is a list of field names (e.g. "ClusterMissing") to
3231 // unconditionally include in API requests. By default, fields with empty or
3232 // default values are omitted from API requests. See
3233 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3234 // details.
3235 ForceSendFields []string `json:"-"`
3236 // NullFields is a list of field names (e.g. "ClusterMissing") to include in
3237 // API requests with the JSON null value. By default, fields with empty values
3238 // are omitted from API requests. See
3239 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3240 NullFields []string `json:"-"`
3241 }
3242
3243 func (s GkeCluster) MarshalJSON() ([]byte, error) {
3244 type NoMethod GkeCluster
3245 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3246 }
3247
3248 // GoogleRpcStatus: The `Status` type defines a logical error model that is
3249 // suitable for different programming environments, including REST APIs and RPC
3250 // APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message
3251 // contains three pieces of data: error code, error message, and error details.
3252 // You can find out more about this error model and how to work with it in the
3253 // API Design Guide (https://cloud.google.com/apis/design/errors).
3254 type GoogleRpcStatus struct {
3255 // Code: The status code, which should be an enum value of google.rpc.Code.
3256 Code int64 `json:"code,omitempty"`
3257 // Details: A list of messages that carry the error details. There is a common
3258 // set of message types for APIs to use.
3259 Details []googleapi.RawMessage `json:"details,omitempty"`
3260 // Message: A developer-facing error message, which should be in English. Any
3261 // user-facing error message should be localized and sent in the
3262 // google.rpc.Status.details field, or localized by the client.
3263 Message string `json:"message,omitempty"`
3264 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
3265 // include in API requests. By default, fields with empty or default values are
3266 // omitted from API requests. See
3267 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3268 // details.
3269 ForceSendFields []string `json:"-"`
3270 // NullFields is a list of field names (e.g. "Code") to include in API requests
3271 // with the JSON null value. By default, fields with empty values are omitted
3272 // from API requests. See
3273 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3274 NullFields []string `json:"-"`
3275 }
3276
3277 func (s GoogleRpcStatus) MarshalJSON() ([]byte, error) {
3278 type NoMethod GoogleRpcStatus
3279 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3280 }
3281
3282 // IdentityServiceAuthMethod: Configuration of an auth method for a
3283 // member/cluster. Only one authentication method (e.g., OIDC and LDAP) can be
3284 // set per AuthMethod.
3285 type IdentityServiceAuthMethod struct {
3286 // AzureadConfig: AzureAD specific Configuration.
3287 AzureadConfig *IdentityServiceAzureADConfig `json:"azureadConfig,omitempty"`
3288 // GoogleConfig: GoogleConfig specific configuration.
3289 GoogleConfig *IdentityServiceGoogleConfig `json:"googleConfig,omitempty"`
3290 // LdapConfig: LDAP specific configuration.
3291 LdapConfig *IdentityServiceLdapConfig `json:"ldapConfig,omitempty"`
3292 // Name: Identifier for auth config.
3293 Name string `json:"name,omitempty"`
3294 // OidcConfig: OIDC specific configuration.
3295 OidcConfig *IdentityServiceOidcConfig `json:"oidcConfig,omitempty"`
3296 // Proxy: Proxy server address to use for auth method.
3297 Proxy string `json:"proxy,omitempty"`
3298 // SamlConfig: SAML specific configuration.
3299 SamlConfig *IdentityServiceSamlConfig `json:"samlConfig,omitempty"`
3300 // ForceSendFields is a list of field names (e.g. "AzureadConfig") to
3301 // unconditionally include in API requests. By default, fields with empty or
3302 // default values are omitted from API requests. See
3303 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3304 // details.
3305 ForceSendFields []string `json:"-"`
3306 // NullFields is a list of field names (e.g. "AzureadConfig") to include in API
3307 // requests with the JSON null value. By default, fields with empty values are
3308 // omitted from API requests. See
3309 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3310 NullFields []string `json:"-"`
3311 }
3312
3313 func (s IdentityServiceAuthMethod) MarshalJSON() ([]byte, error) {
3314 type NoMethod IdentityServiceAuthMethod
3315 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3316 }
3317
3318 // IdentityServiceAzureADConfig: Configuration for the AzureAD Auth flow.
3319 type IdentityServiceAzureADConfig struct {
3320 // ClientId: ID for the registered client application that makes authentication
3321 // requests to the Azure AD identity provider.
3322 ClientId string `json:"clientId,omitempty"`
3323 // ClientSecret: Input only. Unencrypted AzureAD client secret will be passed
3324 // to the GKE Hub CLH.
3325 ClientSecret string `json:"clientSecret,omitempty"`
3326 // EncryptedClientSecret: Output only. Encrypted AzureAD client secret.
3327 EncryptedClientSecret string `json:"encryptedClientSecret,omitempty"`
3328 // GroupFormat: Optional. Format of the AzureAD groups that the client wants
3329 // for auth.
3330 GroupFormat string `json:"groupFormat,omitempty"`
3331 // KubectlRedirectUri: The redirect URL that kubectl uses for authorization.
3332 KubectlRedirectUri string `json:"kubectlRedirectUri,omitempty"`
3333 // Tenant: Kind of Azure AD account to be authenticated. Supported values are
3334 // or for accounts belonging to a specific tenant.
3335 Tenant string `json:"tenant,omitempty"`
3336 // UserClaim: Optional. Claim in the AzureAD ID Token that holds the user
3337 // details.
3338 UserClaim string `json:"userClaim,omitempty"`
3339 // ForceSendFields is a list of field names (e.g. "ClientId") to
3340 // unconditionally include in API requests. By default, fields with empty or
3341 // default values are omitted from API requests. See
3342 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3343 // details.
3344 ForceSendFields []string `json:"-"`
3345 // NullFields is a list of field names (e.g. "ClientId") to include in API
3346 // requests with the JSON null value. By default, fields with empty values are
3347 // omitted from API requests. See
3348 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3349 NullFields []string `json:"-"`
3350 }
3351
3352 func (s IdentityServiceAzureADConfig) MarshalJSON() ([]byte, error) {
3353 type NoMethod IdentityServiceAzureADConfig
3354 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3355 }
3356
3357 // IdentityServiceDiagnosticInterface: Configuration options for the AIS
3358 // diagnostic interface.
3359 type IdentityServiceDiagnosticInterface struct {
3360 // Enabled: Determines whether to enable the diagnostic interface.
3361 Enabled bool `json:"enabled,omitempty"`
3362 // ExpirationTime: Determines the expiration time of the diagnostic interface
3363 // enablement. When reached, requests to the interface would be automatically
3364 // rejected.
3365 ExpirationTime string `json:"expirationTime,omitempty"`
3366 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
3367 // include in API requests. By default, fields with empty or default values are
3368 // omitted from API requests. See
3369 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3370 // details.
3371 ForceSendFields []string `json:"-"`
3372 // NullFields is a list of field names (e.g. "Enabled") to include in API
3373 // requests with the JSON null value. By default, fields with empty values are
3374 // omitted from API requests. See
3375 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3376 NullFields []string `json:"-"`
3377 }
3378
3379 func (s IdentityServiceDiagnosticInterface) MarshalJSON() ([]byte, error) {
3380 type NoMethod IdentityServiceDiagnosticInterface
3381 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3382 }
3383
3384 // IdentityServiceGoogleConfig: Configuration for the Google Plugin Auth flow.
3385 type IdentityServiceGoogleConfig struct {
3386 // Disable: Disable automatic configuration of Google Plugin on supported
3387 // platforms.
3388 Disable bool `json:"disable,omitempty"`
3389 // ForceSendFields is a list of field names (e.g. "Disable") to unconditionally
3390 // include in API requests. By default, fields with empty or default values are
3391 // omitted from API requests. See
3392 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3393 // details.
3394 ForceSendFields []string `json:"-"`
3395 // NullFields is a list of field names (e.g. "Disable") to include in API
3396 // requests with the JSON null value. By default, fields with empty values are
3397 // omitted from API requests. See
3398 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3399 NullFields []string `json:"-"`
3400 }
3401
3402 func (s IdentityServiceGoogleConfig) MarshalJSON() ([]byte, error) {
3403 type NoMethod IdentityServiceGoogleConfig
3404 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3405 }
3406
3407 // IdentityServiceGroupConfig: Contains the properties for locating and
3408 // authenticating groups in the directory.
3409 type IdentityServiceGroupConfig struct {
3410 // BaseDn: Required. The location of the subtree in the LDAP directory to
3411 // search for group entries.
3412 BaseDn string `json:"baseDn,omitempty"`
3413 // Filter: Optional. Optional filter to be used when searching for groups a
3414 // user belongs to. This can be used to explicitly match only certain groups in
3415 // order to reduce the amount of groups returned for each user. This defaults
3416 // to "(objectClass=Group)".
3417 Filter string `json:"filter,omitempty"`
3418 // IdAttribute: Optional. The identifying name of each group a user belongs to.
3419 // For example, if this is set to "distinguishedName" then RBACs and other
3420 // group expectations should be written as full DNs. This defaults to
3421 // "distinguishedName".
3422 IdAttribute string `json:"idAttribute,omitempty"`
3423 // ForceSendFields is a list of field names (e.g. "BaseDn") to unconditionally
3424 // include in API requests. By default, fields with empty or default values are
3425 // omitted from API requests. See
3426 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3427 // details.
3428 ForceSendFields []string `json:"-"`
3429 // NullFields is a list of field names (e.g. "BaseDn") to include in API
3430 // requests with the JSON null value. By default, fields with empty values are
3431 // omitted from API requests. See
3432 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3433 NullFields []string `json:"-"`
3434 }
3435
3436 func (s IdentityServiceGroupConfig) MarshalJSON() ([]byte, error) {
3437 type NoMethod IdentityServiceGroupConfig
3438 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3439 }
3440
3441 // IdentityServiceIdentityServiceOptions: Holds non-protocol-related
3442 // configuration options.
3443 type IdentityServiceIdentityServiceOptions struct {
3444 // DiagnosticInterface: Configuration options for the AIS diagnostic interface.
3445 DiagnosticInterface *IdentityServiceDiagnosticInterface `json:"diagnosticInterface,omitempty"`
3446 // SessionDuration: Determines the lifespan of STS tokens issued by Anthos
3447 // Identity Service.
3448 SessionDuration string `json:"sessionDuration,omitempty"`
3449 // ForceSendFields is a list of field names (e.g. "DiagnosticInterface") to
3450 // unconditionally include in API requests. By default, fields with empty or
3451 // default values are omitted from API requests. See
3452 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3453 // details.
3454 ForceSendFields []string `json:"-"`
3455 // NullFields is a list of field names (e.g. "DiagnosticInterface") to include
3456 // in API requests with the JSON null value. By default, fields with empty
3457 // values are omitted from API requests. See
3458 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3459 NullFields []string `json:"-"`
3460 }
3461
3462 func (s IdentityServiceIdentityServiceOptions) MarshalJSON() ([]byte, error) {
3463 type NoMethod IdentityServiceIdentityServiceOptions
3464 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3465 }
3466
3467 // IdentityServiceLdapConfig: Configuration for the LDAP Auth flow.
3468 type IdentityServiceLdapConfig struct {
3469 // Group: Optional. Contains the properties for locating and authenticating
3470 // groups in the directory.
3471 Group *IdentityServiceGroupConfig `json:"group,omitempty"`
3472 // Server: Required. Server settings for the external LDAP server.
3473 Server *IdentityServiceServerConfig `json:"server,omitempty"`
3474 // ServiceAccount: Required. Contains the credentials of the service account
3475 // which is authorized to perform the LDAP search in the directory. The
3476 // credentials can be supplied by the combination of the DN and password or the
3477 // client certificate.
3478 ServiceAccount *IdentityServiceServiceAccountConfig `json:"serviceAccount,omitempty"`
3479 // User: Required. Defines where users exist in the LDAP directory.
3480 User *IdentityServiceUserConfig `json:"user,omitempty"`
3481 // ForceSendFields is a list of field names (e.g. "Group") to unconditionally
3482 // include in API requests. By default, fields with empty or default values are
3483 // omitted from API requests. See
3484 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3485 // details.
3486 ForceSendFields []string `json:"-"`
3487 // NullFields is a list of field names (e.g. "Group") to include in API
3488 // requests with the JSON null value. By default, fields with empty values are
3489 // omitted from API requests. See
3490 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3491 NullFields []string `json:"-"`
3492 }
3493
3494 func (s IdentityServiceLdapConfig) MarshalJSON() ([]byte, error) {
3495 type NoMethod IdentityServiceLdapConfig
3496 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3497 }
3498
3499 // IdentityServiceMembershipSpec: **Anthos Identity Service**: Configuration
3500 // for a single Membership.
3501 type IdentityServiceMembershipSpec struct {
3502 // AuthMethods: A member may support multiple auth methods.
3503 AuthMethods []*IdentityServiceAuthMethod `json:"authMethods,omitempty"`
3504 // IdentityServiceOptions: Optional. non-protocol-related configuration
3505 // options.
3506 IdentityServiceOptions *IdentityServiceIdentityServiceOptions `json:"identityServiceOptions,omitempty"`
3507 // ForceSendFields is a list of field names (e.g. "AuthMethods") to
3508 // unconditionally include in API requests. By default, fields with empty or
3509 // default values are omitted from API requests. See
3510 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3511 // details.
3512 ForceSendFields []string `json:"-"`
3513 // NullFields is a list of field names (e.g. "AuthMethods") to include in API
3514 // requests with the JSON null value. By default, fields with empty values are
3515 // omitted from API requests. See
3516 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3517 NullFields []string `json:"-"`
3518 }
3519
3520 func (s IdentityServiceMembershipSpec) MarshalJSON() ([]byte, error) {
3521 type NoMethod IdentityServiceMembershipSpec
3522 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3523 }
3524
3525 // IdentityServiceMembershipState: **Anthos Identity Service**: State for a
3526 // single Membership.
3527 type IdentityServiceMembershipState struct {
3528 // FailureReason: The reason of the failure.
3529 FailureReason string `json:"failureReason,omitempty"`
3530 // InstalledVersion: Installed AIS version. This is the AIS version installed
3531 // on this member. The values makes sense iff state is OK.
3532 InstalledVersion string `json:"installedVersion,omitempty"`
3533 // MemberConfig: Last reconciled membership configuration
3534 MemberConfig *IdentityServiceMembershipSpec `json:"memberConfig,omitempty"`
3535 // State: Deployment state on this member
3536 //
3537 // Possible values:
3538 // "DEPLOYMENT_STATE_UNSPECIFIED" - Unspecified state
3539 // "OK" - deployment succeeds
3540 // "ERROR" - Failure with error.
3541 State string `json:"state,omitempty"`
3542 // ForceSendFields is a list of field names (e.g. "FailureReason") to
3543 // unconditionally include in API requests. By default, fields with empty or
3544 // default values are omitted from API requests. See
3545 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3546 // details.
3547 ForceSendFields []string `json:"-"`
3548 // NullFields is a list of field names (e.g. "FailureReason") to include in API
3549 // requests with the JSON null value. By default, fields with empty values are
3550 // omitted from API requests. See
3551 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3552 NullFields []string `json:"-"`
3553 }
3554
3555 func (s IdentityServiceMembershipState) MarshalJSON() ([]byte, error) {
3556 type NoMethod IdentityServiceMembershipState
3557 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3558 }
3559
3560 // IdentityServiceOidcConfig: Configuration for OIDC Auth flow.
3561 type IdentityServiceOidcConfig struct {
3562 // CertificateAuthorityData: PEM-encoded CA for OIDC provider.
3563 CertificateAuthorityData string `json:"certificateAuthorityData,omitempty"`
3564 // ClientId: ID for OIDC client application.
3565 ClientId string `json:"clientId,omitempty"`
3566 // ClientSecret: Input only. Unencrypted OIDC client secret will be passed to
3567 // the GKE Hub CLH.
3568 ClientSecret string `json:"clientSecret,omitempty"`
3569 // DeployCloudConsoleProxy: Flag to denote if reverse proxy is used to connect
3570 // to auth provider. This flag should be set to true when provider is not
3571 // reachable by Google Cloud Console.
3572 DeployCloudConsoleProxy bool `json:"deployCloudConsoleProxy,omitempty"`
3573 // EnableAccessToken: Enable access token.
3574 EnableAccessToken bool `json:"enableAccessToken,omitempty"`
3575 // EncryptedClientSecret: Output only. Encrypted OIDC Client secret
3576 EncryptedClientSecret string `json:"encryptedClientSecret,omitempty"`
3577 // ExtraParams: Comma-separated list of key-value pairs.
3578 ExtraParams string `json:"extraParams,omitempty"`
3579 // GroupPrefix: Prefix to prepend to group name.
3580 GroupPrefix string `json:"groupPrefix,omitempty"`
3581 // GroupsClaim: Claim in OIDC ID token that holds group information.
3582 GroupsClaim string `json:"groupsClaim,omitempty"`
3583 // IssuerUri: URI for the OIDC provider. This should point to the level below
3584 // .well-known/openid-configuration.
3585 IssuerUri string `json:"issuerUri,omitempty"`
3586 // KubectlRedirectUri: Registered redirect uri to redirect users going through
3587 // OAuth flow using kubectl plugin.
3588 KubectlRedirectUri string `json:"kubectlRedirectUri,omitempty"`
3589 // Scopes: Comma-separated list of identifiers.
3590 Scopes string `json:"scopes,omitempty"`
3591 // UserClaim: Claim in OIDC ID token that holds username.
3592 UserClaim string `json:"userClaim,omitempty"`
3593 // UserPrefix: Prefix to prepend to user name.
3594 UserPrefix string `json:"userPrefix,omitempty"`
3595 // ForceSendFields is a list of field names (e.g. "CertificateAuthorityData")
3596 // to unconditionally include in API requests. By default, fields with empty or
3597 // default values are omitted from API requests. See
3598 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3599 // details.
3600 ForceSendFields []string `json:"-"`
3601 // NullFields is a list of field names (e.g. "CertificateAuthorityData") to
3602 // include in API requests with the JSON null value. By default, fields with
3603 // empty values are omitted from API requests. See
3604 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3605 NullFields []string `json:"-"`
3606 }
3607
3608 func (s IdentityServiceOidcConfig) MarshalJSON() ([]byte, error) {
3609 type NoMethod IdentityServiceOidcConfig
3610 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3611 }
3612
3613 // IdentityServiceSamlConfig: Configuration for the SAML Auth flow.
3614 type IdentityServiceSamlConfig struct {
3615 // AttributeMapping: Optional. The mapping of additional user attributes like
3616 // nickname, birthday and address etc.. `key` is the name of this additional
3617 // attribute. `value` is a string presenting as CEL(common expression language,
3618 // go/cel) used for getting the value from the resources. Take nickname as an
3619 // example, in this case, `key` is "attribute.nickname" and `value` is
3620 // "assertion.nickname".
3621 AttributeMapping map[string]string `json:"attributeMapping,omitempty"`
3622 // GroupPrefix: Optional. Prefix to prepend to group name.
3623 GroupPrefix string `json:"groupPrefix,omitempty"`
3624 // GroupsAttribute: Optional. The SAML attribute to read groups from. This
3625 // value is expected to be a string and will be passed along as-is (with the
3626 // option of being prefixed by the `group_prefix`).
3627 GroupsAttribute string `json:"groupsAttribute,omitempty"`
3628 // IdentityProviderCertificates: Required. The list of IdP certificates to
3629 // validate the SAML response against.
3630 IdentityProviderCertificates []string `json:"identityProviderCertificates,omitempty"`
3631 // IdentityProviderId: Required. The entity ID of the SAML IdP.
3632 IdentityProviderId string `json:"identityProviderId,omitempty"`
3633 // IdentityProviderSsoUri: Required. The URI where the SAML IdP exposes the SSO
3634 // service.
3635 IdentityProviderSsoUri string `json:"identityProviderSsoUri,omitempty"`
3636 // UserAttribute: Optional. The SAML attribute to read username from. If
3637 // unspecified, the username will be read from the NameID element of the
3638 // assertion in SAML response. This value is expected to be a string and will
3639 // be passed along as-is (with the option of being prefixed by the
3640 // `user_prefix`).
3641 UserAttribute string `json:"userAttribute,omitempty"`
3642 // UserPrefix: Optional. Prefix to prepend to user name.
3643 UserPrefix string `json:"userPrefix,omitempty"`
3644 // ForceSendFields is a list of field names (e.g. "AttributeMapping") to
3645 // unconditionally include in API requests. By default, fields with empty or
3646 // default values are omitted from API requests. See
3647 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3648 // details.
3649 ForceSendFields []string `json:"-"`
3650 // NullFields is a list of field names (e.g. "AttributeMapping") to include in
3651 // API requests with the JSON null value. By default, fields with empty values
3652 // are omitted from API requests. See
3653 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3654 NullFields []string `json:"-"`
3655 }
3656
3657 func (s IdentityServiceSamlConfig) MarshalJSON() ([]byte, error) {
3658 type NoMethod IdentityServiceSamlConfig
3659 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3660 }
3661
3662 // IdentityServiceServerConfig: Server settings for the external LDAP server.
3663 type IdentityServiceServerConfig struct {
3664 // CertificateAuthorityData: Optional. Contains a Base64 encoded, PEM formatted
3665 // certificate authority certificate for the LDAP server. This must be provided
3666 // for the "ldaps" and "startTLS" connections.
3667 CertificateAuthorityData string `json:"certificateAuthorityData,omitempty"`
3668 // ConnectionType: Optional. Defines the connection type to communicate with
3669 // the LDAP server. If `starttls` or `ldaps` is specified, the
3670 // certificate_authority_data should not be empty.
3671 ConnectionType string `json:"connectionType,omitempty"`
3672 // Host: Required. Defines the hostname or IP of the LDAP server. Port is
3673 // optional and will default to 389, if unspecified. For example,
3674 // "ldap.server.example" or "10.10.10.10:389".
3675 Host string `json:"host,omitempty"`
3676 // ForceSendFields is a list of field names (e.g. "CertificateAuthorityData")
3677 // to unconditionally include in API requests. By default, fields with empty or
3678 // default values are omitted from API requests. See
3679 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3680 // details.
3681 ForceSendFields []string `json:"-"`
3682 // NullFields is a list of field names (e.g. "CertificateAuthorityData") to
3683 // include in API requests with the JSON null value. By default, fields with
3684 // empty values are omitted from API requests. See
3685 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3686 NullFields []string `json:"-"`
3687 }
3688
3689 func (s IdentityServiceServerConfig) MarshalJSON() ([]byte, error) {
3690 type NoMethod IdentityServiceServerConfig
3691 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3692 }
3693
3694 // IdentityServiceServiceAccountConfig: Contains the credentials of the service
3695 // account which is authorized to perform the LDAP search in the directory. The
3696 // credentials can be supplied by the combination of the DN and password or the
3697 // client certificate.
3698 type IdentityServiceServiceAccountConfig struct {
3699 // SimpleBindCredentials: Credentials for basic auth.
3700 SimpleBindCredentials *IdentityServiceSimpleBindCredentials `json:"simpleBindCredentials,omitempty"`
3701 // ForceSendFields is a list of field names (e.g. "SimpleBindCredentials") to
3702 // unconditionally include in API requests. By default, fields with empty or
3703 // default values are omitted from API requests. See
3704 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3705 // details.
3706 ForceSendFields []string `json:"-"`
3707 // NullFields is a list of field names (e.g. "SimpleBindCredentials") to
3708 // include in API requests with the JSON null value. By default, fields with
3709 // empty values are omitted from API requests. See
3710 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3711 NullFields []string `json:"-"`
3712 }
3713
3714 func (s IdentityServiceServiceAccountConfig) MarshalJSON() ([]byte, error) {
3715 type NoMethod IdentityServiceServiceAccountConfig
3716 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3717 }
3718
3719 // IdentityServiceSimpleBindCredentials: The structure holds the LDAP simple
3720 // binding credential.
3721 type IdentityServiceSimpleBindCredentials struct {
3722 // Dn: Required. The distinguished name(DN) of the service account object/user.
3723 Dn string `json:"dn,omitempty"`
3724 // EncryptedPassword: Output only. The encrypted password of the service
3725 // account object/user.
3726 EncryptedPassword string `json:"encryptedPassword,omitempty"`
3727 // Password: Required. Input only. The password of the service account
3728 // object/user.
3729 Password string `json:"password,omitempty"`
3730 // ForceSendFields is a list of field names (e.g. "Dn") to unconditionally
3731 // include in API requests. By default, fields with empty or default values are
3732 // omitted from API requests. See
3733 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3734 // details.
3735 ForceSendFields []string `json:"-"`
3736 // NullFields is a list of field names (e.g. "Dn") to include in API requests
3737 // with the JSON null value. By default, fields with empty values are omitted
3738 // from API requests. See
3739 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3740 NullFields []string `json:"-"`
3741 }
3742
3743 func (s IdentityServiceSimpleBindCredentials) MarshalJSON() ([]byte, error) {
3744 type NoMethod IdentityServiceSimpleBindCredentials
3745 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3746 }
3747
3748 // IdentityServiceUserConfig: Defines where users exist in the LDAP directory.
3749 type IdentityServiceUserConfig struct {
3750 // BaseDn: Required. The location of the subtree in the LDAP directory to
3751 // search for user entries.
3752 BaseDn string `json:"baseDn,omitempty"`
3753 // Filter: Optional. Filter to apply when searching for the user. This can be
3754 // used to further restrict the user accounts which are allowed to login. This
3755 // defaults to "(objectClass=User)".
3756 Filter string `json:"filter,omitempty"`
3757 // IdAttribute: Optional. Determines which attribute to use as the user's
3758 // identity after they are authenticated. This is distinct from the
3759 // loginAttribute field to allow users to login with a username, but then have
3760 // their actual identifier be an email address or full Distinguished Name (DN).
3761 // For example, setting loginAttribute to "sAMAccountName" and
3762 // identifierAttribute to "userPrincipalName" would allow a user to login as
3763 // "bsmith", but actual RBAC policies for the user would be written as
3764 // "[email protected]". Using "userPrincipalName" is recommended since this
3765 // will be unique for each user. This defaults to "userPrincipalName".
3766 IdAttribute string `json:"idAttribute,omitempty"`
3767 // LoginAttribute: Optional. The name of the attribute which matches against
3768 // the input username. This is used to find the user in the LDAP database e.g.
3769 // "(=)" and is combined with the optional filter field. This defaults to
3770 // "userPrincipalName".
3771 LoginAttribute string `json:"loginAttribute,omitempty"`
3772 // ForceSendFields is a list of field names (e.g. "BaseDn") to unconditionally
3773 // include in API requests. By default, fields with empty or default values are
3774 // omitted from API requests. See
3775 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3776 // details.
3777 ForceSendFields []string `json:"-"`
3778 // NullFields is a list of field names (e.g. "BaseDn") to include in API
3779 // requests with the JSON null value. By default, fields with empty values are
3780 // omitted from API requests. See
3781 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3782 NullFields []string `json:"-"`
3783 }
3784
3785 func (s IdentityServiceUserConfig) MarshalJSON() ([]byte, error) {
3786 type NoMethod IdentityServiceUserConfig
3787 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3788 }
3789
3790 // KubernetesMetadata: KubernetesMetadata provides informational metadata for
3791 // Memberships representing Kubernetes clusters.
3792 type KubernetesMetadata struct {
3793 // KubernetesApiServerVersion: Output only. Kubernetes API server version
3794 // string as reported by `/version`.
3795 KubernetesApiServerVersion string `json:"kubernetesApiServerVersion,omitempty"`
3796 // MemoryMb: Output only. The total memory capacity as reported by the sum of
3797 // all Kubernetes nodes resources, defined in MB.
3798 MemoryMb int64 `json:"memoryMb,omitempty"`
3799 // NodeCount: Output only. Node count as reported by Kubernetes nodes
3800 // resources.
3801 NodeCount int64 `json:"nodeCount,omitempty"`
3802 // NodeProviderId: Output only. Node providerID as reported by the first node
3803 // in the list of nodes on the Kubernetes endpoint. On Kubernetes platforms
3804 // that support zero-node clusters (like GKE on Google Cloud), the node_count
3805 // will be zero and the node_provider_id will be empty.
3806 NodeProviderId string `json:"nodeProviderId,omitempty"`
3807 // UpdateTime: Output only. The time at which these details were last updated.
3808 // This update_time is different from the Membership-level update_time since
3809 // EndpointDetails are updated internally for API consumers.
3810 UpdateTime string `json:"updateTime,omitempty"`
3811 // VcpuCount: Output only. vCPU count as reported by Kubernetes nodes
3812 // resources.
3813 VcpuCount int64 `json:"vcpuCount,omitempty"`
3814 // ForceSendFields is a list of field names (e.g. "KubernetesApiServerVersion")
3815 // to unconditionally include in API requests. By default, fields with empty or
3816 // default values are omitted from API requests. See
3817 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3818 // details.
3819 ForceSendFields []string `json:"-"`
3820 // NullFields is a list of field names (e.g. "KubernetesApiServerVersion") to
3821 // include in API requests with the JSON null value. By default, fields with
3822 // empty values are omitted from API requests. See
3823 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3824 NullFields []string `json:"-"`
3825 }
3826
3827 func (s KubernetesMetadata) MarshalJSON() ([]byte, error) {
3828 type NoMethod KubernetesMetadata
3829 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3830 }
3831
3832 // KubernetesResource: KubernetesResource contains the YAML manifests and
3833 // configuration for Membership Kubernetes resources in the cluster. After
3834 // CreateMembership or UpdateMembership, these resources should be re-applied
3835 // in the cluster.
3836 type KubernetesResource struct {
3837 // ConnectResources: Output only. The Kubernetes resources for installing the
3838 // GKE Connect agent This field is only populated in the Membership returned
3839 // from a successful long-running operation from CreateMembership or
3840 // UpdateMembership. It is not populated during normal GetMembership or
3841 // ListMemberships requests. To get the resource manifest after the initial
3842 // registration, the caller should make a UpdateMembership call with an empty
3843 // field mask.
3844 ConnectResources []*ResourceManifest `json:"connectResources,omitempty"`
3845 // MembershipCrManifest: Input only. The YAML representation of the Membership
3846 // CR. This field is ignored for GKE clusters where Hub can read the CR
3847 // directly. Callers should provide the CR that is currently present in the
3848 // cluster during CreateMembership or UpdateMembership, or leave this field
3849 // empty if none exists. The CR manifest is used to validate the cluster has
3850 // not been registered with another Membership.
3851 MembershipCrManifest string `json:"membershipCrManifest,omitempty"`
3852 // MembershipResources: Output only. Additional Kubernetes resources that need
3853 // to be applied to the cluster after Membership creation, and after every
3854 // update. This field is only populated in the Membership returned from a
3855 // successful long-running operation from CreateMembership or UpdateMembership.
3856 // It is not populated during normal GetMembership or ListMemberships requests.
3857 // To get the resource manifest after the initial registration, the caller
3858 // should make a UpdateMembership call with an empty field mask.
3859 MembershipResources []*ResourceManifest `json:"membershipResources,omitempty"`
3860 // ResourceOptions: Optional. Options for Kubernetes resource generation.
3861 ResourceOptions *ResourceOptions `json:"resourceOptions,omitempty"`
3862 // ForceSendFields is a list of field names (e.g. "ConnectResources") to
3863 // unconditionally include in API requests. By default, fields with empty or
3864 // default values are omitted from API requests. See
3865 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3866 // details.
3867 ForceSendFields []string `json:"-"`
3868 // NullFields is a list of field names (e.g. "ConnectResources") to include in
3869 // API requests with the JSON null value. By default, fields with empty values
3870 // are omitted from API requests. See
3871 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3872 NullFields []string `json:"-"`
3873 }
3874
3875 func (s KubernetesResource) MarshalJSON() ([]byte, error) {
3876 type NoMethod KubernetesResource
3877 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3878 }
3879
3880 // ListAdminClusterMembershipsResponse: Response message for the
3881 // `GkeHub.ListAdminClusterMemberships` method.
3882 type ListAdminClusterMembershipsResponse struct {
3883 // AdminClusterMemberships: The list of matching Memberships of admin clusters.
3884 AdminClusterMemberships []*Membership `json:"adminClusterMemberships,omitempty"`
3885 // NextPageToken: A token to request the next page of resources from the
3886 // `ListAdminClusterMemberships` method. The value of an empty string means
3887 // that there are no more resources to return.
3888 NextPageToken string `json:"nextPageToken,omitempty"`
3889 // Unreachable: List of locations that could not be reached while fetching this
3890 // list.
3891 Unreachable []string `json:"unreachable,omitempty"`
3892
3893 // ServerResponse contains the HTTP response code and headers from the server.
3894 googleapi.ServerResponse `json:"-"`
3895 // ForceSendFields is a list of field names (e.g. "AdminClusterMemberships") to
3896 // unconditionally include in API requests. By default, fields with empty or
3897 // default values are omitted from API requests. See
3898 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3899 // details.
3900 ForceSendFields []string `json:"-"`
3901 // NullFields is a list of field names (e.g. "AdminClusterMemberships") to
3902 // include in API requests with the JSON null value. By default, fields with
3903 // empty values are omitted from API requests. See
3904 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3905 NullFields []string `json:"-"`
3906 }
3907
3908 func (s ListAdminClusterMembershipsResponse) MarshalJSON() ([]byte, error) {
3909 type NoMethod ListAdminClusterMembershipsResponse
3910 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3911 }
3912
3913 // ListBoundMembershipsResponse: List of Memberships bound to a Scope.
3914 type ListBoundMembershipsResponse struct {
3915 // Memberships: The list of Memberships bound to the given Scope.
3916 Memberships []*Membership `json:"memberships,omitempty"`
3917 // NextPageToken: A token to request the next page of resources from the
3918 // `ListBoundMemberships` method. The value of an empty string means that there
3919 // are no more resources to return.
3920 NextPageToken string `json:"nextPageToken,omitempty"`
3921 // Unreachable: List of locations that could not be reached while fetching this
3922 // list.
3923 Unreachable []string `json:"unreachable,omitempty"`
3924
3925 // ServerResponse contains the HTTP response code and headers from the server.
3926 googleapi.ServerResponse `json:"-"`
3927 // ForceSendFields is a list of field names (e.g. "Memberships") to
3928 // unconditionally include in API requests. By default, fields with empty or
3929 // default values are omitted from API requests. See
3930 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3931 // details.
3932 ForceSendFields []string `json:"-"`
3933 // NullFields is a list of field names (e.g. "Memberships") to include in API
3934 // requests with the JSON null value. By default, fields with empty values are
3935 // omitted from API requests. See
3936 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3937 NullFields []string `json:"-"`
3938 }
3939
3940 func (s ListBoundMembershipsResponse) MarshalJSON() ([]byte, error) {
3941 type NoMethod ListBoundMembershipsResponse
3942 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3943 }
3944
3945 // ListFeaturesResponse: Response message for the `GkeHub.ListFeatures` method.
3946 type ListFeaturesResponse struct {
3947 // NextPageToken: A token to request the next page of resources from the
3948 // `ListFeatures` method. The value of an empty string means that there are no
3949 // more resources to return.
3950 NextPageToken string `json:"nextPageToken,omitempty"`
3951 // Resources: The list of matching Features
3952 Resources []*Feature `json:"resources,omitempty"`
3953
3954 // ServerResponse contains the HTTP response code and headers from the server.
3955 googleapi.ServerResponse `json:"-"`
3956 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3957 // unconditionally include in API requests. By default, fields with empty or
3958 // default values are omitted from API requests. See
3959 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3960 // details.
3961 ForceSendFields []string `json:"-"`
3962 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3963 // requests with the JSON null value. By default, fields with empty values are
3964 // omitted from API requests. See
3965 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3966 NullFields []string `json:"-"`
3967 }
3968
3969 func (s ListFeaturesResponse) MarshalJSON() ([]byte, error) {
3970 type NoMethod ListFeaturesResponse
3971 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3972 }
3973
3974 // ListFleetsResponse: Response message for the `GkeHub.ListFleetsResponse`
3975 // method.
3976 type ListFleetsResponse struct {
3977 // Fleets: The list of matching fleets.
3978 Fleets []*Fleet `json:"fleets,omitempty"`
3979 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3980 // next page. If this field is omitted, there are no subsequent pages. The
3981 // token is only valid for 1h.
3982 NextPageToken string `json:"nextPageToken,omitempty"`
3983
3984 // ServerResponse contains the HTTP response code and headers from the server.
3985 googleapi.ServerResponse `json:"-"`
3986 // ForceSendFields is a list of field names (e.g. "Fleets") to unconditionally
3987 // include in API requests. By default, fields with empty or default values are
3988 // omitted from API requests. See
3989 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3990 // details.
3991 ForceSendFields []string `json:"-"`
3992 // NullFields is a list of field names (e.g. "Fleets") to include in API
3993 // requests with the JSON null value. By default, fields with empty values are
3994 // omitted from API requests. See
3995 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3996 NullFields []string `json:"-"`
3997 }
3998
3999 func (s ListFleetsResponse) MarshalJSON() ([]byte, error) {
4000 type NoMethod ListFleetsResponse
4001 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4002 }
4003
4004 // ListLocationsResponse: The response message for Locations.ListLocations.
4005 type ListLocationsResponse struct {
4006 // Locations: A list of locations that matches the specified filter in the
4007 // request.
4008 Locations []*Location `json:"locations,omitempty"`
4009 // NextPageToken: The standard List next-page token.
4010 NextPageToken string `json:"nextPageToken,omitempty"`
4011
4012 // ServerResponse contains the HTTP response code and headers from the server.
4013 googleapi.ServerResponse `json:"-"`
4014 // ForceSendFields is a list of field names (e.g. "Locations") to
4015 // unconditionally include in API requests. By default, fields with empty or
4016 // default values are omitted from API requests. See
4017 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4018 // details.
4019 ForceSendFields []string `json:"-"`
4020 // NullFields is a list of field names (e.g. "Locations") to include in API
4021 // requests with the JSON null value. By default, fields with empty values are
4022 // omitted from API requests. See
4023 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4024 NullFields []string `json:"-"`
4025 }
4026
4027 func (s ListLocationsResponse) MarshalJSON() ([]byte, error) {
4028 type NoMethod ListLocationsResponse
4029 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4030 }
4031
4032 // ListMembershipBindingsResponse: List of MembershipBindings.
4033 type ListMembershipBindingsResponse struct {
4034 // MembershipBindings: The list of membership_bindings
4035 MembershipBindings []*MembershipBinding `json:"membershipBindings,omitempty"`
4036 // NextPageToken: A token to request the next page of resources from the
4037 // `ListMembershipBindings` method. The value of an empty string means that
4038 // there are no more resources to return.
4039 NextPageToken string `json:"nextPageToken,omitempty"`
4040 // Unreachable: List of locations that could not be reached while fetching this
4041 // list.
4042 Unreachable []string `json:"unreachable,omitempty"`
4043
4044 // ServerResponse contains the HTTP response code and headers from the server.
4045 googleapi.ServerResponse `json:"-"`
4046 // ForceSendFields is a list of field names (e.g. "MembershipBindings") to
4047 // unconditionally include in API requests. By default, fields with empty or
4048 // default values are omitted from API requests. See
4049 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4050 // details.
4051 ForceSendFields []string `json:"-"`
4052 // NullFields is a list of field names (e.g. "MembershipBindings") to include
4053 // in API requests with the JSON null value. By default, fields with empty
4054 // values are omitted from API requests. See
4055 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4056 NullFields []string `json:"-"`
4057 }
4058
4059 func (s ListMembershipBindingsResponse) MarshalJSON() ([]byte, error) {
4060 type NoMethod ListMembershipBindingsResponse
4061 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4062 }
4063
4064 // ListMembershipRBACRoleBindingsResponse: List of Membership RBACRoleBindings.
4065 type ListMembershipRBACRoleBindingsResponse struct {
4066 // NextPageToken: A token to request the next page of resources from the
4067 // `ListMembershipRBACRoleBindings` method. The value of an empty string means
4068 // that there are no more resources to return.
4069 NextPageToken string `json:"nextPageToken,omitempty"`
4070 // Rbacrolebindings: The list of Membership RBACRoleBindings.
4071 Rbacrolebindings []*RBACRoleBinding `json:"rbacrolebindings,omitempty"`
4072 // Unreachable: List of locations that could not be reached while fetching this
4073 // list.
4074 Unreachable []string `json:"unreachable,omitempty"`
4075
4076 // ServerResponse contains the HTTP response code and headers from the server.
4077 googleapi.ServerResponse `json:"-"`
4078 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
4079 // unconditionally include in API requests. By default, fields with empty or
4080 // default values are omitted from API requests. See
4081 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4082 // details.
4083 ForceSendFields []string `json:"-"`
4084 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
4085 // requests with the JSON null value. By default, fields with empty values are
4086 // omitted from API requests. See
4087 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4088 NullFields []string `json:"-"`
4089 }
4090
4091 func (s ListMembershipRBACRoleBindingsResponse) MarshalJSON() ([]byte, error) {
4092 type NoMethod ListMembershipRBACRoleBindingsResponse
4093 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4094 }
4095
4096 // ListMembershipsResponse: Response message for the `GkeHub.ListMemberships`
4097 // method.
4098 type ListMembershipsResponse struct {
4099 // NextPageToken: A token to request the next page of resources from the
4100 // `ListMemberships` method. The value of an empty string means that there are
4101 // no more resources to return.
4102 NextPageToken string `json:"nextPageToken,omitempty"`
4103 // Resources: The list of matching Memberships.
4104 Resources []*Membership `json:"resources,omitempty"`
4105 // Unreachable: List of locations that could not be reached while fetching this
4106 // list.
4107 Unreachable []string `json:"unreachable,omitempty"`
4108
4109 // ServerResponse contains the HTTP response code and headers from the server.
4110 googleapi.ServerResponse `json:"-"`
4111 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
4112 // unconditionally include in API requests. By default, fields with empty or
4113 // default values are omitted from API requests. See
4114 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4115 // details.
4116 ForceSendFields []string `json:"-"`
4117 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
4118 // requests with the JSON null value. By default, fields with empty values are
4119 // omitted from API requests. See
4120 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4121 NullFields []string `json:"-"`
4122 }
4123
4124 func (s ListMembershipsResponse) MarshalJSON() ([]byte, error) {
4125 type NoMethod ListMembershipsResponse
4126 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4127 }
4128
4129 // ListOperationsResponse: The response message for Operations.ListOperations.
4130 type ListOperationsResponse struct {
4131 // NextPageToken: The standard List next-page token.
4132 NextPageToken string `json:"nextPageToken,omitempty"`
4133 // Operations: A list of operations that matches the specified filter in the
4134 // request.
4135 Operations []*Operation `json:"operations,omitempty"`
4136 // Unreachable: Unordered list. Unreachable resources. Populated when the
4137 // request sets `ListOperationsRequest.return_partial_success` and reads across
4138 // collections. For example, when attempting to list all resources across all
4139 // supported locations.
4140 Unreachable []string `json:"unreachable,omitempty"`
4141
4142 // ServerResponse contains the HTTP response code and headers from the server.
4143 googleapi.ServerResponse `json:"-"`
4144 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
4145 // unconditionally include in API requests. By default, fields with empty or
4146 // default values are omitted from API requests. See
4147 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4148 // details.
4149 ForceSendFields []string `json:"-"`
4150 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
4151 // requests with the JSON null value. By default, fields with empty values are
4152 // omitted from API requests. See
4153 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4154 NullFields []string `json:"-"`
4155 }
4156
4157 func (s ListOperationsResponse) MarshalJSON() ([]byte, error) {
4158 type NoMethod ListOperationsResponse
4159 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4160 }
4161
4162 // ListPermittedScopesResponse: List of permitted Scopes.
4163 type ListPermittedScopesResponse struct {
4164 // NextPageToken: A token to request the next page of resources from the
4165 // `ListPermittedScopes` method. The value of an empty string means that there
4166 // are no more resources to return.
4167 NextPageToken string `json:"nextPageToken,omitempty"`
4168 // Scopes: The list of permitted Scopes
4169 Scopes []*Scope `json:"scopes,omitempty"`
4170
4171 // ServerResponse contains the HTTP response code and headers from the server.
4172 googleapi.ServerResponse `json:"-"`
4173 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
4174 // unconditionally include in API requests. By default, fields with empty or
4175 // default values are omitted from API requests. See
4176 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4177 // details.
4178 ForceSendFields []string `json:"-"`
4179 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
4180 // requests with the JSON null value. By default, fields with empty values are
4181 // omitted from API requests. See
4182 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4183 NullFields []string `json:"-"`
4184 }
4185
4186 func (s ListPermittedScopesResponse) MarshalJSON() ([]byte, error) {
4187 type NoMethod ListPermittedScopesResponse
4188 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4189 }
4190
4191 // ListRolloutSequencesResponse: Response message for listing rollout
4192 // sequences.
4193 type ListRolloutSequencesResponse struct {
4194 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
4195 // next page. If this field is omitted, there are no subsequent pages.
4196 NextPageToken string `json:"nextPageToken,omitempty"`
4197 // RolloutSequences: The rollout sequences from the specified parent resource.
4198 RolloutSequences []*RolloutSequence `json:"rolloutSequences,omitempty"`
4199
4200 // ServerResponse contains the HTTP response code and headers from the server.
4201 googleapi.ServerResponse `json:"-"`
4202 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
4203 // unconditionally include in API requests. By default, fields with empty or
4204 // default values are omitted from API requests. See
4205 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4206 // details.
4207 ForceSendFields []string `json:"-"`
4208 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
4209 // requests with the JSON null value. By default, fields with empty values are
4210 // omitted from API requests. See
4211 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4212 NullFields []string `json:"-"`
4213 }
4214
4215 func (s ListRolloutSequencesResponse) MarshalJSON() ([]byte, error) {
4216 type NoMethod ListRolloutSequencesResponse
4217 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4218 }
4219
4220 // ListRolloutsResponse: Response message for listing rollouts.
4221 type ListRolloutsResponse struct {
4222 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
4223 // next page. If this field is omitted, there are no subsequent pages.
4224 NextPageToken string `json:"nextPageToken,omitempty"`
4225 // Rollouts: The rollouts from the specified parent resource.
4226 Rollouts []*Rollout `json:"rollouts,omitempty"`
4227
4228 // ServerResponse contains the HTTP response code and headers from the server.
4229 googleapi.ServerResponse `json:"-"`
4230 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
4231 // unconditionally include in API requests. By default, fields with empty or
4232 // default values are omitted from API requests. See
4233 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4234 // details.
4235 ForceSendFields []string `json:"-"`
4236 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
4237 // requests with the JSON null value. By default, fields with empty values are
4238 // omitted from API requests. See
4239 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4240 NullFields []string `json:"-"`
4241 }
4242
4243 func (s ListRolloutsResponse) MarshalJSON() ([]byte, error) {
4244 type NoMethod ListRolloutsResponse
4245 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4246 }
4247
4248 // ListScopeNamespacesResponse: List of fleet namespaces.
4249 type ListScopeNamespacesResponse struct {
4250 // NextPageToken: A token to request the next page of resources from the
4251 // `ListNamespaces` method. The value of an empty string means that there are
4252 // no more resources to return.
4253 NextPageToken string `json:"nextPageToken,omitempty"`
4254 // ScopeNamespaces: The list of fleet namespaces
4255 ScopeNamespaces []*Namespace `json:"scopeNamespaces,omitempty"`
4256
4257 // ServerResponse contains the HTTP response code and headers from the server.
4258 googleapi.ServerResponse `json:"-"`
4259 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
4260 // unconditionally include in API requests. By default, fields with empty or
4261 // default values are omitted from API requests. See
4262 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4263 // details.
4264 ForceSendFields []string `json:"-"`
4265 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
4266 // requests with the JSON null value. By default, fields with empty values are
4267 // omitted from API requests. See
4268 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4269 NullFields []string `json:"-"`
4270 }
4271
4272 func (s ListScopeNamespacesResponse) MarshalJSON() ([]byte, error) {
4273 type NoMethod ListScopeNamespacesResponse
4274 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4275 }
4276
4277 // ListScopeRBACRoleBindingsResponse: List of Scope RBACRoleBindings.
4278 type ListScopeRBACRoleBindingsResponse struct {
4279 // NextPageToken: A token to request the next page of resources from the
4280 // `ListScopeRBACRoleBindings` method. The value of an empty string means that
4281 // there are no more resources to return.
4282 NextPageToken string `json:"nextPageToken,omitempty"`
4283 // Rbacrolebindings: The list of Scope RBACRoleBindings.
4284 Rbacrolebindings []*RBACRoleBinding `json:"rbacrolebindings,omitempty"`
4285
4286 // ServerResponse contains the HTTP response code and headers from the server.
4287 googleapi.ServerResponse `json:"-"`
4288 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
4289 // unconditionally include in API requests. By default, fields with empty or
4290 // default values are omitted from API requests. See
4291 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4292 // details.
4293 ForceSendFields []string `json:"-"`
4294 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
4295 // requests with the JSON null value. By default, fields with empty values are
4296 // omitted from API requests. See
4297 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4298 NullFields []string `json:"-"`
4299 }
4300
4301 func (s ListScopeRBACRoleBindingsResponse) MarshalJSON() ([]byte, error) {
4302 type NoMethod ListScopeRBACRoleBindingsResponse
4303 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4304 }
4305
4306 // ListScopesResponse: List of Scopes.
4307 type ListScopesResponse struct {
4308 // NextPageToken: A token to request the next page of resources from the
4309 // `ListScopes` method. The value of an empty string means that there are no
4310 // more resources to return.
4311 NextPageToken string `json:"nextPageToken,omitempty"`
4312 // Scopes: The list of Scopes
4313 Scopes []*Scope `json:"scopes,omitempty"`
4314
4315 // ServerResponse contains the HTTP response code and headers from the server.
4316 googleapi.ServerResponse `json:"-"`
4317 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
4318 // unconditionally include in API requests. By default, fields with empty or
4319 // default values are omitted from API requests. See
4320 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4321 // details.
4322 ForceSendFields []string `json:"-"`
4323 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
4324 // requests with the JSON null value. By default, fields with empty values are
4325 // omitted from API requests. See
4326 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4327 NullFields []string `json:"-"`
4328 }
4329
4330 func (s ListScopesResponse) MarshalJSON() ([]byte, error) {
4331 type NoMethod ListScopesResponse
4332 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4333 }
4334
4335 // Location: A resource that represents a Google Cloud location.
4336 type Location struct {
4337 // DisplayName: The friendly name for this location, typically a nearby city
4338 // name. For example, "Tokyo".
4339 DisplayName string `json:"displayName,omitempty"`
4340 // Labels: Cross-service attributes for the location. For example
4341 // {"cloud.googleapis.com/region": "us-east1"}
4342 Labels map[string]string `json:"labels,omitempty"`
4343 // LocationId: The canonical id for this location. For example: "us-east1".
4344 LocationId string `json:"locationId,omitempty"`
4345 // Metadata: Service-specific metadata. For example the available capacity at
4346 // the given location.
4347 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
4348 // Name: Resource name for the location, which may vary between
4349 // implementations. For example:
4350 // "projects/example-project/locations/us-east1"
4351 Name string `json:"name,omitempty"`
4352
4353 // ServerResponse contains the HTTP response code and headers from the server.
4354 googleapi.ServerResponse `json:"-"`
4355 // ForceSendFields is a list of field names (e.g. "DisplayName") to
4356 // unconditionally include in API requests. By default, fields with empty or
4357 // default values are omitted from API requests. See
4358 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4359 // details.
4360 ForceSendFields []string `json:"-"`
4361 // NullFields is a list of field names (e.g. "DisplayName") to include in API
4362 // requests with the JSON null value. By default, fields with empty values are
4363 // omitted from API requests. See
4364 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4365 NullFields []string `json:"-"`
4366 }
4367
4368 func (s Location) MarshalJSON() ([]byte, error) {
4369 type NoMethod Location
4370 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4371 }
4372
4373 // Membership: Membership contains information about a member cluster.
4374 type Membership struct {
4375 // Authority: Optional. How to identify workloads from this Membership. See the
4376 // documentation on Workload Identity for more details:
4377 // https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity
4378 Authority *Authority `json:"authority,omitempty"`
4379 // ClusterTier: Output only. The tier of the cluster.
4380 //
4381 // Possible values:
4382 // "CLUSTER_TIER_UNSPECIFIED" - The ClusterTier is not set.
4383 // "STANDARD" - The ClusterTier is standard.
4384 // "ENTERPRISE" - The ClusterTier is enterprise.
4385 ClusterTier string `json:"clusterTier,omitempty"`
4386 // CreateTime: Output only. When the Membership was created.
4387 CreateTime string `json:"createTime,omitempty"`
4388 // DeleteTime: Output only. When the Membership was deleted.
4389 DeleteTime string `json:"deleteTime,omitempty"`
4390 // Description: Output only. Description of this membership, limited to 63
4391 // characters. Must match the regex: `a-zA-Z0-9*` This field is present for
4392 // legacy purposes.
4393 Description string `json:"description,omitempty"`
4394 // Endpoint: Optional. Endpoint information to reach this member.
4395 Endpoint *MembershipEndpoint `json:"endpoint,omitempty"`
4396 // ExternalId: Optional. An externally-generated and managed ID for this
4397 // Membership. This ID may be modified after creation, but this is not
4398 // recommended. The ID must match the regex: `a-zA-Z0-9*` If this Membership
4399 // represents a Kubernetes cluster, this value should be set to the UID of the
4400 // `kube-system` namespace object.
4401 ExternalId string `json:"externalId,omitempty"`
4402 // Labels: Optional. Labels for this membership. These labels are not leveraged
4403 // by multi-cluster features, instead, we prefer cluster labels, which can be
4404 // set on GKE cluster or other cluster types.
4405 Labels map[string]string `json:"labels,omitempty"`
4406 // LastConnectionTime: Output only. For clusters using Connect, the timestamp
4407 // of the most recent connection established with Google Cloud. This time is
4408 // updated every several minutes, not continuously. For clusters that do not
4409 // use GKE Connect, or that have never connected successfully, this field will
4410 // be unset.
4411 LastConnectionTime string `json:"lastConnectionTime,omitempty"`
4412 // MembershipType: Output only. The type of the membership.
4413 //
4414 // Possible values:
4415 // "MEMBERSHIP_TYPE_UNSPECIFIED" - The MembershipType is not set.
4416 // "LIGHTWEIGHT" - The membership supports only lightweight compatible
4417 // features.
4418 MembershipType string `json:"membershipType,omitempty"`
4419 // MonitoringConfig: Optional. The monitoring config information for this
4420 // membership.
4421 MonitoringConfig *MonitoringConfig `json:"monitoringConfig,omitempty"`
4422 // Name: Output only. The full, unique name of this Membership resource in the
4423 // format `projects/*/locations/*/memberships/{membership_id}`, set during
4424 // creation. `membership_id` must be a valid RFC 1123 compliant DNS label: 1.
4425 // At most 63 characters in length 2. It must consist of lower case
4426 // alphanumeric characters or `-` 3. It must start and end with an alphanumeric
4427 // character Which can be expressed as the regex:
4428 // `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
4429 Name string `json:"name,omitempty"`
4430 // State: Output only. State of the Membership resource.
4431 State *MembershipState `json:"state,omitempty"`
4432 // UniqueId: Output only. Google-generated UUID for this resource. This is
4433 // unique across all Membership resources. If a Membership resource is deleted
4434 // and another resource with the same name is created, it gets a different
4435 // unique_id.
4436 UniqueId string `json:"uniqueId,omitempty"`
4437 // UpdateTime: Output only. When the Membership was last updated.
4438 UpdateTime string `json:"updateTime,omitempty"`
4439
4440 // ServerResponse contains the HTTP response code and headers from the server.
4441 googleapi.ServerResponse `json:"-"`
4442 // ForceSendFields is a list of field names (e.g. "Authority") to
4443 // unconditionally include in API requests. By default, fields with empty or
4444 // default values are omitted from API requests. See
4445 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4446 // details.
4447 ForceSendFields []string `json:"-"`
4448 // NullFields is a list of field names (e.g. "Authority") to include in API
4449 // requests with the JSON null value. By default, fields with empty values are
4450 // omitted from API requests. See
4451 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4452 NullFields []string `json:"-"`
4453 }
4454
4455 func (s Membership) MarshalJSON() ([]byte, error) {
4456 type NoMethod Membership
4457 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4458 }
4459
4460 // MembershipBinding: MembershipBinding is a subresource of a Membership,
4461 // representing what Fleet Scopes (or other, future Fleet resources) a
4462 // Membership is bound to.
4463 type MembershipBinding struct {
4464 // CreateTime: Output only. When the membership binding was created.
4465 CreateTime string `json:"createTime,omitempty"`
4466 // DeleteTime: Output only. When the membership binding was deleted.
4467 DeleteTime string `json:"deleteTime,omitempty"`
4468 // Labels: Optional. Labels for this MembershipBinding.
4469 Labels map[string]string `json:"labels,omitempty"`
4470 // Name: The resource name for the membershipbinding itself
4471 // `projects/{project}/locations/{location}/memberships/{membership}/bindings/{m
4472 // embershipbinding}`
4473 Name string `json:"name,omitempty"`
4474 // Scope: A Scope resource name in the format
4475 // `projects/*/locations/*/scopes/*`.
4476 Scope string `json:"scope,omitempty"`
4477 // State: Output only. State of the membership binding resource.
4478 State *MembershipBindingLifecycleState `json:"state,omitempty"`
4479 // Uid: Output only. Google-generated UUID for this resource. This is unique
4480 // across all membershipbinding resources. If a membershipbinding resource is
4481 // deleted and another resource with the same name is created, it gets a
4482 // different uid.
4483 Uid string `json:"uid,omitempty"`
4484 // UpdateTime: Output only. When the membership binding was last updated.
4485 UpdateTime string `json:"updateTime,omitempty"`
4486
4487 // ServerResponse contains the HTTP response code and headers from the server.
4488 googleapi.ServerResponse `json:"-"`
4489 // ForceSendFields is a list of field names (e.g. "CreateTime") to
4490 // unconditionally include in API requests. By default, fields with empty or
4491 // default values are omitted from API requests. See
4492 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4493 // details.
4494 ForceSendFields []string `json:"-"`
4495 // NullFields is a list of field names (e.g. "CreateTime") to include in API
4496 // requests with the JSON null value. By default, fields with empty values are
4497 // omitted from API requests. See
4498 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4499 NullFields []string `json:"-"`
4500 }
4501
4502 func (s MembershipBinding) MarshalJSON() ([]byte, error) {
4503 type NoMethod MembershipBinding
4504 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4505 }
4506
4507 // MembershipBindingLifecycleState: MembershipBindingLifecycleState describes
4508 // the state of a Binding resource.
4509 type MembershipBindingLifecycleState struct {
4510 // Code: Output only. The current state of the MembershipBinding resource.
4511 //
4512 // Possible values:
4513 // "CODE_UNSPECIFIED" - The code is not set.
4514 // "CREATING" - The membershipbinding is being created.
4515 // "READY" - The membershipbinding active.
4516 // "DELETING" - The membershipbinding is being deleted.
4517 // "UPDATING" - The membershipbinding is being updated.
4518 Code string `json:"code,omitempty"`
4519 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
4520 // include in API requests. By default, fields with empty or default values are
4521 // omitted from API requests. See
4522 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4523 // details.
4524 ForceSendFields []string `json:"-"`
4525 // NullFields is a list of field names (e.g. "Code") to include in API requests
4526 // with the JSON null value. By default, fields with empty values are omitted
4527 // from API requests. See
4528 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4529 NullFields []string `json:"-"`
4530 }
4531
4532 func (s MembershipBindingLifecycleState) MarshalJSON() ([]byte, error) {
4533 type NoMethod MembershipBindingLifecycleState
4534 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4535 }
4536
4537 // MembershipEndpoint: MembershipEndpoint contains information needed to
4538 // contact a Kubernetes API, endpoint and any additional Kubernetes metadata.
4539 type MembershipEndpoint struct {
4540 // ApplianceCluster: Optional. Specific information for a GDC Edge Appliance
4541 // cluster.
4542 ApplianceCluster *ApplianceCluster `json:"applianceCluster,omitempty"`
4543 // EdgeCluster: Optional. Specific information for a Google Edge cluster.
4544 EdgeCluster *EdgeCluster `json:"edgeCluster,omitempty"`
4545 // GkeCluster: Optional. Specific information for a GKE on Google Cloud
4546 // cluster.
4547 GkeCluster *GkeCluster `json:"gkeCluster,omitempty"`
4548 // GoogleManaged: Output only. Whether the lifecycle of this membership is
4549 // managed by a google cluster platform service.
4550 GoogleManaged bool `json:"googleManaged,omitempty"`
4551 // KubernetesMetadata: Output only. Useful Kubernetes-specific metadata.
4552 KubernetesMetadata *KubernetesMetadata `json:"kubernetesMetadata,omitempty"`
4553 // KubernetesResource: Optional. The in-cluster Kubernetes Resources that
4554 // should be applied for a correctly registered cluster, in the steady state.
4555 // These resources: * Ensure that the cluster is exclusively registered to one
4556 // and only one Hub Membership. * Propagate Workload Pool Information available
4557 // in the Membership Authority field. * Ensure proper initial configuration of
4558 // default Hub Features.
4559 KubernetesResource *KubernetesResource `json:"kubernetesResource,omitempty"`
4560 // MultiCloudCluster: Optional. Specific information for a GKE Multi-Cloud
4561 // cluster.
4562 MultiCloudCluster *MultiCloudCluster `json:"multiCloudCluster,omitempty"`
4563 // OnPremCluster: Optional. Specific information for a GKE On-Prem cluster. An
4564 // onprem user-cluster who has no resourceLink is not allowed to use this
4565 // field, it should have a nil "type" instead.
4566 OnPremCluster *OnPremCluster `json:"onPremCluster,omitempty"`
4567 // ForceSendFields is a list of field names (e.g. "ApplianceCluster") to
4568 // unconditionally include in API requests. By default, fields with empty or
4569 // default values are omitted from API requests. See
4570 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4571 // details.
4572 ForceSendFields []string `json:"-"`
4573 // NullFields is a list of field names (e.g. "ApplianceCluster") to include in
4574 // API requests with the JSON null value. By default, fields with empty values
4575 // are omitted from API requests. See
4576 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4577 NullFields []string `json:"-"`
4578 }
4579
4580 func (s MembershipEndpoint) MarshalJSON() ([]byte, error) {
4581 type NoMethod MembershipEndpoint
4582 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4583 }
4584
4585 // MembershipFeatureSpec: MembershipFeatureSpec contains configuration
4586 // information for a single Membership.
4587 type MembershipFeatureSpec struct {
4588 // Cloudbuild: Cloud Build-specific spec
4589 Cloudbuild *CloudBuildMembershipSpec `json:"cloudbuild,omitempty"`
4590 // Configmanagement: Config Management-specific spec.
4591 Configmanagement *ConfigManagementMembershipSpec `json:"configmanagement,omitempty"`
4592 // Fleetobservability: Fleet observability membership spec
4593 Fleetobservability *FleetObservabilityMembershipSpec `json:"fleetobservability,omitempty"`
4594 // Identityservice: Identity Service-specific spec.
4595 Identityservice *IdentityServiceMembershipSpec `json:"identityservice,omitempty"`
4596 // Mesh: Anthos Service Mesh-specific spec
4597 Mesh *ServiceMeshMembershipSpec `json:"mesh,omitempty"`
4598 // Namespaceactuation: FNS Actuation membership spec
4599 Namespaceactuation *NamespaceActuationMembershipSpec `json:"namespaceactuation,omitempty"`
4600 // Origin: Whether this per-Membership spec was inherited from a fleet-level
4601 // default. This field can be updated by users by either overriding a
4602 // Membership config (updated to USER implicitly) or setting to FLEET
4603 // explicitly.
4604 Origin *Origin `json:"origin,omitempty"`
4605 // Policycontroller: Policy Controller spec.
4606 Policycontroller *PolicyControllerMembershipSpec `json:"policycontroller,omitempty"`
4607 // Workloadcertificate: Workload Certificate spec.
4608 Workloadcertificate *MembershipSpec `json:"workloadcertificate,omitempty"`
4609 // ForceSendFields is a list of field names (e.g. "Cloudbuild") to
4610 // unconditionally include in API requests. By default, fields with empty or
4611 // default values are 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. "Cloudbuild") 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 MembershipFeatureSpec) MarshalJSON() ([]byte, error) {
4623 type NoMethod MembershipFeatureSpec
4624 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4625 }
4626
4627 // MembershipFeatureState: MembershipFeatureState contains Feature status
4628 // information for a single Membership.
4629 type MembershipFeatureState struct {
4630 // Appdevexperience: Appdevexperience specific state.
4631 Appdevexperience *AppDevExperienceFeatureState `json:"appdevexperience,omitempty"`
4632 // Clusterupgrade: ClusterUpgrade state.
4633 Clusterupgrade *ClusterUpgradeMembershipState `json:"clusterupgrade,omitempty"`
4634 // Configmanagement: Config Management-specific state.
4635 Configmanagement *ConfigManagementMembershipState `json:"configmanagement,omitempty"`
4636 // Fleetobservability: Fleet observability membership state.
4637 Fleetobservability *FleetObservabilityMembershipState `json:"fleetobservability,omitempty"`
4638 // Identityservice: Identity Service-specific state.
4639 Identityservice *IdentityServiceMembershipState `json:"identityservice,omitempty"`
4640 // Metering: Metering-specific state.
4641 Metering *MeteringMembershipState `json:"metering,omitempty"`
4642 // Namespaceactuation: FNS Actuation membership state
4643 Namespaceactuation *NamespaceActuationMembershipState `json:"namespaceactuation,omitempty"`
4644 // Policycontroller: Policycontroller-specific state.
4645 Policycontroller *PolicyControllerMembershipState `json:"policycontroller,omitempty"`
4646 // Servicemesh: Service Mesh-specific state.
4647 Servicemesh *ServiceMeshMembershipState `json:"servicemesh,omitempty"`
4648 // State: The high-level state of this Feature for a single membership.
4649 State *FeatureState `json:"state,omitempty"`
4650 // Workloadidentity: Workload Identity membership specific state.
4651 Workloadidentity *WorkloadIdentityMembershipState `json:"workloadidentity,omitempty"`
4652 // ForceSendFields is a list of field names (e.g. "Appdevexperience") to
4653 // unconditionally include in API requests. By default, fields with empty or
4654 // default values are omitted from API requests. See
4655 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4656 // details.
4657 ForceSendFields []string `json:"-"`
4658 // NullFields is a list of field names (e.g. "Appdevexperience") to include in
4659 // API requests with the JSON null value. By default, fields with empty values
4660 // are omitted from API requests. See
4661 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4662 NullFields []string `json:"-"`
4663 }
4664
4665 func (s MembershipFeatureState) MarshalJSON() ([]byte, error) {
4666 type NoMethod MembershipFeatureState
4667 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4668 }
4669
4670 // MembershipSpec: **Workload Certificate**: The membership-specific input for
4671 // WorkloadCertificate feature.
4672 type MembershipSpec struct {
4673 // CertificateManagement: Specifies workload certificate management.
4674 //
4675 // Possible values:
4676 // "CERTIFICATE_MANAGEMENT_UNSPECIFIED" - Disable workload certificate
4677 // feature.
4678 // "DISABLED" - Disable workload certificate feature.
4679 // "ENABLED" - Enable workload certificate feature.
4680 CertificateManagement string `json:"certificateManagement,omitempty"`
4681 // ForceSendFields is a list of field names (e.g. "CertificateManagement") to
4682 // unconditionally include in API requests. By default, fields with empty or
4683 // default values are omitted from API requests. See
4684 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4685 // details.
4686 ForceSendFields []string `json:"-"`
4687 // NullFields is a list of field names (e.g. "CertificateManagement") to
4688 // include in API requests with the JSON null value. By default, fields with
4689 // empty values are omitted from API requests. See
4690 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4691 NullFields []string `json:"-"`
4692 }
4693
4694 func (s MembershipSpec) MarshalJSON() ([]byte, error) {
4695 type NoMethod MembershipSpec
4696 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4697 }
4698
4699 // MembershipState: MembershipState describes the state of a Membership
4700 // resource.
4701 type MembershipState struct {
4702 // Code: Output only. The current state of the Membership resource.
4703 //
4704 // Possible values:
4705 // "CODE_UNSPECIFIED" - The code is not set.
4706 // "CREATING" - The cluster is being registered.
4707 // "READY" - The cluster is registered.
4708 // "DELETING" - The cluster is being unregistered.
4709 // "UPDATING" - The Membership is being updated.
4710 // "SERVICE_UPDATING" - The Membership is being updated by the Hub Service.
4711 Code string `json:"code,omitempty"`
4712 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
4713 // include in API requests. By default, fields with empty or default values are
4714 // omitted from API requests. See
4715 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4716 // details.
4717 ForceSendFields []string `json:"-"`
4718 // NullFields is a list of field names (e.g. "Code") to include in API requests
4719 // with the JSON null value. By default, fields with empty values are omitted
4720 // from API requests. See
4721 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4722 NullFields []string `json:"-"`
4723 }
4724
4725 func (s MembershipState) MarshalJSON() ([]byte, error) {
4726 type NoMethod MembershipState
4727 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4728 }
4729
4730 // MeteringMembershipState: **Metering**: Per-Membership Feature State.
4731 type MeteringMembershipState struct {
4732 // LastMeasurementTime: The time stamp of the most recent measurement of the
4733 // number of vCPUs in the cluster.
4734 LastMeasurementTime string `json:"lastMeasurementTime,omitempty"`
4735 // PreciseLastMeasuredClusterVcpuCapacity: The vCPUs capacity in the cluster
4736 // according to the most recent measurement (1/1000 precision).
4737 PreciseLastMeasuredClusterVcpuCapacity float64 `json:"preciseLastMeasuredClusterVcpuCapacity,omitempty"`
4738 // ForceSendFields is a list of field names (e.g. "LastMeasurementTime") to
4739 // unconditionally include in API requests. By default, fields with empty or
4740 // default values are omitted from API requests. See
4741 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4742 // details.
4743 ForceSendFields []string `json:"-"`
4744 // NullFields is a list of field names (e.g. "LastMeasurementTime") to include
4745 // in API requests with the JSON null value. By default, fields with empty
4746 // values are omitted from API requests. See
4747 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4748 NullFields []string `json:"-"`
4749 }
4750
4751 func (s MeteringMembershipState) MarshalJSON() ([]byte, error) {
4752 type NoMethod MeteringMembershipState
4753 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4754 }
4755
4756 func (s *MeteringMembershipState) UnmarshalJSON(data []byte) error {
4757 type NoMethod MeteringMembershipState
4758 var s1 struct {
4759 PreciseLastMeasuredClusterVcpuCapacity gensupport.JSONFloat64 `json:"preciseLastMeasuredClusterVcpuCapacity"`
4760 *NoMethod
4761 }
4762 s1.NoMethod = (*NoMethod)(s)
4763 if err := json.Unmarshal(data, &s1); err != nil {
4764 return err
4765 }
4766 s.PreciseLastMeasuredClusterVcpuCapacity = float64(s1.PreciseLastMeasuredClusterVcpuCapacity)
4767 return nil
4768 }
4769
4770 // MonitoringConfig: MonitoringConfig informs Fleet-based
4771 // applications/services/UIs how the metrics for the underlying cluster is
4772 // reported to cloud monitoring services. It can be set from empty to
4773 // non-empty, but can't be mutated directly to prevent accidentally breaking
4774 // the constinousty of metrics.
4775 type MonitoringConfig struct {
4776 // Cluster: Optional. Cluster name used to report metrics. For Anthos on
4777 // VMWare/Baremetal/MultiCloud clusters, it would be in format
4778 // {cluster_type}/{cluster_name}, e.g., "awsClusters/cluster_1".
4779 Cluster string `json:"cluster,omitempty"`
4780 // ClusterHash: Optional. For GKE and Multicloud clusters, this is the UUID of
4781 // the cluster resource. For VMWare and Baremetal clusters, this is the
4782 // kube-system UID.
4783 ClusterHash string `json:"clusterHash,omitempty"`
4784 // KubernetesMetricsPrefix: Optional. Kubernetes system metrics, if available,
4785 // are written to this prefix. This defaults to kubernetes.io for GKE, and
4786 // kubernetes.io/anthos for Anthos eventually. Noted: Anthos MultiCloud will
4787 // have kubernetes.io prefix today but will migration to be under
4788 // kubernetes.io/anthos.
4789 KubernetesMetricsPrefix string `json:"kubernetesMetricsPrefix,omitempty"`
4790 // Location: Optional. Location used to report Metrics
4791 Location string `json:"location,omitempty"`
4792 // ProjectId: Optional. Project used to report Metrics
4793 ProjectId string `json:"projectId,omitempty"`
4794 // ForceSendFields is a list of field names (e.g. "Cluster") to unconditionally
4795 // include in API requests. By default, fields with empty or default values are
4796 // omitted from API requests. See
4797 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4798 // details.
4799 ForceSendFields []string `json:"-"`
4800 // NullFields is a list of field names (e.g. "Cluster") to include in API
4801 // requests with the JSON null value. By default, fields with empty values are
4802 // omitted from API requests. See
4803 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4804 NullFields []string `json:"-"`
4805 }
4806
4807 func (s MonitoringConfig) MarshalJSON() ([]byte, error) {
4808 type NoMethod MonitoringConfig
4809 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4810 }
4811
4812 // MultiCloudCluster: MultiCloudCluster contains information specific to GKE
4813 // Multi-Cloud clusters.
4814 type MultiCloudCluster struct {
4815 // ClusterMissing: Output only. If cluster_missing is set then it denotes that
4816 // API(gkemulticloud.googleapis.com) resource for this GKE Multi-Cloud cluster
4817 // no longer exists.
4818 ClusterMissing bool `json:"clusterMissing,omitempty"`
4819 // ResourceLink: Immutable. Self-link of the Google Cloud resource for the GKE
4820 // Multi-Cloud cluster. For example:
4821 // //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/awsCl
4822 // usters/my-cluster
4823 // //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/azure
4824 // Clusters/my-cluster
4825 // //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/attac
4826 // hedClusters/my-cluster
4827 ResourceLink string `json:"resourceLink,omitempty"`
4828 // ForceSendFields is a list of field names (e.g. "ClusterMissing") to
4829 // unconditionally include in API requests. By default, fields with empty or
4830 // default values are omitted from API requests. See
4831 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4832 // details.
4833 ForceSendFields []string `json:"-"`
4834 // NullFields is a list of field names (e.g. "ClusterMissing") to include in
4835 // API requests with the JSON null value. By default, fields with empty values
4836 // are omitted from API requests. See
4837 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4838 NullFields []string `json:"-"`
4839 }
4840
4841 func (s MultiCloudCluster) MarshalJSON() ([]byte, error) {
4842 type NoMethod MultiCloudCluster
4843 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4844 }
4845
4846 // MultiClusterIngressFeatureSpec: **Multi-cluster Ingress**: The configuration
4847 // for the MultiClusterIngress feature.
4848 type MultiClusterIngressFeatureSpec struct {
4849 // Billing: Deprecated: This field will be ignored and should not be set.
4850 // Customer's billing structure.
4851 //
4852 // Possible values:
4853 // "BILLING_UNSPECIFIED" - Unknown
4854 // "PAY_AS_YOU_GO" - User pays a fee per-endpoint.
4855 // "ANTHOS_LICENSE" - User is paying for Anthos as a whole.
4856 Billing string `json:"billing,omitempty"`
4857 // ConfigMembership: Fully-qualified Membership name which hosts the
4858 // MultiClusterIngress CRD. Example:
4859 // `projects/foo-proj/locations/global/memberships/bar`
4860 ConfigMembership string `json:"configMembership,omitempty"`
4861 // ForceSendFields is a list of field names (e.g. "Billing") to unconditionally
4862 // include in API requests. By default, fields with empty or default values are
4863 // omitted from API requests. See
4864 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4865 // details.
4866 ForceSendFields []string `json:"-"`
4867 // NullFields is a list of field names (e.g. "Billing") to include in API
4868 // requests with the JSON null value. By default, fields with empty values are
4869 // omitted from API requests. See
4870 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4871 NullFields []string `json:"-"`
4872 }
4873
4874 func (s MultiClusterIngressFeatureSpec) MarshalJSON() ([]byte, error) {
4875 type NoMethod MultiClusterIngressFeatureSpec
4876 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4877 }
4878
4879 // Namespace: Namespace represents a namespace across the Fleet
4880 type Namespace struct {
4881 // CreateTime: Output only. When the namespace was created.
4882 CreateTime string `json:"createTime,omitempty"`
4883 // DeleteTime: Output only. When the namespace was deleted.
4884 DeleteTime string `json:"deleteTime,omitempty"`
4885 // Labels: Optional. Labels for this Namespace.
4886 Labels map[string]string `json:"labels,omitempty"`
4887 // Name: The resource name for the namespace
4888 // `projects/{project}/locations/{location}/namespaces/{namespace}`
4889 Name string `json:"name,omitempty"`
4890 // NamespaceLabels: Optional. Namespace-level cluster namespace labels. These
4891 // labels are applied to the related namespace of the member clusters bound to
4892 // the parent Scope. Scope-level labels (`namespace_labels` in the Fleet Scope
4893 // resource) take precedence over Namespace-level labels if they share a key.
4894 // Keys and values must be Kubernetes-conformant.
4895 NamespaceLabels map[string]string `json:"namespaceLabels,omitempty"`
4896 // Scope: Required. Scope associated with the namespace
4897 Scope string `json:"scope,omitempty"`
4898 // State: Output only. State of the namespace resource.
4899 State *NamespaceLifecycleState `json:"state,omitempty"`
4900 // Uid: Output only. Google-generated UUID for this resource. This is unique
4901 // across all namespace resources. If a namespace resource is deleted and
4902 // another resource with the same name is created, it gets a different uid.
4903 Uid string `json:"uid,omitempty"`
4904 // UpdateTime: Output only. When the namespace was last updated.
4905 UpdateTime string `json:"updateTime,omitempty"`
4906
4907 // ServerResponse contains the HTTP response code and headers from the server.
4908 googleapi.ServerResponse `json:"-"`
4909 // ForceSendFields is a list of field names (e.g. "CreateTime") to
4910 // unconditionally include in API requests. By default, fields with empty or
4911 // default values are omitted from API requests. See
4912 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4913 // details.
4914 ForceSendFields []string `json:"-"`
4915 // NullFields is a list of field names (e.g. "CreateTime") to include in API
4916 // requests with the JSON null value. By default, fields with empty values are
4917 // omitted from API requests. See
4918 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4919 NullFields []string `json:"-"`
4920 }
4921
4922 func (s Namespace) MarshalJSON() ([]byte, error) {
4923 type NoMethod Namespace
4924 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4925 }
4926
4927 // NamespaceActuationFeatureSpec: An empty spec for actuation feature. This is
4928 // required since Feature proto requires a spec.
4929 type NamespaceActuationFeatureSpec struct {
4930 // ActuationMode: actuation_mode controls the behavior of the controller
4931 //
4932 // Possible values:
4933 // "ACTUATION_MODE_UNSPECIFIED" - ACTUATION_MODE_UNSPECIFIED is similar to
4934 // CREATE_AND_DELETE_IF_CREATED in the default controller behavior.
4935 // "ACTUATION_MODE_CREATE_AND_DELETE_IF_CREATED" -
4936 // ACTUATION_MODE_CREATE_AND_DELETE_IF_CREATED has the controller create
4937 // cluster namespaces for each fleet namespace and it deletes only the ones it
4938 // created, which are identified by a label.
4939 // "ACTUATION_MODE_ADD_AND_REMOVE_FLEET_LABELS" -
4940 // ACTUATION_MODE_ADD_AND_REMOVE_FLEET_LABELS has the controller only apply
4941 // labels to cluster namespaces to signal fleet namespace enablement. It
4942 // doesn't create or delete cluster namespaces.
4943 ActuationMode string `json:"actuationMode,omitempty"`
4944 // ForceSendFields is a list of field names (e.g. "ActuationMode") to
4945 // unconditionally include in API requests. By default, fields with empty or
4946 // default values are omitted from API requests. See
4947 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4948 // details.
4949 ForceSendFields []string `json:"-"`
4950 // NullFields is a list of field names (e.g. "ActuationMode") to include in API
4951 // requests with the JSON null value. By default, fields with empty values are
4952 // omitted from API requests. See
4953 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4954 NullFields []string `json:"-"`
4955 }
4956
4957 func (s NamespaceActuationFeatureSpec) MarshalJSON() ([]byte, error) {
4958 type NoMethod NamespaceActuationFeatureSpec
4959 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4960 }
4961
4962 // NamespaceActuationFeatureState: NamespaceActuation Feature State.
4963 type NamespaceActuationFeatureState struct {
4964 }
4965
4966 // NamespaceActuationMembershipSpec: **Namespace Actuation**: The
4967 // membership-specific input for NamespaceActuation feature.
4968 type NamespaceActuationMembershipSpec struct {
4969 }
4970
4971 // NamespaceActuationMembershipState: **Namespace Actuation**: An empty state
4972 // left as an example membership-specific Feature state.
4973 type NamespaceActuationMembershipState struct {
4974 }
4975
4976 // NamespaceLifecycleState: NamespaceLifecycleState describes the state of a
4977 // Namespace resource.
4978 type NamespaceLifecycleState struct {
4979 // Code: Output only. The current state of the Namespace resource.
4980 //
4981 // Possible values:
4982 // "CODE_UNSPECIFIED" - The code is not set.
4983 // "CREATING" - The namespace is being created.
4984 // "READY" - The namespace active.
4985 // "DELETING" - The namespace is being deleted.
4986 // "UPDATING" - The namespace is being updated.
4987 Code string `json:"code,omitempty"`
4988 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
4989 // include in API requests. By default, fields with empty or default values are
4990 // omitted from API requests. See
4991 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4992 // details.
4993 ForceSendFields []string `json:"-"`
4994 // NullFields is a list of field names (e.g. "Code") to include in API requests
4995 // with the JSON null value. By default, fields with empty values are omitted
4996 // from API requests. See
4997 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4998 NullFields []string `json:"-"`
4999 }
5000
5001 func (s NamespaceLifecycleState) MarshalJSON() ([]byte, error) {
5002 type NoMethod NamespaceLifecycleState
5003 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5004 }
5005
5006 // OnPremCluster: OnPremCluster contains information specific to GKE On-Prem
5007 // clusters.
5008 type OnPremCluster struct {
5009 // AdminCluster: Immutable. Whether the cluster is an admin cluster.
5010 AdminCluster bool `json:"adminCluster,omitempty"`
5011 // ClusterMissing: Output only. If cluster_missing is set then it denotes that
5012 // API(gkeonprem.googleapis.com) resource for this GKE On-Prem cluster no
5013 // longer exists.
5014 ClusterMissing bool `json:"clusterMissing,omitempty"`
5015 // ClusterType: Immutable. The on prem cluster's type.
5016 //
5017 // Possible values:
5018 // "CLUSTERTYPE_UNSPECIFIED" - The ClusterType is not set.
5019 // "BOOTSTRAP" - The ClusterType is bootstrap cluster.
5020 // "HYBRID" - The ClusterType is baremetal hybrid cluster.
5021 // "STANDALONE" - The ClusterType is baremetal standalone cluster.
5022 // "USER" - The ClusterType is user cluster.
5023 ClusterType string `json:"clusterType,omitempty"`
5024 // ResourceLink: Immutable. Self-link of the Google Cloud resource for the GKE
5025 // On-Prem cluster. For example:
5026 // //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/vmwareClu
5027 // sters/my-cluster
5028 // //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/bareMetal
5029 // Clusters/my-cluster
5030 ResourceLink string `json:"resourceLink,omitempty"`
5031 // ForceSendFields is a list of field names (e.g. "AdminCluster") to
5032 // unconditionally include in API requests. By default, fields with empty or
5033 // default values are omitted from API requests. See
5034 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5035 // details.
5036 ForceSendFields []string `json:"-"`
5037 // NullFields is a list of field names (e.g. "AdminCluster") to include in API
5038 // requests with the JSON null value. By default, fields with empty values are
5039 // omitted from API requests. See
5040 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5041 NullFields []string `json:"-"`
5042 }
5043
5044 func (s OnPremCluster) MarshalJSON() ([]byte, error) {
5045 type NoMethod OnPremCluster
5046 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5047 }
5048
5049 // Operation: This resource represents a long-running operation that is the
5050 // result of a network API call.
5051 type Operation struct {
5052 // Done: If the value is `false`, it means the operation is still in progress.
5053 // If `true`, the operation is completed, and either `error` or `response` is
5054 // available.
5055 Done bool `json:"done,omitempty"`
5056 // Error: The error result of the operation in case of failure or cancellation.
5057 Error *GoogleRpcStatus `json:"error,omitempty"`
5058 // Metadata: Service-specific metadata associated with the operation. It
5059 // typically contains progress information and common metadata such as create
5060 // time. Some services might not provide such metadata. Any method that returns
5061 // a long-running operation should document the metadata type, if any.
5062 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
5063 // Name: The server-assigned name, which is only unique within the same service
5064 // that originally returns it. If you use the default HTTP mapping, the `name`
5065 // should be a resource name ending with `operations/{unique_id}`.
5066 Name string `json:"name,omitempty"`
5067 // Response: The normal, successful response of the operation. If the original
5068 // method returns no data on success, such as `Delete`, the response is
5069 // `google.protobuf.Empty`. If the original method is standard
5070 // `Get`/`Create`/`Update`, the response should be the resource. For other
5071 // methods, the response should have the type `XxxResponse`, where `Xxx` is the
5072 // original method name. For example, if the original method name is
5073 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
5074 Response googleapi.RawMessage `json:"response,omitempty"`
5075
5076 // ServerResponse contains the HTTP response code and headers from the server.
5077 googleapi.ServerResponse `json:"-"`
5078 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally
5079 // include in API requests. By default, fields with empty or default values are
5080 // omitted from API requests. See
5081 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5082 // details.
5083 ForceSendFields []string `json:"-"`
5084 // NullFields is a list of field names (e.g. "Done") to include in API requests
5085 // with the JSON null value. By default, fields with empty values are omitted
5086 // from API requests. See
5087 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5088 NullFields []string `json:"-"`
5089 }
5090
5091 func (s Operation) MarshalJSON() ([]byte, error) {
5092 type NoMethod Operation
5093 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5094 }
5095
5096 // OperationMetadata: Represents the metadata of the long-running operation.
5097 type OperationMetadata struct {
5098 // ApiVersion: Output only. API version used to start the operation.
5099 ApiVersion string `json:"apiVersion,omitempty"`
5100 // CancelRequested: Output only. Identifies whether the user has requested
5101 // cancellation of the operation. Operations that have successfully been
5102 // cancelled have google.longrunning.Operation.error value with a
5103 // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
5104 CancelRequested bool `json:"cancelRequested,omitempty"`
5105 // CreateTime: Output only. The time the operation was created.
5106 CreateTime string `json:"createTime,omitempty"`
5107 // EndTime: Output only. The time the operation finished running.
5108 EndTime string `json:"endTime,omitempty"`
5109 // StatusDetail: Output only. Human-readable status of the operation, if any.
5110 StatusDetail string `json:"statusDetail,omitempty"`
5111 // Target: Output only. Server-defined resource path for the target of the
5112 // operation.
5113 Target string `json:"target,omitempty"`
5114 // Verb: Output only. Name of the verb executed by the operation.
5115 Verb string `json:"verb,omitempty"`
5116 // ForceSendFields is a list of field names (e.g. "ApiVersion") to
5117 // unconditionally include in API requests. By default, fields with empty or
5118 // default values are omitted from API requests. See
5119 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5120 // details.
5121 ForceSendFields []string `json:"-"`
5122 // NullFields is a list of field names (e.g. "ApiVersion") to include in API
5123 // requests with the JSON null value. By default, fields with empty values are
5124 // omitted from API requests. See
5125 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5126 NullFields []string `json:"-"`
5127 }
5128
5129 func (s OperationMetadata) MarshalJSON() ([]byte, error) {
5130 type NoMethod OperationMetadata
5131 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5132 }
5133
5134 // Origin: Origin defines where this MembershipFeatureSpec originated from.
5135 type Origin struct {
5136 // Type: Type specifies which type of origin is set.
5137 //
5138 // Possible values:
5139 // "TYPE_UNSPECIFIED" - Type is unknown or not set.
5140 // "FLEET" - Per-Membership spec was inherited from the fleet-level default.
5141 // "FLEET_OUT_OF_SYNC" - Per-Membership spec was inherited from the
5142 // fleet-level default but is now out of sync with the current default.
5143 // "USER" - Per-Membership spec was inherited from a user specification.
5144 Type string `json:"type,omitempty"`
5145 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally
5146 // include in API requests. By default, fields with empty or default values are
5147 // omitted from API requests. See
5148 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5149 // details.
5150 ForceSendFields []string `json:"-"`
5151 // NullFields is a list of field names (e.g. "Type") to include in API requests
5152 // with the JSON null value. By default, fields with empty values are omitted
5153 // from API requests. See
5154 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5155 NullFields []string `json:"-"`
5156 }
5157
5158 func (s Origin) MarshalJSON() ([]byte, error) {
5159 type NoMethod Origin
5160 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5161 }
5162
5163 // Policy: An Identity and Access Management (IAM) policy, which specifies
5164 // access controls for Google Cloud resources. A `Policy` is a collection of
5165 // `bindings`. A `binding` binds one or more `members`, or principals, to a
5166 // single `role`. Principals can be user accounts, service accounts, Google
5167 // groups, and domains (such as G Suite). A `role` is a named list of
5168 // permissions; each `role` can be an IAM predefined role or a user-created
5169 // custom role. For some types of Google Cloud resources, a `binding` can also
5170 // specify a `condition`, which is a logical expression that allows access to a
5171 // resource only if the expression evaluates to `true`. A condition can add
5172 // constraints based on attributes of the request, the resource, or both. To
5173 // learn which resources support conditions in their IAM policies, see the IAM
5174 // documentation
5175 // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
5176 // example:** ``` { "bindings": [ { "role":
5177 // "roles/resourcemanager.organizationAdmin", "members": [
5178 // "user:[email protected]", "group:[email protected]", "domain:google.com",
5179 // "serviceAccount:[email protected]" ] }, { "role":
5180 // "roles/resourcemanager.organizationViewer", "members": [
5181 // "user:[email protected]" ], "condition": { "title": "expirable access",
5182 // "description": "Does not grant access after Sep 2020", "expression":
5183 // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
5184 // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
5185 // members: - user:[email protected] - group:[email protected] -
5186 // domain:google.com - serviceAccount:[email protected]
5187 // role: roles/resourcemanager.organizationAdmin - members: -
5188 // user:[email protected] role: roles/resourcemanager.organizationViewer
5189 // condition: title: expirable access description: Does not grant access after
5190 // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
5191 // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
5192 // see the IAM documentation (https://cloud.google.com/iam/docs/).
5193 type Policy struct {
5194 // AuditConfigs: Specifies cloud audit logging configuration for this policy.
5195 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
5196 // Bindings: Associates a list of `members`, or principals, with a `role`.
5197 // Optionally, may specify a `condition` that determines how and when the
5198 // `bindings` are applied. Each of the `bindings` must contain at least one
5199 // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
5200 // up to 250 of these principals can be Google groups. Each occurrence of a
5201 // principal counts towards these limits. For example, if the `bindings` grant
5202 // 50 different roles to `user:[email protected]`, and not to any other
5203 // principal, then you can add another 1,450 principals to the `bindings` in
5204 // the `Policy`.
5205 Bindings []*Binding `json:"bindings,omitempty"`
5206 // Etag: `etag` is used for optimistic concurrency control as a way to help
5207 // prevent simultaneous updates of a policy from overwriting each other. It is
5208 // strongly suggested that systems make use of the `etag` in the
5209 // read-modify-write cycle to perform policy updates in order to avoid race
5210 // conditions: An `etag` is returned in the response to `getIamPolicy`, and
5211 // systems are expected to put that etag in the request to `setIamPolicy` to
5212 // ensure that their change will be applied to the same version of the policy.
5213 // **Important:** If you use IAM Conditions, you must include the `etag` field
5214 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows
5215 // you to overwrite a version `3` policy with a version `1` policy, and all of
5216 // the conditions in the version `3` policy are lost.
5217 Etag string `json:"etag,omitempty"`
5218 // Version: Specifies the format of the policy. Valid values are `0`, `1`, and
5219 // `3`. Requests that specify an invalid value are rejected. Any operation that
5220 // affects conditional role bindings must specify version `3`. This requirement
5221 // applies to the following operations: * Getting a policy that includes a
5222 // conditional role binding * Adding a conditional role binding to a policy *
5223 // Changing a conditional role binding in a policy * Removing any role binding,
5224 // with or without a condition, from a policy that includes conditions
5225 // **Important:** If you use IAM Conditions, you must include the `etag` field
5226 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows
5227 // you to overwrite a version `3` policy with a version `1` policy, and all of
5228 // the conditions in the version `3` policy are lost. If a policy does not
5229 // include any conditions, operations on that policy may specify any valid
5230 // version or leave the field unset. To learn which resources support
5231 // conditions in their IAM policies, see the IAM documentation
5232 // (https://cloud.google.com/iam/help/conditions/resource-policies).
5233 Version int64 `json:"version,omitempty"`
5234
5235 // ServerResponse contains the HTTP response code and headers from the server.
5236 googleapi.ServerResponse `json:"-"`
5237 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to
5238 // unconditionally include in API requests. By default, fields with empty or
5239 // default values are omitted from API requests. See
5240 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5241 // details.
5242 ForceSendFields []string `json:"-"`
5243 // NullFields is a list of field names (e.g. "AuditConfigs") to include in API
5244 // requests with the JSON null value. By default, fields with empty values are
5245 // omitted from API requests. See
5246 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5247 NullFields []string `json:"-"`
5248 }
5249
5250 func (s Policy) MarshalJSON() ([]byte, error) {
5251 type NoMethod Policy
5252 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5253 }
5254
5255 // PolicyBinding: Binauthz policy that applies to this cluster.
5256 type PolicyBinding struct {
5257 // Name: The relative resource name of the binauthz platform policy to audit.
5258 // GKE platform policies have the following format:
5259 // `projects/{project_number}/platforms/gke/policies/{policy_id}`.
5260 Name string `json:"name,omitempty"`
5261 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
5262 // include in API requests. By default, fields with empty or default values are
5263 // omitted from API requests. See
5264 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5265 // details.
5266 ForceSendFields []string `json:"-"`
5267 // NullFields is a list of field names (e.g. "Name") to include in API requests
5268 // with the JSON null value. By default, fields with empty values are omitted
5269 // from API requests. See
5270 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5271 NullFields []string `json:"-"`
5272 }
5273
5274 func (s PolicyBinding) MarshalJSON() ([]byte, error) {
5275 type NoMethod PolicyBinding
5276 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5277 }
5278
5279 // PolicyControllerBundleInstallSpec: BundleInstallSpec is the specification
5280 // configuration for a single managed bundle.
5281 type PolicyControllerBundleInstallSpec struct {
5282 // ExemptedNamespaces: The set of namespaces to be exempted from the bundle.
5283 ExemptedNamespaces []string `json:"exemptedNamespaces,omitempty"`
5284 // ForceSendFields is a list of field names (e.g. "ExemptedNamespaces") to
5285 // unconditionally include in API requests. By default, fields with empty or
5286 // default values are omitted from API requests. See
5287 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5288 // details.
5289 ForceSendFields []string `json:"-"`
5290 // NullFields is a list of field names (e.g. "ExemptedNamespaces") to include
5291 // in API requests with the JSON null value. By default, fields with empty
5292 // values are omitted from API requests. See
5293 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5294 NullFields []string `json:"-"`
5295 }
5296
5297 func (s PolicyControllerBundleInstallSpec) MarshalJSON() ([]byte, error) {
5298 type NoMethod PolicyControllerBundleInstallSpec
5299 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5300 }
5301
5302 // PolicyControllerHubConfig: Configuration for Policy Controller
5303 type PolicyControllerHubConfig struct {
5304 // AuditIntervalSeconds: Sets the interval for Policy Controller Audit Scans
5305 // (in seconds). When set to 0, this disables audit functionality altogether.
5306 AuditIntervalSeconds int64 `json:"auditIntervalSeconds,omitempty,string"`
5307 // ConstraintViolationLimit: The maximum number of audit violations to be
5308 // stored in a constraint. If not set, the internal default (currently 20) will
5309 // be used.
5310 ConstraintViolationLimit int64 `json:"constraintViolationLimit,omitempty,string"`
5311 // DeploymentConfigs: Map of deployment configs to deployments ("admission",
5312 // "audit", "mutation').
5313 DeploymentConfigs map[string]PolicyControllerPolicyControllerDeploymentConfig `json:"deploymentConfigs,omitempty"`
5314 // ExemptableNamespaces: The set of namespaces that are excluded from Policy
5315 // Controller checks. Namespaces do not need to currently exist on the cluster.
5316 ExemptableNamespaces []string `json:"exemptableNamespaces,omitempty"`
5317 // InstallSpec: The install_spec represents the intended state specified by the
5318 // latest request that mutated install_spec in the feature spec, not the
5319 // lifecycle state of the feature observed by the Hub feature controller that
5320 // is reported in the feature state.
5321 //
5322 // Possible values:
5323 // "INSTALL_SPEC_UNSPECIFIED" - Spec is unknown.
5324 // "INSTALL_SPEC_NOT_INSTALLED" - Request to uninstall Policy Controller.
5325 // "INSTALL_SPEC_ENABLED" - Request to install and enable Policy Controller.
5326 // "INSTALL_SPEC_SUSPENDED" - Request to suspend Policy Controller i.e. its
5327 // webhooks. If Policy Controller is not installed, it will be installed but
5328 // suspended.
5329 // "INSTALL_SPEC_DETACHED" - Request to stop all reconciliation actions by
5330 // PoCo Hub controller. This is a breakglass mechanism to stop PoCo Hub from
5331 // affecting cluster resources.
5332 InstallSpec string `json:"installSpec,omitempty"`
5333 // LogDeniesEnabled: Logs all denies and dry run failures.
5334 LogDeniesEnabled bool `json:"logDeniesEnabled,omitempty"`
5335 // Monitoring: Monitoring specifies the configuration of monitoring.
5336 Monitoring *PolicyControllerMonitoringConfig `json:"monitoring,omitempty"`
5337 // MutationEnabled: Enables the ability to mutate resources using Policy
5338 // Controller.
5339 MutationEnabled bool `json:"mutationEnabled,omitempty"`
5340 // PolicyContent: Specifies the desired policy content on the cluster
5341 PolicyContent *PolicyControllerPolicyContentSpec `json:"policyContent,omitempty"`
5342 // ReferentialRulesEnabled: Enables the ability to use Constraint Templates
5343 // that reference to objects other than the object currently being evaluated.
5344 ReferentialRulesEnabled bool `json:"referentialRulesEnabled,omitempty"`
5345 // ForceSendFields is a list of field names (e.g. "AuditIntervalSeconds") to
5346 // unconditionally include in API requests. By default, fields with empty or
5347 // default values are omitted from API requests. See
5348 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5349 // details.
5350 ForceSendFields []string `json:"-"`
5351 // NullFields is a list of field names (e.g. "AuditIntervalSeconds") to include
5352 // in API requests with the JSON null value. By default, fields with empty
5353 // values are omitted from API requests. See
5354 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5355 NullFields []string `json:"-"`
5356 }
5357
5358 func (s PolicyControllerHubConfig) MarshalJSON() ([]byte, error) {
5359 type NoMethod PolicyControllerHubConfig
5360 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5361 }
5362
5363 // PolicyControllerMembershipSpec: **Policy Controller**: Configuration for a
5364 // single cluster. Intended to parallel the PolicyController CR.
5365 type PolicyControllerMembershipSpec struct {
5366 // PolicyControllerHubConfig: Policy Controller configuration for the cluster.
5367 PolicyControllerHubConfig *PolicyControllerHubConfig `json:"policyControllerHubConfig,omitempty"`
5368 // Version: Version of Policy Controller installed.
5369 Version string `json:"version,omitempty"`
5370 // ForceSendFields is a list of field names (e.g. "PolicyControllerHubConfig")
5371 // to unconditionally include in API requests. By default, fields with empty or
5372 // default values are omitted from API requests. See
5373 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5374 // details.
5375 ForceSendFields []string `json:"-"`
5376 // NullFields is a list of field names (e.g. "PolicyControllerHubConfig") to
5377 // include in API requests with the JSON null value. By default, fields with
5378 // empty values are omitted from API requests. See
5379 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5380 NullFields []string `json:"-"`
5381 }
5382
5383 func (s PolicyControllerMembershipSpec) MarshalJSON() ([]byte, error) {
5384 type NoMethod PolicyControllerMembershipSpec
5385 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5386 }
5387
5388 // PolicyControllerMembershipState: **Policy Controller**: State for a single
5389 // cluster.
5390 type PolicyControllerMembershipState struct {
5391 // ComponentStates: Currently these include (also serving as map keys): 1.
5392 // "admission" 2. "audit" 3. "mutation"
5393 ComponentStates map[string]PolicyControllerOnClusterState `json:"componentStates,omitempty"`
5394 // PolicyContentState: The overall content state observed by the Hub Feature
5395 // controller.
5396 PolicyContentState *PolicyControllerPolicyContentState `json:"policyContentState,omitempty"`
5397 // State: The overall Policy Controller lifecycle state observed by the Hub
5398 // Feature controller.
5399 //
5400 // Possible values:
5401 // "LIFECYCLE_STATE_UNSPECIFIED" - The lifecycle state is unspecified.
5402 // "NOT_INSTALLED" - The PC does not exist on the given cluster, and no k8s
5403 // resources of any type that are associated with the PC should exist there.
5404 // The cluster does not possess a membership with the PCH.
5405 // "INSTALLING" - The PCH possesses a Membership, however the PC is not fully
5406 // installed on the cluster. In this state the hub can be expected to be taking
5407 // actions to install the PC on the cluster.
5408 // "ACTIVE" - The PC is fully installed on the cluster and in an operational
5409 // mode. In this state PCH will be reconciling state with the PC, and the PC
5410 // will be performing it's operational tasks per that software. Entering a
5411 // READY state requires that the hub has confirmed the PC is installed and its
5412 // pods are operational with the version of the PC the PCH expects.
5413 // "UPDATING" - The PC is fully installed, but in the process of changing the
5414 // configuration (including changing the version of PC either up and down, or
5415 // modifying the manifests of PC) of the resources running on the cluster. The
5416 // PCH has a Membership, is aware of the version the cluster should be running
5417 // in, but has not confirmed for itself that the PC is running with that
5418 // version.
5419 // "DECOMMISSIONING" - The PC may have resources on the cluster, but the PCH
5420 // wishes to remove the Membership. The Membership still exists.
5421 // "CLUSTER_ERROR" - The PC is not operational, and the PCH is unable to act
5422 // to make it operational. Entering a CLUSTER_ERROR state happens automatically
5423 // when the PCH determines that a PC installed on the cluster is non-operative
5424 // or that the cluster does not meet requirements set for the PCH to administer
5425 // the cluster but has nevertheless been given an instruction to do so (such as
5426 // 'install').
5427 // "HUB_ERROR" - In this state, the PC may still be operational, and only the
5428 // PCH is unable to act. The hub should not issue instructions to change the PC
5429 // state, or otherwise interfere with the on-cluster resources. Entering a
5430 // HUB_ERROR state happens automatically when the PCH determines the hub is in
5431 // an unhealthy state and it wishes to 'take hands off' to avoid corrupting the
5432 // PC or other data.
5433 // "SUSPENDED" - Policy Controller (PC) is installed but suspended. This
5434 // means that the policies are not enforced, but violations are still recorded
5435 // (through audit).
5436 // "DETACHED" - PoCo Hub is not taking any action to reconcile cluster
5437 // objects. Changes to those objects will not be overwritten by PoCo Hub.
5438 State string `json:"state,omitempty"`
5439 // ForceSendFields is a list of field names (e.g. "ComponentStates") to
5440 // unconditionally include in API requests. By default, fields with empty or
5441 // default values are 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. "ComponentStates") to include in
5446 // API requests with the JSON null value. By default, fields with empty values
5447 // are 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 PolicyControllerMembershipState) MarshalJSON() ([]byte, error) {
5453 type NoMethod PolicyControllerMembershipState
5454 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5455 }
5456
5457 // PolicyControllerMonitoringConfig: MonitoringConfig specifies the backends
5458 // Policy Controller should export metrics to. For example, to specify metrics
5459 // should be exported to Cloud Monitoring and Prometheus, specify backends:
5460 // ["cloudmonitoring", "prometheus"]
5461 type PolicyControllerMonitoringConfig struct {
5462 // Backends: Specifies the list of backends Policy Controller will export to.
5463 // An empty list would effectively disable metrics export.
5464 //
5465 // Possible values:
5466 // "MONITORING_BACKEND_UNSPECIFIED" - Backend cannot be determined
5467 // "PROMETHEUS" - Prometheus backend for monitoring
5468 // "CLOUD_MONITORING" - Stackdriver/Cloud Monitoring backend for monitoring
5469 Backends []string `json:"backends,omitempty"`
5470 // ForceSendFields is a list of field names (e.g. "Backends") to
5471 // unconditionally include in API requests. By default, fields with empty or
5472 // default values are omitted from API requests. See
5473 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5474 // details.
5475 ForceSendFields []string `json:"-"`
5476 // NullFields is a list of field names (e.g. "Backends") to include in API
5477 // requests with the JSON null value. By default, fields with empty values are
5478 // omitted from API requests. See
5479 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5480 NullFields []string `json:"-"`
5481 }
5482
5483 func (s PolicyControllerMonitoringConfig) MarshalJSON() ([]byte, error) {
5484 type NoMethod PolicyControllerMonitoringConfig
5485 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5486 }
5487
5488 // PolicyControllerOnClusterState: OnClusterState represents the state of a
5489 // sub-component of Policy Controller.
5490 type PolicyControllerOnClusterState struct {
5491 // Details: Surface potential errors or information logs.
5492 Details string `json:"details,omitempty"`
5493 // State: The lifecycle state of this component.
5494 //
5495 // Possible values:
5496 // "LIFECYCLE_STATE_UNSPECIFIED" - The lifecycle state is unspecified.
5497 // "NOT_INSTALLED" - The PC does not exist on the given cluster, and no k8s
5498 // resources of any type that are associated with the PC should exist there.
5499 // The cluster does not possess a membership with the PCH.
5500 // "INSTALLING" - The PCH possesses a Membership, however the PC is not fully
5501 // installed on the cluster. In this state the hub can be expected to be taking
5502 // actions to install the PC on the cluster.
5503 // "ACTIVE" - The PC is fully installed on the cluster and in an operational
5504 // mode. In this state PCH will be reconciling state with the PC, and the PC
5505 // will be performing it's operational tasks per that software. Entering a
5506 // READY state requires that the hub has confirmed the PC is installed and its
5507 // pods are operational with the version of the PC the PCH expects.
5508 // "UPDATING" - The PC is fully installed, but in the process of changing the
5509 // configuration (including changing the version of PC either up and down, or
5510 // modifying the manifests of PC) of the resources running on the cluster. The
5511 // PCH has a Membership, is aware of the version the cluster should be running
5512 // in, but has not confirmed for itself that the PC is running with that
5513 // version.
5514 // "DECOMMISSIONING" - The PC may have resources on the cluster, but the PCH
5515 // wishes to remove the Membership. The Membership still exists.
5516 // "CLUSTER_ERROR" - The PC is not operational, and the PCH is unable to act
5517 // to make it operational. Entering a CLUSTER_ERROR state happens automatically
5518 // when the PCH determines that a PC installed on the cluster is non-operative
5519 // or that the cluster does not meet requirements set for the PCH to administer
5520 // the cluster but has nevertheless been given an instruction to do so (such as
5521 // 'install').
5522 // "HUB_ERROR" - In this state, the PC may still be operational, and only the
5523 // PCH is unable to act. The hub should not issue instructions to change the PC
5524 // state, or otherwise interfere with the on-cluster resources. Entering a
5525 // HUB_ERROR state happens automatically when the PCH determines the hub is in
5526 // an unhealthy state and it wishes to 'take hands off' to avoid corrupting the
5527 // PC or other data.
5528 // "SUSPENDED" - Policy Controller (PC) is installed but suspended. This
5529 // means that the policies are not enforced, but violations are still recorded
5530 // (through audit).
5531 // "DETACHED" - PoCo Hub is not taking any action to reconcile cluster
5532 // objects. Changes to those objects will not be overwritten by PoCo Hub.
5533 State string `json:"state,omitempty"`
5534 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally
5535 // include in API requests. By default, fields with empty or default values are
5536 // omitted from API requests. See
5537 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5538 // details.
5539 ForceSendFields []string `json:"-"`
5540 // NullFields is a list of field names (e.g. "Details") to include in API
5541 // requests with the JSON null value. By default, fields with empty values are
5542 // omitted from API requests. See
5543 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5544 NullFields []string `json:"-"`
5545 }
5546
5547 func (s PolicyControllerOnClusterState) MarshalJSON() ([]byte, error) {
5548 type NoMethod PolicyControllerOnClusterState
5549 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5550 }
5551
5552 // PolicyControllerPolicyContentSpec: PolicyContentSpec defines the user's
5553 // desired content configuration on the cluster.
5554 type PolicyControllerPolicyContentSpec struct {
5555 // Bundles: map of bundle name to BundleInstallSpec. The bundle name maps to
5556 // the `bundleName` key in the `policycontroller.gke.io/constraintData`
5557 // annotation on a constraint.
5558 Bundles map[string]PolicyControllerBundleInstallSpec `json:"bundles,omitempty"`
5559 // TemplateLibrary: Configures the installation of the Template Library.
5560 TemplateLibrary *PolicyControllerTemplateLibraryConfig `json:"templateLibrary,omitempty"`
5561 // ForceSendFields is a list of field names (e.g. "Bundles") to unconditionally
5562 // include in API requests. By default, fields with empty or default values are
5563 // omitted from API requests. See
5564 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5565 // details.
5566 ForceSendFields []string `json:"-"`
5567 // NullFields is a list of field names (e.g. "Bundles") to include in API
5568 // requests with the JSON null value. By default, fields with empty values are
5569 // omitted from API requests. See
5570 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5571 NullFields []string `json:"-"`
5572 }
5573
5574 func (s PolicyControllerPolicyContentSpec) MarshalJSON() ([]byte, error) {
5575 type NoMethod PolicyControllerPolicyContentSpec
5576 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5577 }
5578
5579 // PolicyControllerPolicyContentState: The state of the policy controller
5580 // policy content
5581 type PolicyControllerPolicyContentState struct {
5582 // BundleStates: The state of the any bundles included in the chosen version of
5583 // the manifest
5584 BundleStates map[string]PolicyControllerOnClusterState `json:"bundleStates,omitempty"`
5585 // ReferentialSyncConfigState: The state of the referential data sync
5586 // configuration. This could represent the state of either the syncSet
5587 // object(s) or the config object, depending on the version of PoCo configured
5588 // by the user.
5589 ReferentialSyncConfigState *PolicyControllerOnClusterState `json:"referentialSyncConfigState,omitempty"`
5590 // TemplateLibraryState: The state of the template library
5591 TemplateLibraryState *PolicyControllerOnClusterState `json:"templateLibraryState,omitempty"`
5592 // ForceSendFields is a list of field names (e.g. "BundleStates") to
5593 // unconditionally include in API requests. By default, fields with empty or
5594 // default values are omitted from API requests. See
5595 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5596 // details.
5597 ForceSendFields []string `json:"-"`
5598 // NullFields is a list of field names (e.g. "BundleStates") to include in API
5599 // requests with the JSON null value. By default, fields with empty values are
5600 // omitted from API requests. See
5601 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5602 NullFields []string `json:"-"`
5603 }
5604
5605 func (s PolicyControllerPolicyContentState) MarshalJSON() ([]byte, error) {
5606 type NoMethod PolicyControllerPolicyContentState
5607 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5608 }
5609
5610 // PolicyControllerPolicyControllerDeploymentConfig: Deployment-specific
5611 // configuration.
5612 type PolicyControllerPolicyControllerDeploymentConfig struct {
5613 // ContainerResources: Container resource requirements.
5614 ContainerResources *PolicyControllerResourceRequirements `json:"containerResources,omitempty"`
5615 // PodAffinity: Pod affinity configuration.
5616 //
5617 // Possible values:
5618 // "AFFINITY_UNSPECIFIED" - No affinity configuration has been specified.
5619 // "NO_AFFINITY" - Affinity configurations will be removed from the
5620 // deployment.
5621 // "ANTI_AFFINITY" - Anti-affinity configuration will be applied to this
5622 // deployment. Default for admissions deployment.
5623 PodAffinity string `json:"podAffinity,omitempty"`
5624 // PodAntiAffinity: Pod anti-affinity enablement. Deprecated: use
5625 // `pod_affinity` instead.
5626 PodAntiAffinity bool `json:"podAntiAffinity,omitempty"`
5627 // PodTolerations: Pod tolerations of node taints.
5628 PodTolerations []*PolicyControllerToleration `json:"podTolerations,omitempty"`
5629 // ReplicaCount: Pod replica count.
5630 ReplicaCount int64 `json:"replicaCount,omitempty,string"`
5631 // ForceSendFields is a list of field names (e.g. "ContainerResources") to
5632 // unconditionally include in API requests. By default, fields with empty or
5633 // default values are omitted from API requests. See
5634 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5635 // details.
5636 ForceSendFields []string `json:"-"`
5637 // NullFields is a list of field names (e.g. "ContainerResources") to include
5638 // in API requests with the JSON null value. By default, fields with empty
5639 // values are omitted from API requests. See
5640 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5641 NullFields []string `json:"-"`
5642 }
5643
5644 func (s PolicyControllerPolicyControllerDeploymentConfig) MarshalJSON() ([]byte, error) {
5645 type NoMethod PolicyControllerPolicyControllerDeploymentConfig
5646 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5647 }
5648
5649 // PolicyControllerResourceList: ResourceList contains container resource
5650 // requirements.
5651 type PolicyControllerResourceList struct {
5652 // Cpu: CPU requirement expressed in Kubernetes resource units.
5653 Cpu string `json:"cpu,omitempty"`
5654 // Memory: Memory requirement expressed in Kubernetes resource units.
5655 Memory string `json:"memory,omitempty"`
5656 // ForceSendFields is a list of field names (e.g. "Cpu") to unconditionally
5657 // include in API requests. By default, fields with empty or default values are
5658 // omitted from API requests. See
5659 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5660 // details.
5661 ForceSendFields []string `json:"-"`
5662 // NullFields is a list of field names (e.g. "Cpu") to include in API requests
5663 // with the JSON null value. By default, fields with empty values are omitted
5664 // from API requests. See
5665 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5666 NullFields []string `json:"-"`
5667 }
5668
5669 func (s PolicyControllerResourceList) MarshalJSON() ([]byte, error) {
5670 type NoMethod PolicyControllerResourceList
5671 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5672 }
5673
5674 // PolicyControllerResourceRequirements: ResourceRequirements describes the
5675 // compute resource requirements.
5676 type PolicyControllerResourceRequirements struct {
5677 // Limits: Limits describes the maximum amount of compute resources allowed for
5678 // use by the running container.
5679 Limits *PolicyControllerResourceList `json:"limits,omitempty"`
5680 // Requests: Requests describes the amount of compute resources reserved for
5681 // the container by the kube-scheduler.
5682 Requests *PolicyControllerResourceList `json:"requests,omitempty"`
5683 // ForceSendFields is a list of field names (e.g. "Limits") to unconditionally
5684 // include in API requests. By default, fields with empty or default values are
5685 // omitted from API requests. See
5686 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5687 // details.
5688 ForceSendFields []string `json:"-"`
5689 // NullFields is a list of field names (e.g. "Limits") to include in API
5690 // requests with the JSON null value. By default, fields with empty values are
5691 // omitted from API requests. See
5692 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5693 NullFields []string `json:"-"`
5694 }
5695
5696 func (s PolicyControllerResourceRequirements) MarshalJSON() ([]byte, error) {
5697 type NoMethod PolicyControllerResourceRequirements
5698 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5699 }
5700
5701 // PolicyControllerTemplateLibraryConfig: The config specifying which default
5702 // library templates to install.
5703 type PolicyControllerTemplateLibraryConfig struct {
5704 // Installation: Configures the manner in which the template library is
5705 // installed on the cluster.
5706 //
5707 // Possible values:
5708 // "INSTALLATION_UNSPECIFIED" - No installation strategy has been specified.
5709 // "NOT_INSTALLED" - Do not install the template library.
5710 // "ALL" - Install the entire template library.
5711 Installation string `json:"installation,omitempty"`
5712 // ForceSendFields is a list of field names (e.g. "Installation") to
5713 // unconditionally include in API requests. By default, fields with empty or
5714 // default values are omitted from API requests. See
5715 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5716 // details.
5717 ForceSendFields []string `json:"-"`
5718 // NullFields is a list of field names (e.g. "Installation") to include in API
5719 // requests with the JSON null value. By default, fields with empty values are
5720 // omitted from API requests. See
5721 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5722 NullFields []string `json:"-"`
5723 }
5724
5725 func (s PolicyControllerTemplateLibraryConfig) MarshalJSON() ([]byte, error) {
5726 type NoMethod PolicyControllerTemplateLibraryConfig
5727 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5728 }
5729
5730 // PolicyControllerToleration: Toleration of a node taint.
5731 type PolicyControllerToleration struct {
5732 // Effect: Matches a taint effect.
5733 Effect string `json:"effect,omitempty"`
5734 // Key: Matches a taint key (not necessarily unique).
5735 Key string `json:"key,omitempty"`
5736 // Operator: Matches a taint operator.
5737 Operator string `json:"operator,omitempty"`
5738 // Value: Matches a taint value.
5739 Value string `json:"value,omitempty"`
5740 // ForceSendFields is a list of field names (e.g. "Effect") to unconditionally
5741 // include in API requests. By default, fields with empty or default values are
5742 // omitted from API requests. See
5743 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5744 // details.
5745 ForceSendFields []string `json:"-"`
5746 // NullFields is a list of field names (e.g. "Effect") to include in API
5747 // requests with the JSON null value. By default, fields with empty values are
5748 // omitted from API requests. See
5749 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5750 NullFields []string `json:"-"`
5751 }
5752
5753 func (s PolicyControllerToleration) MarshalJSON() ([]byte, error) {
5754 type NoMethod PolicyControllerToleration
5755 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5756 }
5757
5758 // RBACRoleBinding: RBACRoleBinding represents a rbacrolebinding across the
5759 // Fleet
5760 type RBACRoleBinding struct {
5761 // CreateTime: Output only. When the rbacrolebinding was created.
5762 CreateTime string `json:"createTime,omitempty"`
5763 // DeleteTime: Output only. When the rbacrolebinding was deleted.
5764 DeleteTime string `json:"deleteTime,omitempty"`
5765 // Group: group is the group, as seen by the kubernetes cluster.
5766 Group string `json:"group,omitempty"`
5767 // Labels: Optional. Labels for this RBACRolebinding.
5768 Labels map[string]string `json:"labels,omitempty"`
5769 // Name: The resource name for the rbacrolebinding
5770 // `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rba
5771 // crolebinding}` or
5772 // `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebin
5773 // dings/{rbacrolebinding}`
5774 Name string `json:"name,omitempty"`
5775 // Role: Required. Role to bind to the principal
5776 Role *Role `json:"role,omitempty"`
5777 // State: Output only. State of the rbacrolebinding resource.
5778 State *RBACRoleBindingLifecycleState `json:"state,omitempty"`
5779 // Uid: Output only. Google-generated UUID for this resource. This is unique
5780 // across all rbacrolebinding resources. If a rbacrolebinding resource is
5781 // deleted and another resource with the same name is created, it gets a
5782 // different uid.
5783 Uid string `json:"uid,omitempty"`
5784 // UpdateTime: Output only. When the rbacrolebinding was last updated.
5785 UpdateTime string `json:"updateTime,omitempty"`
5786 // User: user is the name of the user as seen by the kubernetes cluster,
5787 // example "alice" or "[email protected]"
5788 User string `json:"user,omitempty"`
5789
5790 // ServerResponse contains the HTTP response code and headers from the server.
5791 googleapi.ServerResponse `json:"-"`
5792 // ForceSendFields is a list of field names (e.g. "CreateTime") to
5793 // unconditionally include in API requests. By default, fields with empty or
5794 // default values are omitted from API requests. See
5795 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5796 // details.
5797 ForceSendFields []string `json:"-"`
5798 // NullFields is a list of field names (e.g. "CreateTime") to include in API
5799 // requests with the JSON null value. By default, fields with empty values are
5800 // omitted from API requests. See
5801 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5802 NullFields []string `json:"-"`
5803 }
5804
5805 func (s RBACRoleBinding) MarshalJSON() ([]byte, error) {
5806 type NoMethod RBACRoleBinding
5807 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5808 }
5809
5810 // RBACRoleBindingActuationFeatureSpec: **RBAC RoleBinding Actuation**: The
5811 // Hub-wide input for the RBACRoleBindingActuation feature.
5812 type RBACRoleBindingActuationFeatureSpec struct {
5813 // AllowedCustomRoles: The list of allowed custom roles (ClusterRoles). If a
5814 // ClusterRole is not part of this list, it cannot be used in a Scope
5815 // RBACRoleBinding. If a ClusterRole in this list is in use, it cannot be
5816 // removed from the list.
5817 AllowedCustomRoles []string `json:"allowedCustomRoles,omitempty"`
5818 // ForceSendFields is a list of field names (e.g. "AllowedCustomRoles") to
5819 // unconditionally include in API requests. By default, fields with empty or
5820 // default values are omitted from API requests. See
5821 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5822 // details.
5823 ForceSendFields []string `json:"-"`
5824 // NullFields is a list of field names (e.g. "AllowedCustomRoles") to include
5825 // in API requests with the JSON null value. By default, fields with empty
5826 // values are omitted from API requests. See
5827 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5828 NullFields []string `json:"-"`
5829 }
5830
5831 func (s RBACRoleBindingActuationFeatureSpec) MarshalJSON() ([]byte, error) {
5832 type NoMethod RBACRoleBindingActuationFeatureSpec
5833 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5834 }
5835
5836 // RBACRoleBindingActuationFeatureState: **RBAC RoleBinding Actuation**: An
5837 // empty state left as an example Hub-wide Feature state.
5838 type RBACRoleBindingActuationFeatureState struct {
5839 }
5840
5841 // RBACRoleBindingLifecycleState: RBACRoleBindingLifecycleState describes the
5842 // state of a RbacRoleBinding resource.
5843 type RBACRoleBindingLifecycleState struct {
5844 // Code: Output only. The current state of the rbacrolebinding resource.
5845 //
5846 // Possible values:
5847 // "CODE_UNSPECIFIED" - The code is not set.
5848 // "CREATING" - The rbacrolebinding is being created.
5849 // "READY" - The rbacrolebinding active.
5850 // "DELETING" - The rbacrolebinding is being deleted.
5851 // "UPDATING" - The rbacrolebinding is being updated.
5852 Code string `json:"code,omitempty"`
5853 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
5854 // include in API requests. By default, fields with empty or default values are
5855 // omitted from API requests. See
5856 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5857 // details.
5858 ForceSendFields []string `json:"-"`
5859 // NullFields is a list of field names (e.g. "Code") to include in API requests
5860 // with the JSON null value. By default, fields with empty values are omitted
5861 // from API requests. See
5862 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5863 NullFields []string `json:"-"`
5864 }
5865
5866 func (s RBACRoleBindingLifecycleState) MarshalJSON() ([]byte, error) {
5867 type NoMethod RBACRoleBindingLifecycleState
5868 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5869 }
5870
5871 // ResourceManifest: ResourceManifest represents a single Kubernetes resource
5872 // to be applied to the cluster.
5873 type ResourceManifest struct {
5874 // ClusterScoped: Output only. Whether the resource provided in the manifest is
5875 // `cluster_scoped`. If unset, the manifest is assumed to be namespace scoped.
5876 // This field is used for REST mapping when applying the resource in a cluster.
5877 ClusterScoped bool `json:"clusterScoped,omitempty"`
5878 // Manifest: Output only. YAML manifest of the resource.
5879 Manifest string `json:"manifest,omitempty"`
5880 // ForceSendFields is a list of field names (e.g. "ClusterScoped") to
5881 // unconditionally include in API requests. By default, fields with empty or
5882 // default values are omitted from API requests. See
5883 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5884 // details.
5885 ForceSendFields []string `json:"-"`
5886 // NullFields is a list of field names (e.g. "ClusterScoped") to include in API
5887 // requests with the JSON null value. By default, fields with empty values are
5888 // omitted from API requests. See
5889 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5890 NullFields []string `json:"-"`
5891 }
5892
5893 func (s ResourceManifest) MarshalJSON() ([]byte, error) {
5894 type NoMethod ResourceManifest
5895 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5896 }
5897
5898 // ResourceOptions: ResourceOptions represent options for Kubernetes resource
5899 // generation.
5900 type ResourceOptions struct {
5901 // ConnectVersion: Optional. The Connect agent version to use for
5902 // connect_resources. Defaults to the latest GKE Connect version. The version
5903 // must be a currently supported version, obsolete versions will be rejected.
5904 ConnectVersion string `json:"connectVersion,omitempty"`
5905 // K8sGitVersion: Optional. Git version of the Kubernetes cluster. This is only
5906 // used to gate the Connect Agent migration to svc.id.goog on GDC-SO 1.33.100
5907 // patch and above.
5908 K8sGitVersion string `json:"k8sGitVersion,omitempty"`
5909 // K8sVersion: Optional. Major and minor version of the Kubernetes cluster.
5910 // This is only used to determine which version to use for the
5911 // CustomResourceDefinition resources, `apiextensions/v1beta1`
5912 // or`apiextensions/v1`.
5913 K8sVersion string `json:"k8sVersion,omitempty"`
5914 // V1beta1Crd: Optional. Use `apiextensions/v1beta1` instead of
5915 // `apiextensions/v1` for CustomResourceDefinition resources. This option
5916 // should be set for clusters with Kubernetes apiserver versions <1.16.
5917 V1beta1Crd bool `json:"v1beta1Crd,omitempty"`
5918 // ForceSendFields is a list of field names (e.g. "ConnectVersion") to
5919 // unconditionally include in API requests. By default, fields with empty or
5920 // default values are omitted from API requests. See
5921 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5922 // details.
5923 ForceSendFields []string `json:"-"`
5924 // NullFields is a list of field names (e.g. "ConnectVersion") to include in
5925 // API requests with the JSON null value. By default, fields with empty values
5926 // are omitted from API requests. See
5927 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5928 NullFields []string `json:"-"`
5929 }
5930
5931 func (s ResourceOptions) MarshalJSON() ([]byte, error) {
5932 type NoMethod ResourceOptions
5933 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5934 }
5935
5936 // Role: Role is the type for Kubernetes roles
5937 type Role struct {
5938 // CustomRole: Optional. custom_role is the name of a custom
5939 // KubernetesClusterRole to use.
5940 CustomRole string `json:"customRole,omitempty"`
5941 // PredefinedRole: predefined_role is the Kubernetes default role to use
5942 //
5943 // Possible values:
5944 // "UNKNOWN" - UNKNOWN
5945 // "ADMIN" - ADMIN has EDIT and RBAC permissions
5946 // "EDIT" - EDIT can edit all resources except RBAC
5947 // "VIEW" - VIEW can only read resources
5948 // "ANTHOS_SUPPORT" - ANTHOS_SUPPORT gives Google Support read-only access to
5949 // a number of cluster resources.
5950 PredefinedRole string `json:"predefinedRole,omitempty"`
5951 // ForceSendFields is a list of field names (e.g. "CustomRole") to
5952 // unconditionally include in API requests. By default, fields with empty or
5953 // default values are omitted from API requests. See
5954 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5955 // details.
5956 ForceSendFields []string `json:"-"`
5957 // NullFields is a list of field names (e.g. "CustomRole") to include in API
5958 // requests with the JSON null value. By default, fields with empty values are
5959 // omitted from API requests. See
5960 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5961 NullFields []string `json:"-"`
5962 }
5963
5964 func (s Role) MarshalJSON() ([]byte, error) {
5965 type NoMethod Role
5966 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5967 }
5968
5969 // Rollout: Rollout contains the Rollout metadata and configuration. Next ID:
5970 // 28
5971 type Rollout struct {
5972 // CompleteTime: Output only. The timestamp at which the Rollout was completed.
5973 CompleteTime string `json:"completeTime,omitempty"`
5974 // CreateTime: Output only. The timestamp at which the Rollout was created.
5975 CreateTime string `json:"createTime,omitempty"`
5976 // DeleteTime: Output only. The timestamp at the Rollout was deleted.
5977 DeleteTime string `json:"deleteTime,omitempty"`
5978 // DisplayName: Optional. Human readable display name of the Rollout.
5979 DisplayName string `json:"displayName,omitempty"`
5980 // Etag: Output only. etag of the Rollout Ex. abc1234
5981 Etag string `json:"etag,omitempty"`
5982 // Labels: Optional. Labels for this Rollout.
5983 Labels map[string]string `json:"labels,omitempty"`
5984 // MembershipStates: Output only. States of upgrading control plane or node
5985 // pool targets of a single cluster (GKE Hub membership) that's part of this
5986 // Rollout. The key is the membership name of the cluster. The value is the
5987 // state of the cluster.
5988 MembershipStates map[string]RolloutMembershipState `json:"membershipStates,omitempty"`
5989 // Name: Identifier. The full, unique resource name of this Rollout in the
5990 // format of `projects/{project}/locations/global/rollouts/{rollout}`.
5991 Name string `json:"name,omitempty"`
5992 // RolloutSequence: Optional. Immutable. The full, unique resource name of the
5993 // rollout sequence that initiatied this Rollout. In the format of
5994 // `projects/{project}/locations/global/rolloutSequences/{rollout_sequence}`.
5995 RolloutSequence string `json:"rolloutSequence,omitempty"`
5996 // Stages: Output only. The stages of the Rollout.
5997 Stages []*RolloutStage `json:"stages,omitempty"`
5998 // State: Output only. State specifies various states of the Rollout.
5999 //
6000 // Possible values:
6001 // "STATE_UNSPECIFIED" - Unspecified state.
6002 // "RUNNING" - The Rollout is running.
6003 // "PAUSED" - The Rollout is paused.
6004 // "CANCELLED" - The Rollout is in a failure terminal state.
6005 // "COMPLETED" - The Rollout is in a terminal state.
6006 State string `json:"state,omitempty"`
6007 // StateReason: Output only. A human-readable description explaining the reason
6008 // for the current state.
6009 StateReason string `json:"stateReason,omitempty"`
6010 // StateReasonType: Output only. StateReasonType specifies the reason type of
6011 // the Rollout state.
6012 //
6013 // Possible values:
6014 // "STATE_REASON_TYPE_UNSPECIFIED" - Unspecified state reason.
6015 // "PAUSED_BY_USER" - Paused by the user.
6016 // "PAUSED_BY_SYSTEM_CONFIG" - Paused by the RSv2 Orchestrator due to system
6017 // config(ex. GKE freeze).
6018 // "PAUSED_WAITING_FOR_NEXT_STAGE" - Paused waiting for the next stage to
6019 // start.
6020 StateReasonType string `json:"stateReasonType,omitempty"`
6021 // Uid: Output only. Google-generated UUID for this resource. This is unique
6022 // across all Rollout resources. If a Rollout resource is deleted and another
6023 // resource with the same name is created, it gets a different uid.
6024 Uid string `json:"uid,omitempty"`
6025 // UpdateTime: Output only. The timestamp at which the Rollout was last
6026 // updated.
6027 UpdateTime string `json:"updateTime,omitempty"`
6028 // VersionUpgrade: Optional. Config for version upgrade of clusters.
6029 VersionUpgrade *VersionUpgrade `json:"versionUpgrade,omitempty"`
6030
6031 // ServerResponse contains the HTTP response code and headers from the server.
6032 googleapi.ServerResponse `json:"-"`
6033 // ForceSendFields is a list of field names (e.g. "CompleteTime") to
6034 // unconditionally include in API requests. By default, fields with empty or
6035 // default values are omitted from API requests. See
6036 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6037 // details.
6038 ForceSendFields []string `json:"-"`
6039 // NullFields is a list of field names (e.g. "CompleteTime") to include in API
6040 // requests with the JSON null value. By default, fields with empty values are
6041 // omitted from API requests. See
6042 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6043 NullFields []string `json:"-"`
6044 }
6045
6046 func (s Rollout) MarshalJSON() ([]byte, error) {
6047 type NoMethod Rollout
6048 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6049 }
6050
6051 // RolloutMembershipState: Metadata about single cluster (GKE Hub membership)
6052 // that's part of this Rollout.
6053 type RolloutMembershipState struct {
6054 // LastUpdateTime: Optional. Output only. The time this status and any related
6055 // Rollout-specific details for the membership were updated.
6056 LastUpdateTime string `json:"lastUpdateTime,omitempty"`
6057 // StageAssignment: Output only. The stage assignment of this cluster in this
6058 // rollout.
6059 StageAssignment int64 `json:"stageAssignment,omitempty"`
6060 // Targets: Output only. The targets of the rollout - clusters or node pools
6061 // that are being upgraded. All targets belongs to the same cluster, identified
6062 // by the membership name (key of membership_states map).
6063 Targets []*RolloutTarget `json:"targets,omitempty"`
6064 // ForceSendFields is a list of field names (e.g. "LastUpdateTime") to
6065 // unconditionally include in API requests. By default, fields with empty or
6066 // default values are omitted from API requests. See
6067 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6068 // details.
6069 ForceSendFields []string `json:"-"`
6070 // NullFields is a list of field names (e.g. "LastUpdateTime") to include in
6071 // API requests with the JSON null value. By default, fields with empty values
6072 // are omitted from API requests. See
6073 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6074 NullFields []string `json:"-"`
6075 }
6076
6077 func (s RolloutMembershipState) MarshalJSON() ([]byte, error) {
6078 type NoMethod RolloutMembershipState
6079 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6080 }
6081
6082 // RolloutSequence: RolloutSequence defines the desired order of upgrades.
6083 type RolloutSequence struct {
6084 // CreateTime: Output only. The timestamp at which the Rollout Sequence was
6085 // created.
6086 CreateTime string `json:"createTime,omitempty"`
6087 // DeleteTime: Output only. The timestamp at the Rollout Sequence was deleted.
6088 DeleteTime string `json:"deleteTime,omitempty"`
6089 // DisplayName: Optional. Human readable display name of the Rollout Sequence.
6090 DisplayName string `json:"displayName,omitempty"`
6091 // Etag: Output only. etag of the Rollout Sequence Ex. abc1234
6092 Etag string `json:"etag,omitempty"`
6093 // IgnoredClustersSelector: Optional. Selector for clusters to exclude from the
6094 // Rollout Sequence.
6095 IgnoredClustersSelector *ClusterSelector `json:"ignoredClustersSelector,omitempty"`
6096 // Labels: Optional. Labels for this Rollout Sequence.
6097 Labels map[string]string `json:"labels,omitempty"`
6098 // Name: Identifier. Name of the rollout sequence in the format of:
6099 // projects/{PROJECT_ID}/locations/global/rolloutSequences/{NAME}
6100 Name string `json:"name,omitempty"`
6101 // Stages: Required. Ordered list of stages that constitutes this Rollout.
6102 Stages []*Stage `json:"stages,omitempty"`
6103 // State: Output only. State of the Rollout Sequence as a whole.
6104 State *RolloutSequenceState `json:"state,omitempty"`
6105 // Uid: Output only. Google-generated UUID for this resource. This is unique
6106 // across all Rollout Sequence resources. If a Rollout Sequence resource is
6107 // deleted and another resource with the same name is created, it gets a
6108 // different uid.
6109 Uid string `json:"uid,omitempty"`
6110 // UpdateTime: Output only. The timestamp at which the Rollout Sequence was
6111 // last updated.
6112 UpdateTime string `json:"updateTime,omitempty"`
6113
6114 // ServerResponse contains the HTTP response code and headers from the server.
6115 googleapi.ServerResponse `json:"-"`
6116 // ForceSendFields is a list of field names (e.g. "CreateTime") to
6117 // unconditionally include in API requests. By default, fields with empty or
6118 // default values are omitted from API requests. See
6119 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6120 // details.
6121 ForceSendFields []string `json:"-"`
6122 // NullFields is a list of field names (e.g. "CreateTime") to include in API
6123 // requests with the JSON null value. By default, fields with empty values are
6124 // omitted from API requests. See
6125 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6126 NullFields []string `json:"-"`
6127 }
6128
6129 func (s RolloutSequence) MarshalJSON() ([]byte, error) {
6130 type NoMethod RolloutSequence
6131 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6132 }
6133
6134 // RolloutSequenceState: State and reasons of the Rollout Sequence.
6135 type RolloutSequenceState struct {
6136 // LastStateChangeTime: Output only. The timestamp at which the LifecycleState
6137 // was last changed. Used to track how long it has been in the current state.
6138 LastStateChangeTime string `json:"lastStateChangeTime,omitempty"`
6139 // LifecycleState: Output only. Lifecycle state of the Rollout Sequence.
6140 //
6141 // Possible values:
6142 // "LIFECYCLE_STATE_UNSPECIFIED" - The default value. This value is used if
6143 // the state is omitted.
6144 // "LIFECYCLE_STATE_ACTIVE" - The Rollout Sequence is active.
6145 // "LIFECYCLE_STATE_WARNING" - The Rollout Sequence has warnings.
6146 // "LIFECYCLE_STATE_ERROR" - The Rollout Sequence has errors.
6147 LifecycleState string `json:"lifecycleState,omitempty"`
6148 // StateReasons: Output only. StateReason represents the reason for the Rollout
6149 // Sequence state.
6150 //
6151 // Possible values:
6152 // "STATE_REASON_UNSPECIFIED" - Default unspecified value.
6153 // "FLEET_FEATURE_DELETED_ERROR" - A fleet feature is deleted.
6154 // "FLEET_DELETED_ERROR" - A fleet is deleted.
6155 // "EMPTY_STAGE_WARNING" - A stage is empty.
6156 // "MIXED_RELEASE_CHANNELS_WARNING" - Mixed release channels in the sequence.
6157 // "INTERNAL_ERROR" - Internal error, for example when host project is
6158 // soft-deleted.
6159 StateReasons []string `json:"stateReasons,omitempty"`
6160 // ForceSendFields is a list of field names (e.g. "LastStateChangeTime") to
6161 // unconditionally include in API requests. By default, fields with empty or
6162 // default values are omitted from API requests. See
6163 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6164 // details.
6165 ForceSendFields []string `json:"-"`
6166 // NullFields is a list of field names (e.g. "LastStateChangeTime") to include
6167 // in API requests with the JSON null value. By default, fields with empty
6168 // values are omitted from API requests. See
6169 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6170 NullFields []string `json:"-"`
6171 }
6172
6173 func (s RolloutSequenceState) MarshalJSON() ([]byte, error) {
6174 type NoMethod RolloutSequenceState
6175 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6176 }
6177
6178 // RolloutStage: Stage represents a single stage in the Rollout.
6179 type RolloutStage struct {
6180 // EndTime: Optional. Output only. The time at which the stage ended.
6181 EndTime string `json:"endTime,omitempty"`
6182 // SoakDuration: Optional. Duration to soak after this stage before starting
6183 // the next stage.
6184 SoakDuration string `json:"soakDuration,omitempty"`
6185 // StageNumber: Output only. The stage number to which this status applies.
6186 StageNumber int64 `json:"stageNumber,omitempty"`
6187 // StartTime: Optional. Output only. The time at which the stage started.
6188 StartTime string `json:"startTime,omitempty"`
6189 // State: Output only. The state of the stage.
6190 //
6191 // Possible values:
6192 // "STATE_UNSPECIFIED" - Default value.
6193 // "PENDING" - The stage is pending.
6194 // "RUNNING" - The stage is running.
6195 // "SOAKING" - The stage is soaking.
6196 // "COMPLETED" - The stage is completed.
6197 // "FORCED_SOAKING" - The stage is force soaking.
6198 // "PAUSED" - The stage is paused.
6199 State string `json:"state,omitempty"`
6200 // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
6201 // include in API requests. By default, fields with empty or default values are
6202 // omitted from API requests. See
6203 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6204 // details.
6205 ForceSendFields []string `json:"-"`
6206 // NullFields is a list of field names (e.g. "EndTime") to include in API
6207 // requests with the JSON null value. By default, fields with empty values are
6208 // omitted from API requests. See
6209 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6210 NullFields []string `json:"-"`
6211 }
6212
6213 func (s RolloutStage) MarshalJSON() ([]byte, error) {
6214 type NoMethod RolloutStage
6215 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6216 }
6217
6218 // RolloutTarget: Metadata about the status of targets (clusters or node pools)
6219 // involved in the Rollout.
6220 type RolloutTarget struct {
6221 // Cluster: Optional. Output only. The resource link of the Cluster resource
6222 // upgraded in this Rollout. It is formatted as:
6223 // `//{api_service}/projects/{project_number}/locations/{location}/clusters/{clu
6224 // ster_name}`. .
6225 Cluster string `json:"cluster,omitempty"`
6226 // NodePool: Optional. Output only. The resource link of the NodePool resource
6227 // upgraded in this Rollout. It is formatted as:
6228 // `//{api_service}/projects/{project_number}/locations/{location}/clusters/{clu
6229 // ster_name}/nodePools/{node_pool_name}`.
6230 NodePool string `json:"nodePool,omitempty"`
6231 // Operation: Optional. Output only. The operation resource name performing the
6232 // mutation.
6233 Operation string `json:"operation,omitempty"`
6234 // Reason: Optional. Output only. A human-readable description of the current
6235 // status.
6236 Reason string `json:"reason,omitempty"`
6237 // State: Output only. The high-level, machine-readable status of this Rollout
6238 // for the target.
6239 //
6240 // Possible values:
6241 // "STATE_UNSPECIFIED" - Unspecified state.
6242 // "PENDING" - The Rollout is pending for the target.
6243 // "RUNNING" - The Rollout is running for the target.
6244 // "FAILED" - The Rollout failed for the target.
6245 // "SUCCEEDED" - The Rollout succeeded for the target.
6246 // "PAUSED" - The Rollout is paused for the target.
6247 // "REMOVED" - The target was removed from the Rollout.
6248 // "INELIGIBLE" - The target is ineligible for the Rollout.
6249 State string `json:"state,omitempty"`
6250 // ForceSendFields is a list of field names (e.g. "Cluster") to unconditionally
6251 // include in API requests. By default, fields with empty or default values are
6252 // omitted from API requests. See
6253 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6254 // details.
6255 ForceSendFields []string `json:"-"`
6256 // NullFields is a list of field names (e.g. "Cluster") to include in API
6257 // requests with the JSON null value. By default, fields with empty values are
6258 // omitted from API requests. See
6259 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6260 NullFields []string `json:"-"`
6261 }
6262
6263 func (s RolloutTarget) MarshalJSON() ([]byte, error) {
6264 type NoMethod RolloutTarget
6265 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6266 }
6267
6268 // Scope: Scope represents a Scope in a Fleet.
6269 type Scope struct {
6270 // CreateTime: Output only. When the scope was created.
6271 CreateTime string `json:"createTime,omitempty"`
6272 // DeleteTime: Output only. When the scope was deleted.
6273 DeleteTime string `json:"deleteTime,omitempty"`
6274 // Labels: Optional. Labels for this Scope.
6275 Labels map[string]string `json:"labels,omitempty"`
6276 // Name: The resource name for the scope
6277 // `projects/{project}/locations/{location}/scopes/{scope}`
6278 Name string `json:"name,omitempty"`
6279 // NamespaceLabels: Optional. Scope-level cluster namespace labels. For the
6280 // member clusters bound to the Scope, these labels are applied to each
6281 // namespace under the Scope. Scope-level labels take precedence over
6282 // Namespace-level labels (`namespace_labels` in the Fleet Namespace resource)
6283 // if they share a key. Keys and values must be Kubernetes-conformant.
6284 NamespaceLabels map[string]string `json:"namespaceLabels,omitempty"`
6285 // State: Output only. State of the scope resource.
6286 State *ScopeLifecycleState `json:"state,omitempty"`
6287 // Uid: Output only. Google-generated UUID for this resource. This is unique
6288 // across all scope resources. If a scope resource is deleted and another
6289 // resource with the same name is created, it gets a different uid.
6290 Uid string `json:"uid,omitempty"`
6291 // UpdateTime: Output only. When the scope was last updated.
6292 UpdateTime string `json:"updateTime,omitempty"`
6293
6294 // ServerResponse contains the HTTP response code and headers from the server.
6295 googleapi.ServerResponse `json:"-"`
6296 // ForceSendFields is a list of field names (e.g. "CreateTime") to
6297 // unconditionally include in API requests. By default, fields with empty or
6298 // default values are omitted from API requests. See
6299 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6300 // details.
6301 ForceSendFields []string `json:"-"`
6302 // NullFields is a list of field names (e.g. "CreateTime") to include in API
6303 // requests with the JSON null value. By default, fields with empty values are
6304 // omitted from API requests. See
6305 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6306 NullFields []string `json:"-"`
6307 }
6308
6309 func (s Scope) MarshalJSON() ([]byte, error) {
6310 type NoMethod Scope
6311 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6312 }
6313
6314 // ScopeFeatureSpec: ScopeFeatureSpec contains feature specs for a fleet scope.
6315 type ScopeFeatureSpec struct {
6316 // Clusterupgrade: Spec for the ClusterUpgrade feature at the scope level
6317 Clusterupgrade *ClusterUpgradeScopeSpec `json:"clusterupgrade,omitempty"`
6318 // ForceSendFields is a list of field names (e.g. "Clusterupgrade") to
6319 // unconditionally include in API requests. By default, fields with empty or
6320 // default values are omitted from API requests. See
6321 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6322 // details.
6323 ForceSendFields []string `json:"-"`
6324 // NullFields is a list of field names (e.g. "Clusterupgrade") to include in
6325 // API requests with the JSON null value. By default, fields with empty values
6326 // are omitted from API requests. See
6327 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6328 NullFields []string `json:"-"`
6329 }
6330
6331 func (s ScopeFeatureSpec) MarshalJSON() ([]byte, error) {
6332 type NoMethod ScopeFeatureSpec
6333 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6334 }
6335
6336 // ScopeFeatureState: ScopeFeatureState contains Scope-wide Feature status
6337 // information.
6338 type ScopeFeatureState struct {
6339 // Clusterupgrade: State for the ClusterUpgrade feature at the scope level
6340 Clusterupgrade *ClusterUpgradeScopeState `json:"clusterupgrade,omitempty"`
6341 // State: Output only. The "running state" of the Feature in this Scope.
6342 State *FeatureState `json:"state,omitempty"`
6343 // ForceSendFields is a list of field names (e.g. "Clusterupgrade") to
6344 // unconditionally include in API requests. By default, fields with empty or
6345 // default values are omitted from API requests. See
6346 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6347 // details.
6348 ForceSendFields []string `json:"-"`
6349 // NullFields is a list of field names (e.g. "Clusterupgrade") to include in
6350 // API requests with the JSON null value. By default, fields with empty values
6351 // are omitted from API requests. See
6352 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6353 NullFields []string `json:"-"`
6354 }
6355
6356 func (s ScopeFeatureState) MarshalJSON() ([]byte, error) {
6357 type NoMethod ScopeFeatureState
6358 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6359 }
6360
6361 // ScopeLifecycleState: ScopeLifecycleState describes the state of a Scope
6362 // resource.
6363 type ScopeLifecycleState struct {
6364 // Code: Output only. The current state of the scope resource.
6365 //
6366 // Possible values:
6367 // "CODE_UNSPECIFIED" - The code is not set.
6368 // "CREATING" - The scope is being created.
6369 // "READY" - The scope active.
6370 // "DELETING" - The scope is being deleted.
6371 // "UPDATING" - The scope is being updated.
6372 Code string `json:"code,omitempty"`
6373 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
6374 // include in API requests. By default, fields with empty or default values are
6375 // omitted from API requests. See
6376 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6377 // details.
6378 ForceSendFields []string `json:"-"`
6379 // NullFields is a list of field names (e.g. "Code") to include in API requests
6380 // with the JSON null value. By default, fields with empty values are omitted
6381 // from API requests. See
6382 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6383 NullFields []string `json:"-"`
6384 }
6385
6386 func (s ScopeLifecycleState) MarshalJSON() ([]byte, error) {
6387 type NoMethod ScopeLifecycleState
6388 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6389 }
6390
6391 // SecurityPostureConfig: SecurityPostureConfig defines the flags needed to
6392 // enable/disable features for the Security Posture API.
6393 type SecurityPostureConfig struct {
6394 // Mode: Sets which mode to use for Security Posture features.
6395 //
6396 // Possible values:
6397 // "MODE_UNSPECIFIED" - Default value not specified.
6398 // "DISABLED" - Disables Security Posture features on the cluster.
6399 // "BASIC" - Applies Security Posture features on the cluster.
6400 // "ENTERPRISE" - Deprecated: Security Posture Enterprise features are no
6401 // longer supported. For more details, see
6402 // https://cloud.google.com/kubernetes-engine/docs/deprecations/posture-management-deprecation.
6403 // Applies the Security Posture off cluster Enterprise level features.
6404 Mode string `json:"mode,omitempty"`
6405 // VulnerabilityMode: Sets which mode to use for vulnerability scanning.
6406 //
6407 // Possible values:
6408 // "VULNERABILITY_MODE_UNSPECIFIED" - Default value not specified.
6409 // "VULNERABILITY_DISABLED" - Disables vulnerability scanning on the cluster.
6410 // "VULNERABILITY_BASIC" - Deprecated: Basic vulnerability scanning is no
6411 // longer supported. For more details, see
6412 // https://cloud.google.com/kubernetes-engine/docs/deprecations/posture-management-deprecation.
6413 // Applies basic vulnerability scanning on the cluster.
6414 // "VULNERABILITY_ENTERPRISE" - Applies the Security Posture's vulnerability
6415 // on cluster Enterprise level features.
6416 VulnerabilityMode string `json:"vulnerabilityMode,omitempty"`
6417 // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally
6418 // include in API requests. By default, fields with empty or default values are
6419 // omitted from API requests. See
6420 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6421 // details.
6422 ForceSendFields []string `json:"-"`
6423 // NullFields is a list of field names (e.g. "Mode") to include in API requests
6424 // with the JSON null value. By default, fields with empty values are omitted
6425 // from API requests. See
6426 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6427 NullFields []string `json:"-"`
6428 }
6429
6430 func (s SecurityPostureConfig) MarshalJSON() ([]byte, error) {
6431 type NoMethod SecurityPostureConfig
6432 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6433 }
6434
6435 // ServiceMeshAnalysisMessage: AnalysisMessage is a single message produced by
6436 // an analyzer, and it used to communicate to the end user about the state of
6437 // their Service Mesh configuration.
6438 type ServiceMeshAnalysisMessage struct {
6439 // Args: A UI can combine these args with a template (based on
6440 // message_base.type) to produce an internationalized message.
6441 Args googleapi.RawMessage `json:"args,omitempty"`
6442 // Description: A human readable description of what the error means. It is
6443 // suitable for non-internationalize display purposes.
6444 Description string `json:"description,omitempty"`
6445 // MessageBase: Details common to all types of Istio and ServiceMesh analysis
6446 // messages.
6447 MessageBase *ServiceMeshAnalysisMessageBase `json:"messageBase,omitempty"`
6448 // ResourcePaths: A list of strings specifying the resource identifiers that
6449 // were the cause of message generation. A "path" here may be: * MEMBERSHIP_ID
6450 // if the cause is a specific member cluster *
6451 // MEMBERSHIP_ID/(NAMESPACE\/)?RESOURCETYPE/NAME if the cause is a resource in
6452 // a cluster
6453 ResourcePaths []string `json:"resourcePaths,omitempty"`
6454 // ForceSendFields is a list of field names (e.g. "Args") to unconditionally
6455 // include in API requests. By default, fields with empty or default values are
6456 // omitted from API requests. See
6457 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6458 // details.
6459 ForceSendFields []string `json:"-"`
6460 // NullFields is a list of field names (e.g. "Args") to include in API requests
6461 // with the JSON null value. By default, fields with empty values are omitted
6462 // from API requests. See
6463 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6464 NullFields []string `json:"-"`
6465 }
6466
6467 func (s ServiceMeshAnalysisMessage) MarshalJSON() ([]byte, error) {
6468 type NoMethod ServiceMeshAnalysisMessage
6469 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6470 }
6471
6472 // ServiceMeshAnalysisMessageBase: AnalysisMessageBase describes some common
6473 // information that is needed for all messages.
6474 type ServiceMeshAnalysisMessageBase struct {
6475 // DocumentationUrl: A url pointing to the Service Mesh or Istio documentation
6476 // for this specific error type.
6477 DocumentationUrl string `json:"documentationUrl,omitempty"`
6478 // Level: Represents how severe a message is.
6479 //
6480 // Possible values:
6481 // "LEVEL_UNSPECIFIED" - Illegal. Same
6482 // istio.analysis.v1alpha1.AnalysisMessageBase.Level.UNKNOWN.
6483 // "ERROR" - ERROR represents a misconfiguration that must be fixed.
6484 // "WARNING" - WARNING represents a misconfiguration that should be fixed.
6485 // "INFO" - INFO represents an informational finding.
6486 Level string `json:"level,omitempty"`
6487 // Type: Represents the specific type of a message.
6488 Type *ServiceMeshType `json:"type,omitempty"`
6489 // ForceSendFields is a list of field names (e.g. "DocumentationUrl") to
6490 // unconditionally include in API requests. By default, fields with empty or
6491 // default values are omitted from API requests. See
6492 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6493 // details.
6494 ForceSendFields []string `json:"-"`
6495 // NullFields is a list of field names (e.g. "DocumentationUrl") to include in
6496 // API requests with the JSON null value. By default, fields with empty values
6497 // are omitted from API requests. See
6498 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6499 NullFields []string `json:"-"`
6500 }
6501
6502 func (s ServiceMeshAnalysisMessageBase) MarshalJSON() ([]byte, error) {
6503 type NoMethod ServiceMeshAnalysisMessageBase
6504 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6505 }
6506
6507 // ServiceMeshCondition: Condition being reported.
6508 type ServiceMeshCondition struct {
6509 // Code: Unique identifier of the condition which describes the condition
6510 // recognizable to the user.
6511 //
6512 // Possible values:
6513 // "CODE_UNSPECIFIED" - Default Unspecified code
6514 // "MESH_IAM_PERMISSION_DENIED" - Mesh IAM permission denied error code
6515 // "MESH_IAM_CROSS_PROJECT_PERMISSION_DENIED" - Permission denied error code
6516 // for cross-project
6517 // "CNI_CONFIG_UNSUPPORTED" - CNI config unsupported error code
6518 // "GKE_SANDBOX_UNSUPPORTED" - GKE sandbox unsupported error code
6519 // "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED" - Nodepool workload
6520 // identity federation required error code
6521 // "CNI_INSTALLATION_FAILED" - CNI installation failed error code
6522 // "CNI_POD_UNSCHEDULABLE" - CNI pod unschedulable error code
6523 // "CLUSTER_HAS_ZERO_NODES" - Cluster has zero node code
6524 // "CANONICAL_SERVICE_ERROR" - Failure to reconcile CanonicalServices
6525 // "UNSUPPORTED_MULTIPLE_CONTROL_PLANES" - Multiple control planes
6526 // unsupported error code
6527 // "VPCSC_GA_SUPPORTED" - VPC-SC GA is supported for this control plane.
6528 // "DEPRECATED_SPEC_CONTROL_PLANE_MANAGEMENT" - User is using deprecated
6529 // ControlPlaneManagement and they have not yet set Management.
6530 // "DEPRECATED_SPEC_CONTROL_PLANE_MANAGEMENT_SAFE" - User is using deprecated
6531 // ControlPlaneManagement and they have already set Management.
6532 // "CONFIG_APPLY_INTERNAL_ERROR" - Configuration (Istio/k8s resources) failed
6533 // to apply due to internal error.
6534 // "CONFIG_VALIDATION_ERROR" - Configuration failed to be applied due to
6535 // being invalid.
6536 // "CONFIG_VALIDATION_WARNING" - Encountered configuration(s) with possible
6537 // unintended behavior or invalid configuration. These configs may not have
6538 // been applied.
6539 // "QUOTA_EXCEEDED_BACKEND_SERVICES" - BackendService quota exceeded error
6540 // code.
6541 // "QUOTA_EXCEEDED_HEALTH_CHECKS" - HealthCheck quota exceeded error code.
6542 // "QUOTA_EXCEEDED_HTTP_ROUTES" - HTTPRoute quota exceeded error code.
6543 // "QUOTA_EXCEEDED_TCP_ROUTES" - TCPRoute quota exceeded error code.
6544 // "QUOTA_EXCEEDED_TLS_ROUTES" - TLS routes quota exceeded error code.
6545 // "QUOTA_EXCEEDED_TRAFFIC_POLICIES" - TrafficPolicy quota exceeded error
6546 // code.
6547 // "QUOTA_EXCEEDED_ENDPOINT_POLICIES" - EndpointPolicy quota exceeded error
6548 // code.
6549 // "QUOTA_EXCEEDED_GATEWAYS" - Gateway quota exceeded error code.
6550 // "QUOTA_EXCEEDED_MESHES" - Mesh quota exceeded error code.
6551 // "QUOTA_EXCEEDED_SERVER_TLS_POLICIES" - ServerTLSPolicy quota exceeded
6552 // error code.
6553 // "QUOTA_EXCEEDED_CLIENT_TLS_POLICIES" - ClientTLSPolicy quota exceeded
6554 // error code.
6555 // "QUOTA_EXCEEDED_SERVICE_LB_POLICIES" - ServiceLBPolicy quota exceeded
6556 // error code.
6557 // "QUOTA_EXCEEDED_HTTP_FILTERS" - HTTPFilter quota exceeded error code.
6558 // "QUOTA_EXCEEDED_TCP_FILTERS" - TCPFilter quota exceeded error code.
6559 // "QUOTA_EXCEEDED_NETWORK_ENDPOINT_GROUPS" - NetworkEndpointGroup quota
6560 // exceeded error code.
6561 // "CONFIG_APPLY_BLOCKED" - Configuration failed to apply due to fleet being
6562 // blocked.
6563 // "LEGACY_MC_SECRETS" - Legacy istio secrets found for multicluster error
6564 // code
6565 // "WORKLOAD_IDENTITY_REQUIRED" - Workload identity required error code
6566 // "NON_STANDARD_BINARY_USAGE" - Non-standard binary usage error code
6567 // "UNSUPPORTED_GATEWAY_CLASS" - Unsupported gateway class error code
6568 // "MANAGED_CNI_NOT_ENABLED" - Managed CNI not enabled error code
6569 // "MODERNIZATION_SCHEDULED" - Modernization is scheduled for a cluster.
6570 // "MODERNIZATION_IN_PROGRESS" - Modernization is in progress for a cluster.
6571 // "MODERNIZATION_COMPLETED" - Modernization is completed for a cluster.
6572 // "MODERNIZATION_ABORTED" - Modernization is aborted for a cluster.
6573 // "MODERNIZATION_PREPARING" - Preparing cluster so that its workloads can be
6574 // migrated.
6575 // "MODERNIZATION_STALLED" - Modernization is stalled for a cluster.
6576 // "MODERNIZATION_PREPARED" - Cluster has been prepared for its workloads to
6577 // be migrated.
6578 // "MODERNIZATION_MIGRATING_WORKLOADS" - Migrating the cluster's workloads to
6579 // the new implementation.
6580 // "MODERNIZATION_ROLLING_BACK_CLUSTER" - Rollback is in progress for
6581 // modernization of a cluster.
6582 // "MODERNIZATION_WILL_BE_SCHEDULED" - Modernization will be scheduled for a
6583 // fleet.
6584 // "MODERNIZATION_MANUAL" - Fleet is opted out from automated modernization.
6585 // "MODERNIZATION_ELIGIBLE" - Fleet is eligible for modernization.
6586 // "MODERNIZATION_MODERNIZING" - Modernization of one or more clusters in a
6587 // fleet is in progress.
6588 // "MODERNIZATION_MODERNIZED_SOAKING" - Modernization of all the fleet's
6589 // clusters is complete. Soaking before finalizing the modernization.
6590 // "MODERNIZATION_FINALIZED" - Modernization is finalized for all clusters in
6591 // a fleet. Rollback is no longer allowed.
6592 // "MODERNIZATION_ROLLING_BACK_FLEET" - Rollback is in progress for
6593 // modernization of all clusters in a fleet.
6594 Code string `json:"code,omitempty"`
6595 // Details: A short summary about the issue.
6596 Details string `json:"details,omitempty"`
6597 // DocumentationLink: Links contains actionable information.
6598 DocumentationLink string `json:"documentationLink,omitempty"`
6599 // Severity: Severity level of the condition.
6600 //
6601 // Possible values:
6602 // "SEVERITY_UNSPECIFIED" - Unspecified severity
6603 // "ERROR" - Indicates an issue that prevents the mesh from operating
6604 // correctly
6605 // "WARNING" - Indicates a setting is likely wrong, but the mesh is still
6606 // able to operate
6607 // "INFO" - An informational message, not requiring any action
6608 Severity string `json:"severity,omitempty"`
6609 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
6610 // include in API requests. By default, fields with empty or default values are
6611 // omitted from API requests. See
6612 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6613 // details.
6614 ForceSendFields []string `json:"-"`
6615 // NullFields is a list of field names (e.g. "Code") to include in API requests
6616 // with the JSON null value. By default, fields with empty values are omitted
6617 // from API requests. See
6618 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6619 NullFields []string `json:"-"`
6620 }
6621
6622 func (s ServiceMeshCondition) MarshalJSON() ([]byte, error) {
6623 type NoMethod ServiceMeshCondition
6624 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6625 }
6626
6627 // ServiceMeshControlPlaneManagement: Status of control plane management.
6628 type ServiceMeshControlPlaneManagement struct {
6629 // Details: Explanation of state.
6630 Details []*ServiceMeshStatusDetails `json:"details,omitempty"`
6631 // Implementation: Output only. Implementation of managed control plane.
6632 //
6633 // Possible values:
6634 // "IMPLEMENTATION_UNSPECIFIED" - Unspecified
6635 // "ISTIOD" - A Google build of istiod is used for the managed control plane.
6636 // "TRAFFIC_DIRECTOR" - Traffic director is used for the managed control
6637 // plane.
6638 // "UPDATING" - The control plane implementation is being updated.
6639 Implementation string `json:"implementation,omitempty"`
6640 // State: LifecycleState of control plane management.
6641 //
6642 // Possible values:
6643 // "LIFECYCLE_STATE_UNSPECIFIED" - Unspecified
6644 // "DISABLED" - DISABLED means that the component is not enabled.
6645 // "FAILED_PRECONDITION" - FAILED_PRECONDITION means that provisioning cannot
6646 // proceed because of some characteristic of the member cluster.
6647 // "PROVISIONING" - PROVISIONING means that provisioning is in progress.
6648 // "ACTIVE" - ACTIVE means that the component is ready for use.
6649 // "STALLED" - STALLED means that provisioning could not be done.
6650 // "NEEDS_ATTENTION" - NEEDS_ATTENTION means that the component is ready, but
6651 // some user intervention is required. (For example that the user should
6652 // migrate workloads to a new control plane revision.)
6653 // "DEGRADED" - DEGRADED means that the component is ready, but operating in
6654 // a degraded state.
6655 // "DEPROVISIONING" - DEPROVISIONING means that deprovisioning is in
6656 // progress.
6657 State string `json:"state,omitempty"`
6658 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally
6659 // include in API requests. By default, fields with empty or default values are
6660 // omitted from API requests. See
6661 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6662 // details.
6663 ForceSendFields []string `json:"-"`
6664 // NullFields is a list of field names (e.g. "Details") to include in API
6665 // requests with the JSON null value. By default, fields with empty values are
6666 // omitted from API requests. See
6667 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6668 NullFields []string `json:"-"`
6669 }
6670
6671 func (s ServiceMeshControlPlaneManagement) MarshalJSON() ([]byte, error) {
6672 type NoMethod ServiceMeshControlPlaneManagement
6673 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6674 }
6675
6676 // ServiceMeshDataPlaneManagement: Status of data plane management. Only
6677 // reported per-member.
6678 type ServiceMeshDataPlaneManagement struct {
6679 // Details: Explanation of the status.
6680 Details []*ServiceMeshStatusDetails `json:"details,omitempty"`
6681 // State: Lifecycle status of data plane management.
6682 //
6683 // Possible values:
6684 // "LIFECYCLE_STATE_UNSPECIFIED" - Unspecified
6685 // "DISABLED" - DISABLED means that the component is not enabled.
6686 // "FAILED_PRECONDITION" - FAILED_PRECONDITION means that provisioning cannot
6687 // proceed because of some characteristic of the member cluster.
6688 // "PROVISIONING" - PROVISIONING means that provisioning is in progress.
6689 // "ACTIVE" - ACTIVE means that the component is ready for use.
6690 // "STALLED" - STALLED means that provisioning could not be done.
6691 // "NEEDS_ATTENTION" - NEEDS_ATTENTION means that the component is ready, but
6692 // some user intervention is required. (For example that the user should
6693 // migrate workloads to a new control plane revision.)
6694 // "DEGRADED" - DEGRADED means that the component is ready, but operating in
6695 // a degraded state.
6696 // "DEPROVISIONING" - DEPROVISIONING means that deprovisioning is in
6697 // progress.
6698 State string `json:"state,omitempty"`
6699 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally
6700 // include in API requests. By default, fields with empty or default values are
6701 // omitted from API requests. See
6702 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6703 // details.
6704 ForceSendFields []string `json:"-"`
6705 // NullFields is a list of field names (e.g. "Details") to include in API
6706 // requests with the JSON null value. By default, fields with empty values are
6707 // omitted from API requests. See
6708 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6709 NullFields []string `json:"-"`
6710 }
6711
6712 func (s ServiceMeshDataPlaneManagement) MarshalJSON() ([]byte, error) {
6713 type NoMethod ServiceMeshDataPlaneManagement
6714 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6715 }
6716
6717 // ServiceMeshFeatureCondition: Condition being reported.
6718 type ServiceMeshFeatureCondition struct {
6719 // Code: Unique identifier of the condition which describes the condition
6720 // recognizable to the user.
6721 //
6722 // Possible values:
6723 // "CODE_UNSPECIFIED" - Default Unspecified code
6724 // "MESH_IAM_PERMISSION_DENIED" - Mesh IAM permission denied error code
6725 // "MESH_IAM_CROSS_PROJECT_PERMISSION_DENIED" - Permission denied error code
6726 // for cross-project
6727 // "CNI_CONFIG_UNSUPPORTED" - CNI config unsupported error code
6728 // "GKE_SANDBOX_UNSUPPORTED" - GKE sandbox unsupported error code
6729 // "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED" - Nodepool workload
6730 // identity federation required error code
6731 // "CNI_INSTALLATION_FAILED" - CNI installation failed error code
6732 // "CNI_POD_UNSCHEDULABLE" - CNI pod unschedulable error code
6733 // "CLUSTER_HAS_ZERO_NODES" - Cluster has zero node code
6734 // "CANONICAL_SERVICE_ERROR" - Failure to reconcile CanonicalServices
6735 // "UNSUPPORTED_MULTIPLE_CONTROL_PLANES" - Multiple control planes
6736 // unsupported error code
6737 // "VPCSC_GA_SUPPORTED" - VPC-SC GA is supported for this control plane.
6738 // "DEPRECATED_SPEC_CONTROL_PLANE_MANAGEMENT" - User is using deprecated
6739 // ControlPlaneManagement and they have not yet set Management.
6740 // "DEPRECATED_SPEC_CONTROL_PLANE_MANAGEMENT_SAFE" - User is using deprecated
6741 // ControlPlaneManagement and they have already set Management.
6742 // "CONFIG_APPLY_INTERNAL_ERROR" - Configuration (Istio/k8s resources) failed
6743 // to apply due to internal error.
6744 // "CONFIG_VALIDATION_ERROR" - Configuration failed to be applied due to
6745 // being invalid.
6746 // "CONFIG_VALIDATION_WARNING" - Encountered configuration(s) with possible
6747 // unintended behavior or invalid configuration. These configs may not have
6748 // been applied.
6749 // "QUOTA_EXCEEDED_BACKEND_SERVICES" - BackendService quota exceeded error
6750 // code.
6751 // "QUOTA_EXCEEDED_HEALTH_CHECKS" - HealthCheck quota exceeded error code.
6752 // "QUOTA_EXCEEDED_HTTP_ROUTES" - HTTPRoute quota exceeded error code.
6753 // "QUOTA_EXCEEDED_TCP_ROUTES" - TCPRoute quota exceeded error code.
6754 // "QUOTA_EXCEEDED_TLS_ROUTES" - TLS routes quota exceeded error code.
6755 // "QUOTA_EXCEEDED_TRAFFIC_POLICIES" - TrafficPolicy quota exceeded error
6756 // code.
6757 // "QUOTA_EXCEEDED_ENDPOINT_POLICIES" - EndpointPolicy quota exceeded error
6758 // code.
6759 // "QUOTA_EXCEEDED_GATEWAYS" - Gateway quota exceeded error code.
6760 // "QUOTA_EXCEEDED_MESHES" - Mesh quota exceeded error code.
6761 // "QUOTA_EXCEEDED_SERVER_TLS_POLICIES" - ServerTLSPolicy quota exceeded
6762 // error code.
6763 // "QUOTA_EXCEEDED_CLIENT_TLS_POLICIES" - ClientTLSPolicy quota exceeded
6764 // error code.
6765 // "QUOTA_EXCEEDED_SERVICE_LB_POLICIES" - ServiceLBPolicy quota exceeded
6766 // error code.
6767 // "QUOTA_EXCEEDED_HTTP_FILTERS" - HTTPFilter quota exceeded error code.
6768 // "QUOTA_EXCEEDED_TCP_FILTERS" - TCPFilter quota exceeded error code.
6769 // "QUOTA_EXCEEDED_NETWORK_ENDPOINT_GROUPS" - NetworkEndpointGroup quota
6770 // exceeded error code.
6771 // "CONFIG_APPLY_BLOCKED" - Configuration failed to apply due to fleet being
6772 // blocked.
6773 // "LEGACY_MC_SECRETS" - Legacy istio secrets found for multicluster error
6774 // code.
6775 // "WORKLOAD_IDENTITY_REQUIRED" - Workload identity required error code.
6776 // "NON_STANDARD_BINARY_USAGE" - Non-standard binary usage error code.
6777 // "UNSUPPORTED_GATEWAY_CLASS" - Unsupported gateway class error code.
6778 // "MANAGED_CNI_NOT_ENABLED" - Managed CNI not enabled error code.
6779 // "MODERNIZATION_SCHEDULED" - Modernization is scheduled for a cluster.
6780 // "MODERNIZATION_IN_PROGRESS" - Modernization is in progress for a cluster.
6781 // "MODERNIZATION_COMPLETED" - Modernization is completed for a cluster.
6782 // "MODERNIZATION_ABORTED" - Modernization is aborted for a cluster.
6783 // "MODERNIZATION_PREPARING" - Preparing cluster so that its workloads can be
6784 // migrated.
6785 // "MODERNIZATION_STALLED" - Modernization is stalled for a cluster.
6786 // "MODERNIZATION_PREPARED" - Cluster has been prepared for its workloads to
6787 // be migrated.
6788 // "MODERNIZATION_MIGRATING_WORKLOADS" - Migrating the cluster's workloads to
6789 // the new implementation.
6790 // "MODERNIZATION_ROLLING_BACK_CLUSTER" - Rollback is in progress for
6791 // modernization of a cluster.
6792 // "MODERNIZATION_WILL_BE_SCHEDULED" - Modernization will be scheduled for a
6793 // fleet.
6794 // "MODERNIZATION_MANUAL" - Fleet is opted out from automated modernization.
6795 // "MODERNIZATION_ELIGIBLE" - Fleet is eligible for modernization.
6796 // "MODERNIZATION_MODERNIZING" - Modernization of one or more clusters in a
6797 // fleet is in progress.
6798 // "MODERNIZATION_MODERNIZED_SOAKING" - Modernization of all the fleet's
6799 // clusters is complete. Soaking before finalizing the modernization.
6800 // "MODERNIZATION_FINALIZED" - Modernization is finalized for all clusters in
6801 // a fleet. Rollback is no longer allowed.
6802 // "MODERNIZATION_ROLLING_BACK_FLEET" - Rollback is in progress for
6803 // modernization of all clusters in a fleet.
6804 Code string `json:"code,omitempty"`
6805 // Details: A short summary about the issue.
6806 Details string `json:"details,omitempty"`
6807 // DocumentationLink: Links contains actionable information.
6808 DocumentationLink string `json:"documentationLink,omitempty"`
6809 // Severity: Severity level of the condition.
6810 //
6811 // Possible values:
6812 // "SEVERITY_UNSPECIFIED" - Unspecified severity
6813 // "ERROR" - Indicates an issue that prevents the mesh from operating
6814 // correctly
6815 // "WARNING" - Indicates a setting is likely wrong, but the mesh is still
6816 // able to operate
6817 // "INFO" - An informational message, not requiring any action
6818 Severity string `json:"severity,omitempty"`
6819 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
6820 // include in API requests. By default, fields with empty or default values are
6821 // omitted from API requests. See
6822 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6823 // details.
6824 ForceSendFields []string `json:"-"`
6825 // NullFields is a list of field names (e.g. "Code") to include in API requests
6826 // with the JSON null value. By default, fields with empty values are omitted
6827 // from API requests. See
6828 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6829 NullFields []string `json:"-"`
6830 }
6831
6832 func (s ServiceMeshFeatureCondition) MarshalJSON() ([]byte, error) {
6833 type NoMethod ServiceMeshFeatureCondition
6834 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6835 }
6836
6837 // ServiceMeshFeatureState: **Service Mesh**: State for the whole Hub, as
6838 // analyzed by the Service Mesh Hub Controller.
6839 type ServiceMeshFeatureState struct {
6840 // AnalysisMessages: Output only. Results of running Service Mesh analyzers.
6841 AnalysisMessages []*ServiceMeshAnalysisMessage `json:"analysisMessages,omitempty"`
6842 // Conditions: Output only. List of conditions reported for this feature.
6843 Conditions []*ServiceMeshFeatureCondition `json:"conditions,omitempty"`
6844 // ForceSendFields is a list of field names (e.g. "AnalysisMessages") to
6845 // unconditionally include in API requests. By default, fields with empty or
6846 // default values are omitted from API requests. See
6847 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6848 // details.
6849 ForceSendFields []string `json:"-"`
6850 // NullFields is a list of field names (e.g. "AnalysisMessages") to include in
6851 // API requests with the JSON null value. By default, fields with empty values
6852 // are omitted from API requests. See
6853 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6854 NullFields []string `json:"-"`
6855 }
6856
6857 func (s ServiceMeshFeatureState) MarshalJSON() ([]byte, error) {
6858 type NoMethod ServiceMeshFeatureState
6859 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6860 }
6861
6862 // ServiceMeshMembershipSpec: **Service Mesh**: Spec for a single Membership
6863 // for the servicemesh feature
6864 type ServiceMeshMembershipSpec struct {
6865 // ConfigApi: Optional. Specifies the API that will be used for configuring the
6866 // mesh workloads.
6867 //
6868 // Possible values:
6869 // "CONFIG_API_UNSPECIFIED" - Unspecified
6870 // "CONFIG_API_ISTIO" - Use the Istio API for configuration.
6871 // "CONFIG_API_GATEWAY" - Use the K8s Gateway API for configuration.
6872 ConfigApi string `json:"configApi,omitempty"`
6873 // ControlPlane: Deprecated: use `management` instead Enables automatic control
6874 // plane management.
6875 //
6876 // Possible values:
6877 // "CONTROL_PLANE_MANAGEMENT_UNSPECIFIED" - Unspecified
6878 // "AUTOMATIC" - Google should provision a control plane revision and make it
6879 // available in the cluster. Google will enroll this revision in a release
6880 // channel and keep it up to date. The control plane revision may be a managed
6881 // service, or a managed install.
6882 // "MANUAL" - User will manually configure the control plane (e.g. via CLI,
6883 // or via the ControlPlaneRevision KRM API)
6884 ControlPlane string `json:"controlPlane,omitempty"`
6885 // DefaultChannel: Determines which release channel to use for default
6886 // injection and service mesh APIs.
6887 //
6888 // Possible values:
6889 // "CHANNEL_UNSPECIFIED" - Unspecified
6890 // "RAPID" - RAPID channel is offered on an early access basis for customers
6891 // who want to test new releases.
6892 // "REGULAR" - REGULAR channel is intended for production users who want to
6893 // take advantage of new features.
6894 // "STABLE" - STABLE channel includes versions that are known to be stable
6895 // and reliable in production.
6896 DefaultChannel string `json:"defaultChannel,omitempty"`
6897 // Management: Optional. Enables automatic Service Mesh management.
6898 //
6899 // Possible values:
6900 // "MANAGEMENT_UNSPECIFIED" - Unspecified
6901 // "MANAGEMENT_AUTOMATIC" - Google should manage my Service Mesh for the
6902 // cluster.
6903 // "MANAGEMENT_MANUAL" - User will manually configure their service mesh
6904 // components.
6905 // "MANAGEMENT_NOT_INSTALLED" - Google should remove any managed Service Mesh
6906 // components from this cluster and deprovision any resources.
6907 Management string `json:"management,omitempty"`
6908 // ForceSendFields is a list of field names (e.g. "ConfigApi") to
6909 // unconditionally include in API requests. By default, fields with empty or
6910 // default values are omitted from API requests. See
6911 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6912 // details.
6913 ForceSendFields []string `json:"-"`
6914 // NullFields is a list of field names (e.g. "ConfigApi") to include in API
6915 // requests with the JSON null value. By default, fields with empty values are
6916 // omitted from API requests. See
6917 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6918 NullFields []string `json:"-"`
6919 }
6920
6921 func (s ServiceMeshMembershipSpec) MarshalJSON() ([]byte, error) {
6922 type NoMethod ServiceMeshMembershipSpec
6923 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6924 }
6925
6926 // ServiceMeshMembershipState: **Service Mesh**: State for a single Membership,
6927 // as analyzed by the Service Mesh Hub Controller.
6928 type ServiceMeshMembershipState struct {
6929 // AnalysisMessages: Output only. Results of running Service Mesh analyzers.
6930 AnalysisMessages []*ServiceMeshAnalysisMessage `json:"analysisMessages,omitempty"`
6931 // Conditions: Output only. List of conditions reported for this membership.
6932 Conditions []*ServiceMeshCondition `json:"conditions,omitempty"`
6933 // ConfigApiVersion: The API version (i.e. Istio CRD version) for configuring
6934 // service mesh in this cluster. This version is influenced by the
6935 // `default_channel` field.
6936 ConfigApiVersion string `json:"configApiVersion,omitempty"`
6937 // ControlPlaneManagement: Output only. Status of control plane management
6938 ControlPlaneManagement *ServiceMeshControlPlaneManagement `json:"controlPlaneManagement,omitempty"`
6939 // DataPlaneManagement: Output only. Status of data plane management.
6940 DataPlaneManagement *ServiceMeshDataPlaneManagement `json:"dataPlaneManagement,omitempty"`
6941 // ForceSendFields is a list of field names (e.g. "AnalysisMessages") to
6942 // unconditionally include in API requests. By default, fields with empty or
6943 // default values are omitted from API requests. See
6944 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6945 // details.
6946 ForceSendFields []string `json:"-"`
6947 // NullFields is a list of field names (e.g. "AnalysisMessages") to include in
6948 // API requests with the JSON null value. By default, fields with empty values
6949 // are omitted from API requests. See
6950 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6951 NullFields []string `json:"-"`
6952 }
6953
6954 func (s ServiceMeshMembershipState) MarshalJSON() ([]byte, error) {
6955 type NoMethod ServiceMeshMembershipState
6956 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6957 }
6958
6959 // ServiceMeshStatusDetails: Structured and human-readable details for a
6960 // status.
6961 type ServiceMeshStatusDetails struct {
6962 // Code: A machine-readable code that further describes a broad status.
6963 Code string `json:"code,omitempty"`
6964 // Details: Human-readable explanation of code.
6965 Details string `json:"details,omitempty"`
6966 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
6967 // include in API requests. By default, fields with empty or default values are
6968 // omitted from API requests. See
6969 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6970 // details.
6971 ForceSendFields []string `json:"-"`
6972 // NullFields is a list of field names (e.g. "Code") to include in API requests
6973 // with the JSON null value. By default, fields with empty values are omitted
6974 // from API requests. See
6975 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6976 NullFields []string `json:"-"`
6977 }
6978
6979 func (s ServiceMeshStatusDetails) MarshalJSON() ([]byte, error) {
6980 type NoMethod ServiceMeshStatusDetails
6981 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6982 }
6983
6984 // ServiceMeshType: A unique identifier for the type of message. Display_name
6985 // is intended to be human-readable, code is intended to be machine readable.
6986 // There should be a one-to-one mapping between display_name and code. (i.e. do
6987 // not re-use display_names or codes between message types.) See
6988 // istio.analysis.v1alpha1.AnalysisMessageBase.Type
6989 type ServiceMeshType struct {
6990 // Code: A 7 character code matching `^IST[0-9]{4}$` or `^ASM[0-9]{4}$`,
6991 // intended to uniquely identify the message type. (e.g. "IST0001" is mapped to
6992 // the "InternalError" message type.)
6993 Code string `json:"code,omitempty"`
6994 // DisplayName: A human-readable name for the message type. e.g.
6995 // "InternalError", "PodMissingProxy". This should be the same for all messages
6996 // of the same type. (This corresponds to the `name` field in open-source
6997 // Istio.)
6998 DisplayName string `json:"displayName,omitempty"`
6999 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
7000 // include in API requests. By default, fields with empty or default values are
7001 // omitted from API requests. See
7002 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7003 // details.
7004 ForceSendFields []string `json:"-"`
7005 // NullFields is a list of field names (e.g. "Code") to include in API requests
7006 // with the JSON null value. By default, fields with empty values are omitted
7007 // from API requests. See
7008 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7009 NullFields []string `json:"-"`
7010 }
7011
7012 func (s ServiceMeshType) MarshalJSON() ([]byte, error) {
7013 type NoMethod ServiceMeshType
7014 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7015 }
7016
7017 // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
7018 type SetIamPolicyRequest struct {
7019 // Policy: REQUIRED: The complete policy to be applied to the `resource`. The
7020 // size of the policy is limited to a few 10s of KB. An empty policy is a valid
7021 // policy but certain Google Cloud services (such as Projects) might reject
7022 // them.
7023 Policy *Policy `json:"policy,omitempty"`
7024 // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
7025 // modify. Only the fields in the mask will be modified. If no mask is
7026 // provided, the following default mask is used: `paths: "bindings, etag"
7027 UpdateMask string `json:"updateMask,omitempty"`
7028 // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
7029 // include in API requests. By default, fields with empty or default values are
7030 // omitted from API requests. See
7031 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7032 // details.
7033 ForceSendFields []string `json:"-"`
7034 // NullFields is a list of field names (e.g. "Policy") to include in API
7035 // requests with the JSON null value. By default, fields with empty values are
7036 // omitted from API requests. See
7037 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7038 NullFields []string `json:"-"`
7039 }
7040
7041 func (s SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
7042 type NoMethod SetIamPolicyRequest
7043 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7044 }
7045
7046 // Stage: Rollout stage.
7047 type Stage struct {
7048 // ClusterSelector: Optional. Filter members of fleets (above) to a subset of
7049 // clusters. If not specified, all clusters in the fleets are selected.
7050 ClusterSelector *ClusterSelector `json:"clusterSelector,omitempty"`
7051 // FleetProjects: Required. List of Fleet projects to select the clusters from.
7052 // Expected format: projects/{project}
7053 FleetProjects []string `json:"fleetProjects,omitempty"`
7054 // SoakDuration: Optional. Soak time after upgrading all the clusters in the
7055 // stage.
7056 SoakDuration string `json:"soakDuration,omitempty"`
7057 // ForceSendFields is a list of field names (e.g. "ClusterSelector") to
7058 // unconditionally include in API requests. By default, fields with empty or
7059 // default values are omitted from API requests. See
7060 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7061 // details.
7062 ForceSendFields []string `json:"-"`
7063 // NullFields is a list of field names (e.g. "ClusterSelector") to include in
7064 // API requests with the JSON null value. By default, fields with empty values
7065 // are omitted from API requests. See
7066 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7067 NullFields []string `json:"-"`
7068 }
7069
7070 func (s Stage) MarshalJSON() ([]byte, error) {
7071 type NoMethod Stage
7072 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7073 }
7074
7075 // Status: Status specifies state for the subcomponent.
7076 type Status struct {
7077 // Code: Code specifies AppDevExperienceFeature's subcomponent ready state.
7078 //
7079 // Possible values:
7080 // "CODE_UNSPECIFIED" - Not set.
7081 // "OK" - AppDevExperienceFeature's specified subcomponent is ready.
7082 // "FAILED" - AppDevExperienceFeature's specified subcomponent ready state is
7083 // false. This means AppDevExperienceFeature has encountered an issue that
7084 // blocks all, or a portion, of its normal operation. See the `description` for
7085 // more details.
7086 // "UNKNOWN" - AppDevExperienceFeature's specified subcomponent has a pending
7087 // or unknown state.
7088 Code string `json:"code,omitempty"`
7089 // Description: Description is populated if Code is Failed, explaining why it
7090 // has failed.
7091 Description string `json:"description,omitempty"`
7092 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
7093 // include in API requests. By default, fields with empty or default values are
7094 // omitted from API requests. See
7095 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7096 // details.
7097 ForceSendFields []string `json:"-"`
7098 // NullFields is a list of field names (e.g. "Code") to include in API requests
7099 // with the JSON null value. By default, fields with empty values are omitted
7100 // from API requests. See
7101 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7102 NullFields []string `json:"-"`
7103 }
7104
7105 func (s Status) MarshalJSON() ([]byte, error) {
7106 type NoMethod Status
7107 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7108 }
7109
7110 // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
7111 type TestIamPermissionsRequest struct {
7112 // Permissions: The set of permissions to check for the `resource`. Permissions
7113 // with wildcards (such as `*` or `storage.*`) are not allowed. For more
7114 // information see IAM Overview
7115 // (https://cloud.google.com/iam/docs/overview#permissions).
7116 Permissions []string `json:"permissions,omitempty"`
7117 // ForceSendFields is a list of field names (e.g. "Permissions") to
7118 // unconditionally include in API requests. By default, fields with empty or
7119 // default values are omitted from API requests. See
7120 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7121 // details.
7122 ForceSendFields []string `json:"-"`
7123 // NullFields is a list of field names (e.g. "Permissions") to include in API
7124 // requests with the JSON null value. By default, fields with empty values are
7125 // omitted from API requests. See
7126 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7127 NullFields []string `json:"-"`
7128 }
7129
7130 func (s TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
7131 type NoMethod TestIamPermissionsRequest
7132 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7133 }
7134
7135 // TestIamPermissionsResponse: Response message for `TestIamPermissions`
7136 // method.
7137 type TestIamPermissionsResponse struct {
7138 // Permissions: A subset of `TestPermissionsRequest.permissions` that the
7139 // caller is allowed.
7140 Permissions []string `json:"permissions,omitempty"`
7141
7142 // ServerResponse contains the HTTP response code and headers from the server.
7143 googleapi.ServerResponse `json:"-"`
7144 // ForceSendFields is a list of field names (e.g. "Permissions") to
7145 // unconditionally include in API requests. By default, fields with empty or
7146 // default values are omitted from API requests. See
7147 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7148 // details.
7149 ForceSendFields []string `json:"-"`
7150 // NullFields is a list of field names (e.g. "Permissions") to include in API
7151 // requests with the JSON null value. By default, fields with empty values are
7152 // omitted from API requests. See
7153 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7154 NullFields []string `json:"-"`
7155 }
7156
7157 func (s TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
7158 type NoMethod TestIamPermissionsResponse
7159 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7160 }
7161
7162 // TypeMeta: TypeMeta is the type information needed for content unmarshalling
7163 // of Kubernetes resources in the manifest.
7164 type TypeMeta struct {
7165 // ApiVersion: APIVersion of the resource (e.g. v1).
7166 ApiVersion string `json:"apiVersion,omitempty"`
7167 // Kind: Kind of the resource (e.g. Deployment).
7168 Kind string `json:"kind,omitempty"`
7169 // ForceSendFields is a list of field names (e.g. "ApiVersion") to
7170 // unconditionally include in API requests. By default, fields with empty or
7171 // default values are omitted from API requests. See
7172 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7173 // details.
7174 ForceSendFields []string `json:"-"`
7175 // NullFields is a list of field names (e.g. "ApiVersion") to include in API
7176 // requests with the JSON null value. By default, fields with empty values are
7177 // omitted from API requests. See
7178 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7179 NullFields []string `json:"-"`
7180 }
7181
7182 func (s TypeMeta) MarshalJSON() ([]byte, error) {
7183 type NoMethod TypeMeta
7184 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7185 }
7186
7187 // ValidateCreateMembershipRequest: Request message for the
7188 // `GkeHub.ValidateCreateMembership` method.
7189 type ValidateCreateMembershipRequest struct {
7190 // Membership: Required. Membership resource to be created.
7191 Membership *Membership `json:"membership,omitempty"`
7192 // MembershipId: Required. Client chosen membership id.
7193 MembershipId string `json:"membershipId,omitempty"`
7194 // ForceSendFields is a list of field names (e.g. "Membership") to
7195 // unconditionally include in API requests. By default, fields with empty or
7196 // default values are omitted from API requests. See
7197 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7198 // details.
7199 ForceSendFields []string `json:"-"`
7200 // NullFields is a list of field names (e.g. "Membership") to include in API
7201 // requests with the JSON null value. By default, fields with empty values are
7202 // omitted from API requests. See
7203 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7204 NullFields []string `json:"-"`
7205 }
7206
7207 func (s ValidateCreateMembershipRequest) MarshalJSON() ([]byte, error) {
7208 type NoMethod ValidateCreateMembershipRequest
7209 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7210 }
7211
7212 // ValidateCreateMembershipResponse: Response message for the
7213 // `GkeHub.ValidateCreateMembership` method.
7214 type ValidateCreateMembershipResponse struct {
7215 // ValidationResults: Wraps all the validator results.
7216 ValidationResults []*ValidationResult `json:"validationResults,omitempty"`
7217
7218 // ServerResponse contains the HTTP response code and headers from the server.
7219 googleapi.ServerResponse `json:"-"`
7220 // ForceSendFields is a list of field names (e.g. "ValidationResults") to
7221 // unconditionally include in API requests. By default, fields with empty or
7222 // default values are omitted from API requests. See
7223 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7224 // details.
7225 ForceSendFields []string `json:"-"`
7226 // NullFields is a list of field names (e.g. "ValidationResults") to include in
7227 // API requests with the JSON null value. By default, fields with empty values
7228 // are omitted from API requests. See
7229 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7230 NullFields []string `json:"-"`
7231 }
7232
7233 func (s ValidateCreateMembershipResponse) MarshalJSON() ([]byte, error) {
7234 type NoMethod ValidateCreateMembershipResponse
7235 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7236 }
7237
7238 // ValidateExclusivityResponse: The response of exclusivity artifacts
7239 // validation result status.
7240 type ValidateExclusivityResponse struct {
7241 // Status: The validation result. * `OK` means that exclusivity is validated,
7242 // assuming the manifest produced by GenerateExclusivityManifest is
7243 // successfully applied. * `ALREADY_EXISTS` means that the Membership CRD is
7244 // already owned by another Hub. See `status.message` for more information.
7245 Status *GoogleRpcStatus `json:"status,omitempty"`
7246
7247 // ServerResponse contains the HTTP response code and headers from the server.
7248 googleapi.ServerResponse `json:"-"`
7249 // ForceSendFields is a list of field names (e.g. "Status") to unconditionally
7250 // include in API requests. By default, fields with empty or default values are
7251 // omitted from API requests. See
7252 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7253 // details.
7254 ForceSendFields []string `json:"-"`
7255 // NullFields is a list of field names (e.g. "Status") to include in API
7256 // requests with the JSON null value. By default, fields with empty values are
7257 // omitted from API requests. See
7258 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7259 NullFields []string `json:"-"`
7260 }
7261
7262 func (s ValidateExclusivityResponse) MarshalJSON() ([]byte, error) {
7263 type NoMethod ValidateExclusivityResponse
7264 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7265 }
7266
7267 // ValidationResult: ValidationResults are results set by each validator
7268 // running during ValidateCreateMembership.
7269 type ValidationResult struct {
7270 // Result: Additional information for the validation.
7271 Result string `json:"result,omitempty"`
7272 // Success: Whether the validation is passed or not.
7273 Success bool `json:"success,omitempty"`
7274 // Validator: Validator type to validate membership with.
7275 //
7276 // Possible values:
7277 // "VALIDATOR_TYPE_UNSPECIFIED" - UNSPECIFIED validator.
7278 // "MEMBERSHIP_ID" - MEMBERSHIP_ID validator validates that the membership_id
7279 // is still available.
7280 // "CROSS_PROJECT_PERMISSION" - CROSS_PROJECT_PERMISSION validator validates
7281 // that the cross-project role binding for the service agent is in place.
7282 // "FLEET_ALLOWED_FOR_PROJECT_GUARDRAIL" -
7283 // FLEET_ALLOWED_FOR_PROJECT_GUARDRAIL validator validates that the fleet
7284 // project is allowed for the project guardrail.
7285 Validator string `json:"validator,omitempty"`
7286 // ForceSendFields is a list of field names (e.g. "Result") to unconditionally
7287 // include in API requests. By default, fields with empty or default values are
7288 // omitted from API requests. See
7289 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7290 // details.
7291 ForceSendFields []string `json:"-"`
7292 // NullFields is a list of field names (e.g. "Result") to include in API
7293 // requests with the JSON null value. By default, fields with empty values are
7294 // omitted from API requests. See
7295 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7296 NullFields []string `json:"-"`
7297 }
7298
7299 func (s ValidationResult) MarshalJSON() ([]byte, error) {
7300 type NoMethod ValidationResult
7301 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7302 }
7303
7304 // VersionUpgrade: Config for version upgrade of clusters.
7305 type VersionUpgrade struct {
7306 // DesiredVersion: Optional. Desired version of the component.
7307 DesiredVersion string `json:"desiredVersion,omitempty"`
7308 // Type: Optional. Type of version upgrade specifies which component should be
7309 // upgraded.
7310 //
7311 // Possible values:
7312 // "TYPE_UNSPECIFIED" - Default value.
7313 // "TYPE_CONTROL_PLANE" - Control plane upgrade.
7314 // "TYPE_NODE_POOL" - Node pool upgrade.
7315 Type string `json:"type,omitempty"`
7316 // ForceSendFields is a list of field names (e.g. "DesiredVersion") to
7317 // unconditionally include in API requests. By default, fields with empty or
7318 // default values are omitted from API requests. See
7319 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7320 // details.
7321 ForceSendFields []string `json:"-"`
7322 // NullFields is a list of field names (e.g. "DesiredVersion") to include in
7323 // API requests with the JSON null value. By default, fields with empty values
7324 // are omitted from API requests. See
7325 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7326 NullFields []string `json:"-"`
7327 }
7328
7329 func (s VersionUpgrade) MarshalJSON() ([]byte, error) {
7330 type NoMethod VersionUpgrade
7331 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7332 }
7333
7334 // WorkloadIdentityFeatureSpec: **WorkloadIdentity**: Global feature
7335 // specification.
7336 type WorkloadIdentityFeatureSpec struct {
7337 // ScopeTenancyPool: Pool to be used for Workload Identity. This pool in
7338 // trust-domain mode is used with Fleet Tenancy, so that sameness can be
7339 // enforced. ex:
7340 // projects/example/locations/global/workloadidentitypools/custompool
7341 ScopeTenancyPool string `json:"scopeTenancyPool,omitempty"`
7342 // ForceSendFields is a list of field names (e.g. "ScopeTenancyPool") to
7343 // unconditionally include in API requests. By default, fields with empty or
7344 // default values are omitted from API requests. See
7345 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7346 // details.
7347 ForceSendFields []string `json:"-"`
7348 // NullFields is a list of field names (e.g. "ScopeTenancyPool") to include in
7349 // API requests with the JSON null value. By default, fields with empty values
7350 // are omitted from API requests. See
7351 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7352 NullFields []string `json:"-"`
7353 }
7354
7355 func (s WorkloadIdentityFeatureSpec) MarshalJSON() ([]byte, error) {
7356 type NoMethod WorkloadIdentityFeatureSpec
7357 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7358 }
7359
7360 // WorkloadIdentityFeatureState: **WorkloadIdentity**: Global feature state.
7361 type WorkloadIdentityFeatureState struct {
7362 // NamespaceStateDetails: The state of the IAM namespaces for the fleet.
7363 NamespaceStateDetails map[string]WorkloadIdentityNamespaceStateDetail `json:"namespaceStateDetails,omitempty"`
7364 // NamespaceStates: Deprecated, this field will be erased after code is changed
7365 // to use the new field.
7366 NamespaceStates map[string]string `json:"namespaceStates,omitempty"`
7367 // ScopeTenancyWorkloadIdentityPool: The full name of the scope-tenancy pool
7368 // for the fleet.
7369 ScopeTenancyWorkloadIdentityPool string `json:"scopeTenancyWorkloadIdentityPool,omitempty"`
7370 // WorkloadIdentityPool: The full name of the svc.id.goog pool for the fleet.
7371 WorkloadIdentityPool string `json:"workloadIdentityPool,omitempty"`
7372 // WorkloadIdentityPoolStateDetails: The state of the Workload Identity Pools
7373 // for the fleet.
7374 WorkloadIdentityPoolStateDetails map[string]WorkloadIdentityWorkloadIdentityPoolStateDetail `json:"workloadIdentityPoolStateDetails,omitempty"`
7375 // ForceSendFields is a list of field names (e.g. "NamespaceStateDetails") to
7376 // unconditionally include in API requests. By default, fields with empty or
7377 // default values are omitted from API requests. See
7378 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7379 // details.
7380 ForceSendFields []string `json:"-"`
7381 // NullFields is a list of field names (e.g. "NamespaceStateDetails") to
7382 // include in API requests with the JSON null value. By default, fields with
7383 // empty values are omitted from API requests. See
7384 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7385 NullFields []string `json:"-"`
7386 }
7387
7388 func (s WorkloadIdentityFeatureState) MarshalJSON() ([]byte, error) {
7389 type NoMethod WorkloadIdentityFeatureState
7390 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7391 }
7392
7393 // WorkloadIdentityIdentityProviderStateDetail: IdentityProviderStateDetail
7394 // represents the state of an Identity Provider.
7395 type WorkloadIdentityIdentityProviderStateDetail struct {
7396 // Code: The state of the Identity Provider.
7397 //
7398 // Possible values:
7399 // "IDENTITY_PROVIDER_STATE_UNSPECIFIED" - Unknown state.
7400 // "IDENTITY_PROVIDER_STATE_OK" - The Identity Provider was created/updated
7401 // successfully.
7402 // "IDENTITY_PROVIDER_STATE_ERROR" - The Identity Provider was not
7403 // created/updated successfully. The error message is in the description field.
7404 Code string `json:"code,omitempty"`
7405 // Description: A human-readable description of the current state or returned
7406 // error.
7407 Description string `json:"description,omitempty"`
7408 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
7409 // include in API requests. By default, fields with empty or default values are
7410 // omitted from API requests. See
7411 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7412 // details.
7413 ForceSendFields []string `json:"-"`
7414 // NullFields is a list of field names (e.g. "Code") to include in API requests
7415 // with the JSON null value. By default, fields with empty values are omitted
7416 // from API requests. See
7417 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7418 NullFields []string `json:"-"`
7419 }
7420
7421 func (s WorkloadIdentityIdentityProviderStateDetail) MarshalJSON() ([]byte, error) {
7422 type NoMethod WorkloadIdentityIdentityProviderStateDetail
7423 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7424 }
7425
7426 // WorkloadIdentityMembershipState: **WorkloadIdentity**: The
7427 // membership-specific state for WorkloadIdentity feature.
7428 type WorkloadIdentityMembershipState struct {
7429 // Description: Deprecated, this field will be erased after code is changed to
7430 // use the new field.
7431 Description string `json:"description,omitempty"`
7432 // IdentityProviderStateDetails: The state of the Identity Providers
7433 // corresponding to the membership.
7434 IdentityProviderStateDetails map[string]WorkloadIdentityIdentityProviderStateDetail `json:"identityProviderStateDetails,omitempty"`
7435 // ForceSendFields is a list of field names (e.g. "Description") to
7436 // unconditionally include in API requests. By default, fields with empty or
7437 // default values are omitted from API requests. See
7438 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7439 // details.
7440 ForceSendFields []string `json:"-"`
7441 // NullFields is a list of field names (e.g. "Description") to include in API
7442 // requests with the JSON null value. By default, fields with empty values are
7443 // omitted from API requests. See
7444 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7445 NullFields []string `json:"-"`
7446 }
7447
7448 func (s WorkloadIdentityMembershipState) MarshalJSON() ([]byte, error) {
7449 type NoMethod WorkloadIdentityMembershipState
7450 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7451 }
7452
7453 // WorkloadIdentityNamespaceStateDetail: NamespaceStateDetail represents the
7454 // state of a IAM namespace.
7455 type WorkloadIdentityNamespaceStateDetail struct {
7456 // Code: The state of the IAM namespace.
7457 //
7458 // Possible values:
7459 // "NAMESPACE_STATE_UNSPECIFIED" - Unknown state.
7460 // "NAMESPACE_STATE_OK" - The Namespace was created/updated successfully.
7461 // "NAMESPACE_STATE_ERROR" - The Namespace was not created/updated
7462 // successfully. The error message is in the description field.
7463 Code string `json:"code,omitempty"`
7464 // Description: A human-readable description of the current state or returned
7465 // error.
7466 Description string `json:"description,omitempty"`
7467 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
7468 // include in API requests. By default, fields with empty or default values are
7469 // omitted from API requests. See
7470 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7471 // details.
7472 ForceSendFields []string `json:"-"`
7473 // NullFields is a list of field names (e.g. "Code") to include in API requests
7474 // with the JSON null value. By default, fields with empty values are omitted
7475 // from API requests. See
7476 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7477 NullFields []string `json:"-"`
7478 }
7479
7480 func (s WorkloadIdentityNamespaceStateDetail) MarshalJSON() ([]byte, error) {
7481 type NoMethod WorkloadIdentityNamespaceStateDetail
7482 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7483 }
7484
7485 // WorkloadIdentityWorkloadIdentityPoolStateDetail:
7486 // WorkloadIdentityPoolStateDetail represents the state of the Workload
7487 // Identity Pools for the fleet.
7488 type WorkloadIdentityWorkloadIdentityPoolStateDetail struct {
7489 // Code: The state of the Workload Identity Pool.
7490 //
7491 // Possible values:
7492 // "WORKLOAD_IDENTITY_POOL_STATE_UNSPECIFIED" - Unknown state.
7493 // "WORKLOAD_IDENTITY_POOL_STATE_OK" - The Workload Identity Pool was
7494 // created/updated successfully.
7495 // "WORKLOAD_IDENTITY_POOL_STATE_ERROR" - The Workload Identity Pool was not
7496 // created/updated successfully. The error message is in the description field.
7497 Code string `json:"code,omitempty"`
7498 // Description: A human-readable description of the current state or returned
7499 // error.
7500 Description string `json:"description,omitempty"`
7501 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
7502 // include in API requests. By default, fields with empty or default values are
7503 // omitted from API requests. See
7504 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
7505 // details.
7506 ForceSendFields []string `json:"-"`
7507 // NullFields is a list of field names (e.g. "Code") to include in API requests
7508 // with the JSON null value. By default, fields with empty values are omitted
7509 // from API requests. See
7510 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
7511 NullFields []string `json:"-"`
7512 }
7513
7514 func (s WorkloadIdentityWorkloadIdentityPoolStateDetail) MarshalJSON() ([]byte, error) {
7515 type NoMethod WorkloadIdentityWorkloadIdentityPoolStateDetail
7516 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
7517 }
7518
7519 type OrganizationsLocationsFleetsListCall struct {
7520 s *Service
7521 parent string
7522 urlParams_ gensupport.URLParams
7523 ifNoneMatch_ string
7524 ctx_ context.Context
7525 header_ http.Header
7526 }
7527
7528 // List: Returns all fleets within an organization or a project that the caller
7529 // has access to.
7530 //
7531 // - parent: The organization or project to list for Fleets under, in the
7532 // format `organizations/*/locations/*` or `projects/*/locations/*`.
7533 func (r *OrganizationsLocationsFleetsService) List(parent string) *OrganizationsLocationsFleetsListCall {
7534 c := &OrganizationsLocationsFleetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7535 c.parent = parent
7536 return c
7537 }
7538
7539 // PageSize sets the optional parameter "pageSize": The maximum number of
7540 // fleets to return. The service may return fewer than this value. If
7541 // unspecified, at most 200 fleets will be returned. The maximum value is 1000;
7542 // values above 1000 will be coerced to 1000.
7543 func (c *OrganizationsLocationsFleetsListCall) PageSize(pageSize int64) *OrganizationsLocationsFleetsListCall {
7544 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7545 return c
7546 }
7547
7548 // PageToken sets the optional parameter "pageToken": A page token, received
7549 // from a previous `ListFleets` call. Provide this to retrieve the subsequent
7550 // page. When paginating, all other parameters provided to `ListFleets` must
7551 // match the call that provided the page token.
7552 func (c *OrganizationsLocationsFleetsListCall) PageToken(pageToken string) *OrganizationsLocationsFleetsListCall {
7553 c.urlParams_.Set("pageToken", pageToken)
7554 return c
7555 }
7556
7557 // Fields allows partial responses to be retrieved. See
7558 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7559 // details.
7560 func (c *OrganizationsLocationsFleetsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsFleetsListCall {
7561 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7562 return c
7563 }
7564
7565 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7566 // object's ETag matches the given value. This is useful for getting updates
7567 // only after the object has changed since the last request.
7568 func (c *OrganizationsLocationsFleetsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsFleetsListCall {
7569 c.ifNoneMatch_ = entityTag
7570 return c
7571 }
7572
7573 // Context sets the context to be used in this call's Do method.
7574 func (c *OrganizationsLocationsFleetsListCall) Context(ctx context.Context) *OrganizationsLocationsFleetsListCall {
7575 c.ctx_ = ctx
7576 return c
7577 }
7578
7579 // Header returns a http.Header that can be modified by the caller to add
7580 // headers to the request.
7581 func (c *OrganizationsLocationsFleetsListCall) Header() http.Header {
7582 if c.header_ == nil {
7583 c.header_ = make(http.Header)
7584 }
7585 return c.header_
7586 }
7587
7588 func (c *OrganizationsLocationsFleetsListCall) doRequest(alt string) (*http.Response, error) {
7589 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7590 if c.ifNoneMatch_ != "" {
7591 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7592 }
7593 c.urlParams_.Set("alt", alt)
7594 c.urlParams_.Set("prettyPrint", "false")
7595 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/fleets")
7596 urls += "?" + c.urlParams_.Encode()
7597 req, err := http.NewRequest("GET", urls, nil)
7598 if err != nil {
7599 return nil, err
7600 }
7601 req.Header = reqHeaders
7602 googleapi.Expand(req.URL, map[string]string{
7603 "parent": c.parent,
7604 })
7605 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.organizations.locations.fleets.list", "request", internallog.HTTPRequest(req, nil))
7606 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7607 }
7608
7609 // Do executes the "gkehub.organizations.locations.fleets.list" call.
7610 // Any non-2xx status code is an error. Response headers are in either
7611 // *ListFleetsResponse.ServerResponse.Header or (if a response was returned at
7612 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7613 // check whether the returned error was because http.StatusNotModified was
7614 // returned.
7615 func (c *OrganizationsLocationsFleetsListCall) Do(opts ...googleapi.CallOption) (*ListFleetsResponse, error) {
7616 gensupport.SetOptions(c.urlParams_, opts...)
7617 res, err := c.doRequest("json")
7618 if res != nil && res.StatusCode == http.StatusNotModified {
7619 if res.Body != nil {
7620 res.Body.Close()
7621 }
7622 return nil, gensupport.WrapError(&googleapi.Error{
7623 Code: res.StatusCode,
7624 Header: res.Header,
7625 })
7626 }
7627 if err != nil {
7628 return nil, err
7629 }
7630 defer googleapi.CloseBody(res)
7631 if err := googleapi.CheckResponse(res); err != nil {
7632 return nil, gensupport.WrapError(err)
7633 }
7634 ret := &ListFleetsResponse{
7635 ServerResponse: googleapi.ServerResponse{
7636 Header: res.Header,
7637 HTTPStatusCode: res.StatusCode,
7638 },
7639 }
7640 target := &ret
7641 b, err := gensupport.DecodeResponseBytes(target, res)
7642 if err != nil {
7643 return nil, err
7644 }
7645 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.organizations.locations.fleets.list", "response", internallog.HTTPResponse(res, b))
7646 return ret, nil
7647 }
7648
7649 // Pages invokes f for each page of results.
7650 // A non-nil error returned from f will halt the iteration.
7651 // The provided context supersedes any context provided to the Context method.
7652 func (c *OrganizationsLocationsFleetsListCall) Pages(ctx context.Context, f func(*ListFleetsResponse) error) error {
7653 c.ctx_ = ctx
7654 defer c.PageToken(c.urlParams_.Get("pageToken"))
7655 for {
7656 x, err := c.Do()
7657 if err != nil {
7658 return err
7659 }
7660 if err := f(x); err != nil {
7661 return err
7662 }
7663 if x.NextPageToken == "" {
7664 return nil
7665 }
7666 c.PageToken(x.NextPageToken)
7667 }
7668 }
7669
7670 type ProjectsLocationsGetCall struct {
7671 s *Service
7672 name string
7673 urlParams_ gensupport.URLParams
7674 ifNoneMatch_ string
7675 ctx_ context.Context
7676 header_ http.Header
7677 }
7678
7679 // Get: Gets information about a location.
7680 //
7681 // - name: Resource name for the location.
7682 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
7683 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7684 c.name = name
7685 return c
7686 }
7687
7688 // Fields allows partial responses to be retrieved. See
7689 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7690 // details.
7691 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
7692 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7693 return c
7694 }
7695
7696 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7697 // object's ETag matches the given value. This is useful for getting updates
7698 // only after the object has changed since the last request.
7699 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
7700 c.ifNoneMatch_ = entityTag
7701 return c
7702 }
7703
7704 // Context sets the context to be used in this call's Do method.
7705 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
7706 c.ctx_ = ctx
7707 return c
7708 }
7709
7710 // Header returns a http.Header that can be modified by the caller to add
7711 // headers to the request.
7712 func (c *ProjectsLocationsGetCall) Header() http.Header {
7713 if c.header_ == nil {
7714 c.header_ = make(http.Header)
7715 }
7716 return c.header_
7717 }
7718
7719 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
7720 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7721 if c.ifNoneMatch_ != "" {
7722 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7723 }
7724 c.urlParams_.Set("alt", alt)
7725 c.urlParams_.Set("prettyPrint", "false")
7726 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
7727 urls += "?" + c.urlParams_.Encode()
7728 req, err := http.NewRequest("GET", urls, nil)
7729 if err != nil {
7730 return nil, err
7731 }
7732 req.Header = reqHeaders
7733 googleapi.Expand(req.URL, map[string]string{
7734 "name": c.name,
7735 })
7736 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.get", "request", internallog.HTTPRequest(req, nil))
7737 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7738 }
7739
7740 // Do executes the "gkehub.projects.locations.get" call.
7741 // Any non-2xx status code is an error. Response headers are in either
7742 // *Location.ServerResponse.Header or (if a response was returned at all) in
7743 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7744 // whether the returned error was because http.StatusNotModified was returned.
7745 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
7746 gensupport.SetOptions(c.urlParams_, opts...)
7747 res, err := c.doRequest("json")
7748 if res != nil && res.StatusCode == http.StatusNotModified {
7749 if res.Body != nil {
7750 res.Body.Close()
7751 }
7752 return nil, gensupport.WrapError(&googleapi.Error{
7753 Code: res.StatusCode,
7754 Header: res.Header,
7755 })
7756 }
7757 if err != nil {
7758 return nil, err
7759 }
7760 defer googleapi.CloseBody(res)
7761 if err := googleapi.CheckResponse(res); err != nil {
7762 return nil, gensupport.WrapError(err)
7763 }
7764 ret := &Location{
7765 ServerResponse: googleapi.ServerResponse{
7766 Header: res.Header,
7767 HTTPStatusCode: res.StatusCode,
7768 },
7769 }
7770 target := &ret
7771 b, err := gensupport.DecodeResponseBytes(target, res)
7772 if err != nil {
7773 return nil, err
7774 }
7775 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.get", "response", internallog.HTTPResponse(res, b))
7776 return ret, nil
7777 }
7778
7779 type ProjectsLocationsListCall struct {
7780 s *Service
7781 name string
7782 urlParams_ gensupport.URLParams
7783 ifNoneMatch_ string
7784 ctx_ context.Context
7785 header_ http.Header
7786 }
7787
7788 // List: Lists information about the supported locations for this service. This
7789 // method lists locations based on the resource scope provided in the
7790 // [ListLocationsRequest.name] field: * **Global locations**: If `name` is
7791 // empty, the method lists the public locations available to all projects. *
7792 // **Project-specific locations**: If `name` follows the format
7793 // `projects/{project}`, the method lists locations visible to that specific
7794 // project. This includes public, private, or other project-specific locations
7795 // enabled for the project. For gRPC and client library implementations, the
7796 // resource name is passed as the `name` field. For direct service calls, the
7797 // resource name is incorporated into the request path based on the specific
7798 // service implementation and version.
7799 //
7800 // - name: The resource that owns the locations collection, if applicable.
7801 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
7802 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7803 c.name = name
7804 return c
7805 }
7806
7807 // ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not
7808 // use this field. It is unsupported and is ignored unless explicitly
7809 // documented otherwise. This is primarily for internal usage.
7810 func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall {
7811 c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...))
7812 return c
7813 }
7814
7815 // Filter sets the optional parameter "filter": A filter to narrow down results
7816 // to a preferred subset. The filtering language accepts strings like
7817 // "displayName=tokyo", and is documented in more detail in AIP-160
7818 // (https://google.aip.dev/160).
7819 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
7820 c.urlParams_.Set("filter", filter)
7821 return c
7822 }
7823
7824 // PageSize sets the optional parameter "pageSize": The maximum number of
7825 // results to return. If not set, the service selects a default.
7826 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
7827 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7828 return c
7829 }
7830
7831 // PageToken sets the optional parameter "pageToken": A page token received
7832 // from the `next_page_token` field in the response. Send that page token to
7833 // receive the subsequent page.
7834 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
7835 c.urlParams_.Set("pageToken", pageToken)
7836 return c
7837 }
7838
7839 // Fields allows partial responses to be retrieved. See
7840 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7841 // details.
7842 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
7843 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7844 return c
7845 }
7846
7847 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7848 // object's ETag matches the given value. This is useful for getting updates
7849 // only after the object has changed since the last request.
7850 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
7851 c.ifNoneMatch_ = entityTag
7852 return c
7853 }
7854
7855 // Context sets the context to be used in this call's Do method.
7856 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
7857 c.ctx_ = ctx
7858 return c
7859 }
7860
7861 // Header returns a http.Header that can be modified by the caller to add
7862 // headers to the request.
7863 func (c *ProjectsLocationsListCall) Header() http.Header {
7864 if c.header_ == nil {
7865 c.header_ = make(http.Header)
7866 }
7867 return c.header_
7868 }
7869
7870 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
7871 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7872 if c.ifNoneMatch_ != "" {
7873 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7874 }
7875 c.urlParams_.Set("alt", alt)
7876 c.urlParams_.Set("prettyPrint", "false")
7877 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/locations")
7878 urls += "?" + c.urlParams_.Encode()
7879 req, err := http.NewRequest("GET", urls, nil)
7880 if err != nil {
7881 return nil, err
7882 }
7883 req.Header = reqHeaders
7884 googleapi.Expand(req.URL, map[string]string{
7885 "name": c.name,
7886 })
7887 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.list", "request", internallog.HTTPRequest(req, nil))
7888 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7889 }
7890
7891 // Do executes the "gkehub.projects.locations.list" call.
7892 // Any non-2xx status code is an error. Response headers are in either
7893 // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
7894 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7895 // check whether the returned error was because http.StatusNotModified was
7896 // returned.
7897 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
7898 gensupport.SetOptions(c.urlParams_, opts...)
7899 res, err := c.doRequest("json")
7900 if res != nil && res.StatusCode == http.StatusNotModified {
7901 if res.Body != nil {
7902 res.Body.Close()
7903 }
7904 return nil, gensupport.WrapError(&googleapi.Error{
7905 Code: res.StatusCode,
7906 Header: res.Header,
7907 })
7908 }
7909 if err != nil {
7910 return nil, err
7911 }
7912 defer googleapi.CloseBody(res)
7913 if err := googleapi.CheckResponse(res); err != nil {
7914 return nil, gensupport.WrapError(err)
7915 }
7916 ret := &ListLocationsResponse{
7917 ServerResponse: googleapi.ServerResponse{
7918 Header: res.Header,
7919 HTTPStatusCode: res.StatusCode,
7920 },
7921 }
7922 target := &ret
7923 b, err := gensupport.DecodeResponseBytes(target, res)
7924 if err != nil {
7925 return nil, err
7926 }
7927 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.list", "response", internallog.HTTPResponse(res, b))
7928 return ret, nil
7929 }
7930
7931 // Pages invokes f for each page of results.
7932 // A non-nil error returned from f will halt the iteration.
7933 // The provided context supersedes any context provided to the Context method.
7934 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
7935 c.ctx_ = ctx
7936 defer c.PageToken(c.urlParams_.Get("pageToken"))
7937 for {
7938 x, err := c.Do()
7939 if err != nil {
7940 return err
7941 }
7942 if err := f(x); err != nil {
7943 return err
7944 }
7945 if x.NextPageToken == "" {
7946 return nil
7947 }
7948 c.PageToken(x.NextPageToken)
7949 }
7950 }
7951
7952 type ProjectsLocationsFeaturesCreateCall struct {
7953 s *Service
7954 parent string
7955 feature *Feature
7956 urlParams_ gensupport.URLParams
7957 ctx_ context.Context
7958 header_ http.Header
7959 }
7960
7961 // Create: Adds a new Feature.
7962 //
7963 // - parent: The parent (project and location) where the Feature will be
7964 // created. Specified in the format `projects/*/locations/*`.
7965 func (r *ProjectsLocationsFeaturesService) Create(parent string, feature *Feature) *ProjectsLocationsFeaturesCreateCall {
7966 c := &ProjectsLocationsFeaturesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7967 c.parent = parent
7968 c.feature = feature
7969 return c
7970 }
7971
7972 // FeatureId sets the optional parameter "featureId": The ID of the feature to
7973 // create.
7974 func (c *ProjectsLocationsFeaturesCreateCall) FeatureId(featureId string) *ProjectsLocationsFeaturesCreateCall {
7975 c.urlParams_.Set("featureId", featureId)
7976 return c
7977 }
7978
7979 // RequestId sets the optional parameter "requestId": A request ID to identify
7980 // requests. Specify a unique request ID so that if you must retry your
7981 // request, the server will know to ignore the request if it has already been
7982 // completed. The server will guarantee that for at least 60 minutes after the
7983 // first request. For example, consider a situation where you make an initial
7984 // request and the request times out. If you make the request again with the
7985 // same request ID, the server can check if original operation with the same
7986 // request ID was received, and if so, will ignore the second request. This
7987 // prevents clients from accidentally creating duplicate commitments. The
7988 // request ID must be a valid UUID with the exception that zero UUID is not
7989 // supported (00000000-0000-0000-0000-000000000000).
7990 func (c *ProjectsLocationsFeaturesCreateCall) RequestId(requestId string) *ProjectsLocationsFeaturesCreateCall {
7991 c.urlParams_.Set("requestId", requestId)
7992 return c
7993 }
7994
7995 // Fields allows partial responses to be retrieved. See
7996 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7997 // details.
7998 func (c *ProjectsLocationsFeaturesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesCreateCall {
7999 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8000 return c
8001 }
8002
8003 // Context sets the context to be used in this call's Do method.
8004 func (c *ProjectsLocationsFeaturesCreateCall) Context(ctx context.Context) *ProjectsLocationsFeaturesCreateCall {
8005 c.ctx_ = ctx
8006 return c
8007 }
8008
8009 // Header returns a http.Header that can be modified by the caller to add
8010 // headers to the request.
8011 func (c *ProjectsLocationsFeaturesCreateCall) Header() http.Header {
8012 if c.header_ == nil {
8013 c.header_ = make(http.Header)
8014 }
8015 return c.header_
8016 }
8017
8018 func (c *ProjectsLocationsFeaturesCreateCall) doRequest(alt string) (*http.Response, error) {
8019 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8020 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.feature)
8021 if err != nil {
8022 return nil, err
8023 }
8024 c.urlParams_.Set("alt", alt)
8025 c.urlParams_.Set("prettyPrint", "false")
8026 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/features")
8027 urls += "?" + c.urlParams_.Encode()
8028 req, err := http.NewRequest("POST", urls, body)
8029 if err != nil {
8030 return nil, err
8031 }
8032 req.Header = reqHeaders
8033 googleapi.Expand(req.URL, map[string]string{
8034 "parent": c.parent,
8035 })
8036 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.create", "request", internallog.HTTPRequest(req, body.Bytes()))
8037 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8038 }
8039
8040 // Do executes the "gkehub.projects.locations.features.create" call.
8041 // Any non-2xx status code is an error. Response headers are in either
8042 // *Operation.ServerResponse.Header or (if a response was returned at all) in
8043 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8044 // whether the returned error was because http.StatusNotModified was returned.
8045 func (c *ProjectsLocationsFeaturesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8046 gensupport.SetOptions(c.urlParams_, opts...)
8047 res, err := c.doRequest("json")
8048 if res != nil && res.StatusCode == http.StatusNotModified {
8049 if res.Body != nil {
8050 res.Body.Close()
8051 }
8052 return nil, gensupport.WrapError(&googleapi.Error{
8053 Code: res.StatusCode,
8054 Header: res.Header,
8055 })
8056 }
8057 if err != nil {
8058 return nil, err
8059 }
8060 defer googleapi.CloseBody(res)
8061 if err := googleapi.CheckResponse(res); err != nil {
8062 return nil, gensupport.WrapError(err)
8063 }
8064 ret := &Operation{
8065 ServerResponse: googleapi.ServerResponse{
8066 Header: res.Header,
8067 HTTPStatusCode: res.StatusCode,
8068 },
8069 }
8070 target := &ret
8071 b, err := gensupport.DecodeResponseBytes(target, res)
8072 if err != nil {
8073 return nil, err
8074 }
8075 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.create", "response", internallog.HTTPResponse(res, b))
8076 return ret, nil
8077 }
8078
8079 type ProjectsLocationsFeaturesDeleteCall struct {
8080 s *Service
8081 name string
8082 urlParams_ gensupport.URLParams
8083 ctx_ context.Context
8084 header_ http.Header
8085 }
8086
8087 // Delete: Removes a Feature.
8088 //
8089 // - name: The Feature resource name in the format
8090 // `projects/*/locations/*/features/*`.
8091 func (r *ProjectsLocationsFeaturesService) Delete(name string) *ProjectsLocationsFeaturesDeleteCall {
8092 c := &ProjectsLocationsFeaturesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8093 c.name = name
8094 return c
8095 }
8096
8097 // Force sets the optional parameter "force": If set to true, the delete will
8098 // ignore any outstanding resources for this Feature (that is,
8099 // `FeatureState.has_resources` is set to true). These resources will NOT be
8100 // cleaned up or modified in any way.
8101 func (c *ProjectsLocationsFeaturesDeleteCall) Force(force bool) *ProjectsLocationsFeaturesDeleteCall {
8102 c.urlParams_.Set("force", fmt.Sprint(force))
8103 return c
8104 }
8105
8106 // RequestId sets the optional parameter "requestId": A request ID to identify
8107 // requests. Specify a unique request ID so that if you must retry your
8108 // request, the server will know to ignore the request if it has already been
8109 // completed. The server will guarantee that for at least 60 minutes after the
8110 // first request. For example, consider a situation where you make an initial
8111 // request and the request times out. If you make the request again with the
8112 // same request ID, the server can check if original operation with the same
8113 // request ID was received, and if so, will ignore the second request. This
8114 // prevents clients from accidentally creating duplicate commitments. The
8115 // request ID must be a valid UUID with the exception that zero UUID is not
8116 // supported (00000000-0000-0000-0000-000000000000).
8117 func (c *ProjectsLocationsFeaturesDeleteCall) RequestId(requestId string) *ProjectsLocationsFeaturesDeleteCall {
8118 c.urlParams_.Set("requestId", requestId)
8119 return c
8120 }
8121
8122 // Fields allows partial responses to be retrieved. See
8123 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8124 // details.
8125 func (c *ProjectsLocationsFeaturesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesDeleteCall {
8126 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8127 return c
8128 }
8129
8130 // Context sets the context to be used in this call's Do method.
8131 func (c *ProjectsLocationsFeaturesDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturesDeleteCall {
8132 c.ctx_ = ctx
8133 return c
8134 }
8135
8136 // Header returns a http.Header that can be modified by the caller to add
8137 // headers to the request.
8138 func (c *ProjectsLocationsFeaturesDeleteCall) Header() http.Header {
8139 if c.header_ == nil {
8140 c.header_ = make(http.Header)
8141 }
8142 return c.header_
8143 }
8144
8145 func (c *ProjectsLocationsFeaturesDeleteCall) doRequest(alt string) (*http.Response, error) {
8146 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8147 c.urlParams_.Set("alt", alt)
8148 c.urlParams_.Set("prettyPrint", "false")
8149 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
8150 urls += "?" + c.urlParams_.Encode()
8151 req, err := http.NewRequest("DELETE", urls, nil)
8152 if err != nil {
8153 return nil, err
8154 }
8155 req.Header = reqHeaders
8156 googleapi.Expand(req.URL, map[string]string{
8157 "name": c.name,
8158 })
8159 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.delete", "request", internallog.HTTPRequest(req, nil))
8160 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8161 }
8162
8163 // Do executes the "gkehub.projects.locations.features.delete" call.
8164 // Any non-2xx status code is an error. Response headers are in either
8165 // *Operation.ServerResponse.Header or (if a response was returned at all) in
8166 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8167 // whether the returned error was because http.StatusNotModified was returned.
8168 func (c *ProjectsLocationsFeaturesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8169 gensupport.SetOptions(c.urlParams_, opts...)
8170 res, err := c.doRequest("json")
8171 if res != nil && res.StatusCode == http.StatusNotModified {
8172 if res.Body != nil {
8173 res.Body.Close()
8174 }
8175 return nil, gensupport.WrapError(&googleapi.Error{
8176 Code: res.StatusCode,
8177 Header: res.Header,
8178 })
8179 }
8180 if err != nil {
8181 return nil, err
8182 }
8183 defer googleapi.CloseBody(res)
8184 if err := googleapi.CheckResponse(res); err != nil {
8185 return nil, gensupport.WrapError(err)
8186 }
8187 ret := &Operation{
8188 ServerResponse: googleapi.ServerResponse{
8189 Header: res.Header,
8190 HTTPStatusCode: res.StatusCode,
8191 },
8192 }
8193 target := &ret
8194 b, err := gensupport.DecodeResponseBytes(target, res)
8195 if err != nil {
8196 return nil, err
8197 }
8198 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.delete", "response", internallog.HTTPResponse(res, b))
8199 return ret, nil
8200 }
8201
8202 type ProjectsLocationsFeaturesGetCall struct {
8203 s *Service
8204 name string
8205 urlParams_ gensupport.URLParams
8206 ifNoneMatch_ string
8207 ctx_ context.Context
8208 header_ http.Header
8209 }
8210
8211 // Get: Gets details of a single Feature.
8212 //
8213 // - name: The Feature resource name in the format
8214 // `projects/*/locations/*/features/*`.
8215 func (r *ProjectsLocationsFeaturesService) Get(name string) *ProjectsLocationsFeaturesGetCall {
8216 c := &ProjectsLocationsFeaturesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8217 c.name = name
8218 return c
8219 }
8220
8221 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If
8222 // set to true, the response will return partial results when some regions are
8223 // unreachable and the unreachable field in Feature proto will be populated. If
8224 // set to false, the request will fail when some regions are unreachable.
8225 func (c *ProjectsLocationsFeaturesGetCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsFeaturesGetCall {
8226 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
8227 return c
8228 }
8229
8230 // Fields allows partial responses to be retrieved. See
8231 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8232 // details.
8233 func (c *ProjectsLocationsFeaturesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesGetCall {
8234 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8235 return c
8236 }
8237
8238 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8239 // object's ETag matches the given value. This is useful for getting updates
8240 // only after the object has changed since the last request.
8241 func (c *ProjectsLocationsFeaturesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturesGetCall {
8242 c.ifNoneMatch_ = entityTag
8243 return c
8244 }
8245
8246 // Context sets the context to be used in this call's Do method.
8247 func (c *ProjectsLocationsFeaturesGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturesGetCall {
8248 c.ctx_ = ctx
8249 return c
8250 }
8251
8252 // Header returns a http.Header that can be modified by the caller to add
8253 // headers to the request.
8254 func (c *ProjectsLocationsFeaturesGetCall) Header() http.Header {
8255 if c.header_ == nil {
8256 c.header_ = make(http.Header)
8257 }
8258 return c.header_
8259 }
8260
8261 func (c *ProjectsLocationsFeaturesGetCall) doRequest(alt string) (*http.Response, error) {
8262 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8263 if c.ifNoneMatch_ != "" {
8264 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8265 }
8266 c.urlParams_.Set("alt", alt)
8267 c.urlParams_.Set("prettyPrint", "false")
8268 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
8269 urls += "?" + c.urlParams_.Encode()
8270 req, err := http.NewRequest("GET", urls, nil)
8271 if err != nil {
8272 return nil, err
8273 }
8274 req.Header = reqHeaders
8275 googleapi.Expand(req.URL, map[string]string{
8276 "name": c.name,
8277 })
8278 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.get", "request", internallog.HTTPRequest(req, nil))
8279 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8280 }
8281
8282 // Do executes the "gkehub.projects.locations.features.get" call.
8283 // Any non-2xx status code is an error. Response headers are in either
8284 // *Feature.ServerResponse.Header or (if a response was returned at all) in
8285 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8286 // whether the returned error was because http.StatusNotModified was returned.
8287 func (c *ProjectsLocationsFeaturesGetCall) Do(opts ...googleapi.CallOption) (*Feature, error) {
8288 gensupport.SetOptions(c.urlParams_, opts...)
8289 res, err := c.doRequest("json")
8290 if res != nil && res.StatusCode == http.StatusNotModified {
8291 if res.Body != nil {
8292 res.Body.Close()
8293 }
8294 return nil, gensupport.WrapError(&googleapi.Error{
8295 Code: res.StatusCode,
8296 Header: res.Header,
8297 })
8298 }
8299 if err != nil {
8300 return nil, err
8301 }
8302 defer googleapi.CloseBody(res)
8303 if err := googleapi.CheckResponse(res); err != nil {
8304 return nil, gensupport.WrapError(err)
8305 }
8306 ret := &Feature{
8307 ServerResponse: googleapi.ServerResponse{
8308 Header: res.Header,
8309 HTTPStatusCode: res.StatusCode,
8310 },
8311 }
8312 target := &ret
8313 b, err := gensupport.DecodeResponseBytes(target, res)
8314 if err != nil {
8315 return nil, err
8316 }
8317 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.get", "response", internallog.HTTPResponse(res, b))
8318 return ret, nil
8319 }
8320
8321 type ProjectsLocationsFeaturesGetIamPolicyCall struct {
8322 s *Service
8323 resource string
8324 urlParams_ gensupport.URLParams
8325 ifNoneMatch_ string
8326 ctx_ context.Context
8327 header_ http.Header
8328 }
8329
8330 // GetIamPolicy: Gets the access control policy for a resource. Returns an
8331 // empty policy if the resource exists and does not have a policy set.
8332 //
8333 // - resource: REQUIRED: The resource for which the policy is being requested.
8334 // See Resource names (https://cloud.google.com/apis/design/resource_names)
8335 // for the appropriate value for this field.
8336 func (r *ProjectsLocationsFeaturesService) GetIamPolicy(resource string) *ProjectsLocationsFeaturesGetIamPolicyCall {
8337 c := &ProjectsLocationsFeaturesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8338 c.resource = resource
8339 return c
8340 }
8341
8342 // OptionsRequestedPolicyVersion sets the optional parameter
8343 // "options.requestedPolicyVersion": The maximum policy version that will be
8344 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
8345 // an invalid value will be rejected. Requests for policies with any
8346 // conditional role bindings must specify version 3. Policies with no
8347 // conditional role bindings may specify any valid value or leave the field
8348 // unset. The policy in the response might use the policy version that you
8349 // specified, or it might use a lower policy version. For example, if you
8350 // specify version 3, but the policy has no conditional role bindings, the
8351 // response uses version 1. To learn which resources support conditions in
8352 // their IAM policies, see the IAM documentation
8353 // (https://cloud.google.com/iam/help/conditions/resource-policies).
8354 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFeaturesGetIamPolicyCall {
8355 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
8356 return c
8357 }
8358
8359 // Fields allows partial responses to be retrieved. See
8360 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8361 // details.
8362 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesGetIamPolicyCall {
8363 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8364 return c
8365 }
8366
8367 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8368 // object's ETag matches the given value. This is useful for getting updates
8369 // only after the object has changed since the last request.
8370 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturesGetIamPolicyCall {
8371 c.ifNoneMatch_ = entityTag
8372 return c
8373 }
8374
8375 // Context sets the context to be used in this call's Do method.
8376 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturesGetIamPolicyCall {
8377 c.ctx_ = ctx
8378 return c
8379 }
8380
8381 // Header returns a http.Header that can be modified by the caller to add
8382 // headers to the request.
8383 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) Header() http.Header {
8384 if c.header_ == nil {
8385 c.header_ = make(http.Header)
8386 }
8387 return c.header_
8388 }
8389
8390 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8391 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8392 if c.ifNoneMatch_ != "" {
8393 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8394 }
8395 c.urlParams_.Set("alt", alt)
8396 c.urlParams_.Set("prettyPrint", "false")
8397 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy")
8398 urls += "?" + c.urlParams_.Encode()
8399 req, err := http.NewRequest("GET", urls, nil)
8400 if err != nil {
8401 return nil, err
8402 }
8403 req.Header = reqHeaders
8404 googleapi.Expand(req.URL, map[string]string{
8405 "resource": c.resource,
8406 })
8407 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
8408 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8409 }
8410
8411 // Do executes the "gkehub.projects.locations.features.getIamPolicy" call.
8412 // Any non-2xx status code is an error. Response headers are in either
8413 // *Policy.ServerResponse.Header or (if a response was returned at all) in
8414 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8415 // whether the returned error was because http.StatusNotModified was returned.
8416 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8417 gensupport.SetOptions(c.urlParams_, opts...)
8418 res, err := c.doRequest("json")
8419 if res != nil && res.StatusCode == http.StatusNotModified {
8420 if res.Body != nil {
8421 res.Body.Close()
8422 }
8423 return nil, gensupport.WrapError(&googleapi.Error{
8424 Code: res.StatusCode,
8425 Header: res.Header,
8426 })
8427 }
8428 if err != nil {
8429 return nil, err
8430 }
8431 defer googleapi.CloseBody(res)
8432 if err := googleapi.CheckResponse(res); err != nil {
8433 return nil, gensupport.WrapError(err)
8434 }
8435 ret := &Policy{
8436 ServerResponse: googleapi.ServerResponse{
8437 Header: res.Header,
8438 HTTPStatusCode: res.StatusCode,
8439 },
8440 }
8441 target := &ret
8442 b, err := gensupport.DecodeResponseBytes(target, res)
8443 if err != nil {
8444 return nil, err
8445 }
8446 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.getIamPolicy", "response", internallog.HTTPResponse(res, b))
8447 return ret, nil
8448 }
8449
8450 type ProjectsLocationsFeaturesListCall struct {
8451 s *Service
8452 parent string
8453 urlParams_ gensupport.URLParams
8454 ifNoneMatch_ string
8455 ctx_ context.Context
8456 header_ http.Header
8457 }
8458
8459 // List: Lists Features in a given project and location.
8460 //
8461 // - parent: The parent (project and location) where the Features will be
8462 // listed. Specified in the format `projects/*/locations/*`.
8463 func (r *ProjectsLocationsFeaturesService) List(parent string) *ProjectsLocationsFeaturesListCall {
8464 c := &ProjectsLocationsFeaturesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8465 c.parent = parent
8466 return c
8467 }
8468
8469 // Filter sets the optional parameter "filter": Lists Features that match the
8470 // filter expression, following the syntax outlined in
8471 // https://google.aip.dev/160. Examples: - Feature with the name "servicemesh"
8472 // in project "foo-proj": name =
8473 // "projects/foo-proj/locations/global/features/servicemesh" - Features that
8474 // have a label called `foo`: labels.foo:* - Features that have a label called
8475 // `foo` whose value is `bar`: labels.foo = bar
8476 func (c *ProjectsLocationsFeaturesListCall) Filter(filter string) *ProjectsLocationsFeaturesListCall {
8477 c.urlParams_.Set("filter", filter)
8478 return c
8479 }
8480
8481 // OrderBy sets the optional parameter "orderBy": One or more fields to compare
8482 // and use to sort the output. See https://google.aip.dev/132#ordering.
8483 func (c *ProjectsLocationsFeaturesListCall) OrderBy(orderBy string) *ProjectsLocationsFeaturesListCall {
8484 c.urlParams_.Set("orderBy", orderBy)
8485 return c
8486 }
8487
8488 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
8489 // resources, `page_size` specifies number of resources to return. If
8490 // unspecified or set to 0, all resources will be returned.
8491 func (c *ProjectsLocationsFeaturesListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturesListCall {
8492 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8493 return c
8494 }
8495
8496 // PageToken sets the optional parameter "pageToken": Token returned by
8497 // previous call to `ListFeatures` which specifies the position in the list
8498 // from where to continue listing the resources.
8499 func (c *ProjectsLocationsFeaturesListCall) PageToken(pageToken string) *ProjectsLocationsFeaturesListCall {
8500 c.urlParams_.Set("pageToken", pageToken)
8501 return c
8502 }
8503
8504 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If
8505 // set to true, the response will return partial results when some regions are
8506 // unreachable and the unreachable field in Feature proto will be populated. If
8507 // set to false, the request will fail when some regions are unreachable.
8508 func (c *ProjectsLocationsFeaturesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsFeaturesListCall {
8509 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
8510 return c
8511 }
8512
8513 // Fields allows partial responses to be retrieved. See
8514 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8515 // details.
8516 func (c *ProjectsLocationsFeaturesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesListCall {
8517 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8518 return c
8519 }
8520
8521 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8522 // object's ETag matches the given value. This is useful for getting updates
8523 // only after the object has changed since the last request.
8524 func (c *ProjectsLocationsFeaturesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturesListCall {
8525 c.ifNoneMatch_ = entityTag
8526 return c
8527 }
8528
8529 // Context sets the context to be used in this call's Do method.
8530 func (c *ProjectsLocationsFeaturesListCall) Context(ctx context.Context) *ProjectsLocationsFeaturesListCall {
8531 c.ctx_ = ctx
8532 return c
8533 }
8534
8535 // Header returns a http.Header that can be modified by the caller to add
8536 // headers to the request.
8537 func (c *ProjectsLocationsFeaturesListCall) Header() http.Header {
8538 if c.header_ == nil {
8539 c.header_ = make(http.Header)
8540 }
8541 return c.header_
8542 }
8543
8544 func (c *ProjectsLocationsFeaturesListCall) doRequest(alt string) (*http.Response, error) {
8545 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8546 if c.ifNoneMatch_ != "" {
8547 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8548 }
8549 c.urlParams_.Set("alt", alt)
8550 c.urlParams_.Set("prettyPrint", "false")
8551 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/features")
8552 urls += "?" + c.urlParams_.Encode()
8553 req, err := http.NewRequest("GET", urls, nil)
8554 if err != nil {
8555 return nil, err
8556 }
8557 req.Header = reqHeaders
8558 googleapi.Expand(req.URL, map[string]string{
8559 "parent": c.parent,
8560 })
8561 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.list", "request", internallog.HTTPRequest(req, nil))
8562 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8563 }
8564
8565 // Do executes the "gkehub.projects.locations.features.list" call.
8566 // Any non-2xx status code is an error. Response headers are in either
8567 // *ListFeaturesResponse.ServerResponse.Header or (if a response was returned
8568 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8569 // check whether the returned error was because http.StatusNotModified was
8570 // returned.
8571 func (c *ProjectsLocationsFeaturesListCall) Do(opts ...googleapi.CallOption) (*ListFeaturesResponse, error) {
8572 gensupport.SetOptions(c.urlParams_, opts...)
8573 res, err := c.doRequest("json")
8574 if res != nil && res.StatusCode == http.StatusNotModified {
8575 if res.Body != nil {
8576 res.Body.Close()
8577 }
8578 return nil, gensupport.WrapError(&googleapi.Error{
8579 Code: res.StatusCode,
8580 Header: res.Header,
8581 })
8582 }
8583 if err != nil {
8584 return nil, err
8585 }
8586 defer googleapi.CloseBody(res)
8587 if err := googleapi.CheckResponse(res); err != nil {
8588 return nil, gensupport.WrapError(err)
8589 }
8590 ret := &ListFeaturesResponse{
8591 ServerResponse: googleapi.ServerResponse{
8592 Header: res.Header,
8593 HTTPStatusCode: res.StatusCode,
8594 },
8595 }
8596 target := &ret
8597 b, err := gensupport.DecodeResponseBytes(target, res)
8598 if err != nil {
8599 return nil, err
8600 }
8601 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.list", "response", internallog.HTTPResponse(res, b))
8602 return ret, nil
8603 }
8604
8605 // Pages invokes f for each page of results.
8606 // A non-nil error returned from f will halt the iteration.
8607 // The provided context supersedes any context provided to the Context method.
8608 func (c *ProjectsLocationsFeaturesListCall) Pages(ctx context.Context, f func(*ListFeaturesResponse) error) error {
8609 c.ctx_ = ctx
8610 defer c.PageToken(c.urlParams_.Get("pageToken"))
8611 for {
8612 x, err := c.Do()
8613 if err != nil {
8614 return err
8615 }
8616 if err := f(x); err != nil {
8617 return err
8618 }
8619 if x.NextPageToken == "" {
8620 return nil
8621 }
8622 c.PageToken(x.NextPageToken)
8623 }
8624 }
8625
8626 type ProjectsLocationsFeaturesPatchCall struct {
8627 s *Service
8628 name string
8629 feature *Feature
8630 urlParams_ gensupport.URLParams
8631 ctx_ context.Context
8632 header_ http.Header
8633 }
8634
8635 // Patch: Updates an existing Feature.
8636 //
8637 // - name: The Feature resource name in the format
8638 // `projects/*/locations/*/features/*`.
8639 func (r *ProjectsLocationsFeaturesService) Patch(name string, feature *Feature) *ProjectsLocationsFeaturesPatchCall {
8640 c := &ProjectsLocationsFeaturesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8641 c.name = name
8642 c.feature = feature
8643 return c
8644 }
8645
8646 // RequestId sets the optional parameter "requestId": A request ID to identify
8647 // requests. Specify a unique request ID so that if you must retry your
8648 // request, the server will know to ignore the request if it has already been
8649 // completed. The server will guarantee that for at least 60 minutes after the
8650 // first request. For example, consider a situation where you make an initial
8651 // request and the request times out. If you make the request again with the
8652 // same request ID, the server can check if original operation with the same
8653 // request ID was received, and if so, will ignore the second request. This
8654 // prevents clients from accidentally creating duplicate commitments. The
8655 // request ID must be a valid UUID with the exception that zero UUID is not
8656 // supported (00000000-0000-0000-0000-000000000000).
8657 func (c *ProjectsLocationsFeaturesPatchCall) RequestId(requestId string) *ProjectsLocationsFeaturesPatchCall {
8658 c.urlParams_.Set("requestId", requestId)
8659 return c
8660 }
8661
8662 // UpdateMask sets the optional parameter "updateMask": Mask of fields to
8663 // update.
8664 func (c *ProjectsLocationsFeaturesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeaturesPatchCall {
8665 c.urlParams_.Set("updateMask", updateMask)
8666 return c
8667 }
8668
8669 // Fields allows partial responses to be retrieved. See
8670 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8671 // details.
8672 func (c *ProjectsLocationsFeaturesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesPatchCall {
8673 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8674 return c
8675 }
8676
8677 // Context sets the context to be used in this call's Do method.
8678 func (c *ProjectsLocationsFeaturesPatchCall) Context(ctx context.Context) *ProjectsLocationsFeaturesPatchCall {
8679 c.ctx_ = ctx
8680 return c
8681 }
8682
8683 // Header returns a http.Header that can be modified by the caller to add
8684 // headers to the request.
8685 func (c *ProjectsLocationsFeaturesPatchCall) Header() http.Header {
8686 if c.header_ == nil {
8687 c.header_ = make(http.Header)
8688 }
8689 return c.header_
8690 }
8691
8692 func (c *ProjectsLocationsFeaturesPatchCall) doRequest(alt string) (*http.Response, error) {
8693 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8694 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.feature)
8695 if err != nil {
8696 return nil, err
8697 }
8698 c.urlParams_.Set("alt", alt)
8699 c.urlParams_.Set("prettyPrint", "false")
8700 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
8701 urls += "?" + c.urlParams_.Encode()
8702 req, err := http.NewRequest("PATCH", urls, body)
8703 if err != nil {
8704 return nil, err
8705 }
8706 req.Header = reqHeaders
8707 googleapi.Expand(req.URL, map[string]string{
8708 "name": c.name,
8709 })
8710 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
8711 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8712 }
8713
8714 // Do executes the "gkehub.projects.locations.features.patch" call.
8715 // Any non-2xx status code is an error. Response headers are in either
8716 // *Operation.ServerResponse.Header or (if a response was returned at all) in
8717 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8718 // whether the returned error was because http.StatusNotModified was returned.
8719 func (c *ProjectsLocationsFeaturesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8720 gensupport.SetOptions(c.urlParams_, opts...)
8721 res, err := c.doRequest("json")
8722 if res != nil && res.StatusCode == http.StatusNotModified {
8723 if res.Body != nil {
8724 res.Body.Close()
8725 }
8726 return nil, gensupport.WrapError(&googleapi.Error{
8727 Code: res.StatusCode,
8728 Header: res.Header,
8729 })
8730 }
8731 if err != nil {
8732 return nil, err
8733 }
8734 defer googleapi.CloseBody(res)
8735 if err := googleapi.CheckResponse(res); err != nil {
8736 return nil, gensupport.WrapError(err)
8737 }
8738 ret := &Operation{
8739 ServerResponse: googleapi.ServerResponse{
8740 Header: res.Header,
8741 HTTPStatusCode: res.StatusCode,
8742 },
8743 }
8744 target := &ret
8745 b, err := gensupport.DecodeResponseBytes(target, res)
8746 if err != nil {
8747 return nil, err
8748 }
8749 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.patch", "response", internallog.HTTPResponse(res, b))
8750 return ret, nil
8751 }
8752
8753 type ProjectsLocationsFeaturesSetIamPolicyCall struct {
8754 s *Service
8755 resource string
8756 setiampolicyrequest *SetIamPolicyRequest
8757 urlParams_ gensupport.URLParams
8758 ctx_ context.Context
8759 header_ http.Header
8760 }
8761
8762 // SetIamPolicy: Sets the access control policy on the specified resource.
8763 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
8764 // and `PERMISSION_DENIED` errors.
8765 //
8766 // - resource: REQUIRED: The resource for which the policy is being specified.
8767 // See Resource names (https://cloud.google.com/apis/design/resource_names)
8768 // for the appropriate value for this field.
8769 func (r *ProjectsLocationsFeaturesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsFeaturesSetIamPolicyCall {
8770 c := &ProjectsLocationsFeaturesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8771 c.resource = resource
8772 c.setiampolicyrequest = setiampolicyrequest
8773 return c
8774 }
8775
8776 // Fields allows partial responses to be retrieved. See
8777 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8778 // details.
8779 func (c *ProjectsLocationsFeaturesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesSetIamPolicyCall {
8780 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8781 return c
8782 }
8783
8784 // Context sets the context to be used in this call's Do method.
8785 func (c *ProjectsLocationsFeaturesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturesSetIamPolicyCall {
8786 c.ctx_ = ctx
8787 return c
8788 }
8789
8790 // Header returns a http.Header that can be modified by the caller to add
8791 // headers to the request.
8792 func (c *ProjectsLocationsFeaturesSetIamPolicyCall) Header() http.Header {
8793 if c.header_ == nil {
8794 c.header_ = make(http.Header)
8795 }
8796 return c.header_
8797 }
8798
8799 func (c *ProjectsLocationsFeaturesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8800 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8801 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
8802 if err != nil {
8803 return nil, err
8804 }
8805 c.urlParams_.Set("alt", alt)
8806 c.urlParams_.Set("prettyPrint", "false")
8807 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy")
8808 urls += "?" + c.urlParams_.Encode()
8809 req, err := http.NewRequest("POST", urls, body)
8810 if err != nil {
8811 return nil, err
8812 }
8813 req.Header = reqHeaders
8814 googleapi.Expand(req.URL, map[string]string{
8815 "resource": c.resource,
8816 })
8817 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
8818 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8819 }
8820
8821 // Do executes the "gkehub.projects.locations.features.setIamPolicy" call.
8822 // Any non-2xx status code is an error. Response headers are in either
8823 // *Policy.ServerResponse.Header or (if a response was returned at all) in
8824 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8825 // whether the returned error was because http.StatusNotModified was returned.
8826 func (c *ProjectsLocationsFeaturesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8827 gensupport.SetOptions(c.urlParams_, opts...)
8828 res, err := c.doRequest("json")
8829 if res != nil && res.StatusCode == http.StatusNotModified {
8830 if res.Body != nil {
8831 res.Body.Close()
8832 }
8833 return nil, gensupport.WrapError(&googleapi.Error{
8834 Code: res.StatusCode,
8835 Header: res.Header,
8836 })
8837 }
8838 if err != nil {
8839 return nil, err
8840 }
8841 defer googleapi.CloseBody(res)
8842 if err := googleapi.CheckResponse(res); err != nil {
8843 return nil, gensupport.WrapError(err)
8844 }
8845 ret := &Policy{
8846 ServerResponse: googleapi.ServerResponse{
8847 Header: res.Header,
8848 HTTPStatusCode: res.StatusCode,
8849 },
8850 }
8851 target := &ret
8852 b, err := gensupport.DecodeResponseBytes(target, res)
8853 if err != nil {
8854 return nil, err
8855 }
8856 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.setIamPolicy", "response", internallog.HTTPResponse(res, b))
8857 return ret, nil
8858 }
8859
8860 type ProjectsLocationsFeaturesTestIamPermissionsCall struct {
8861 s *Service
8862 resource string
8863 testiampermissionsrequest *TestIamPermissionsRequest
8864 urlParams_ gensupport.URLParams
8865 ctx_ context.Context
8866 header_ http.Header
8867 }
8868
8869 // TestIamPermissions: Returns permissions that a caller has on the specified
8870 // resource. If the resource does not exist, this will return an empty set of
8871 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
8872 // used for building permission-aware UIs and command-line tools, not for
8873 // authorization checking. This operation may "fail open" without warning.
8874 //
8875 // - resource: REQUIRED: The resource for which the policy detail is being
8876 // requested. See Resource names
8877 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
8878 // value for this field.
8879 func (r *ProjectsLocationsFeaturesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsFeaturesTestIamPermissionsCall {
8880 c := &ProjectsLocationsFeaturesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8881 c.resource = resource
8882 c.testiampermissionsrequest = testiampermissionsrequest
8883 return c
8884 }
8885
8886 // Fields allows partial responses to be retrieved. See
8887 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8888 // details.
8889 func (c *ProjectsLocationsFeaturesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesTestIamPermissionsCall {
8890 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8891 return c
8892 }
8893
8894 // Context sets the context to be used in this call's Do method.
8895 func (c *ProjectsLocationsFeaturesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFeaturesTestIamPermissionsCall {
8896 c.ctx_ = ctx
8897 return c
8898 }
8899
8900 // Header returns a http.Header that can be modified by the caller to add
8901 // headers to the request.
8902 func (c *ProjectsLocationsFeaturesTestIamPermissionsCall) Header() http.Header {
8903 if c.header_ == nil {
8904 c.header_ = make(http.Header)
8905 }
8906 return c.header_
8907 }
8908
8909 func (c *ProjectsLocationsFeaturesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
8910 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8911 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
8912 if err != nil {
8913 return nil, err
8914 }
8915 c.urlParams_.Set("alt", alt)
8916 c.urlParams_.Set("prettyPrint", "false")
8917 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions")
8918 urls += "?" + c.urlParams_.Encode()
8919 req, err := http.NewRequest("POST", urls, body)
8920 if err != nil {
8921 return nil, err
8922 }
8923 req.Header = reqHeaders
8924 googleapi.Expand(req.URL, map[string]string{
8925 "resource": c.resource,
8926 })
8927 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
8928 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8929 }
8930
8931 // Do executes the "gkehub.projects.locations.features.testIamPermissions" call.
8932 // Any non-2xx status code is an error. Response headers are in either
8933 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
8934 // returned at all) in error.(*googleapi.Error).Header. Use
8935 // googleapi.IsNotModified to check whether the returned error was because
8936 // http.StatusNotModified was returned.
8937 func (c *ProjectsLocationsFeaturesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
8938 gensupport.SetOptions(c.urlParams_, opts...)
8939 res, err := c.doRequest("json")
8940 if res != nil && res.StatusCode == http.StatusNotModified {
8941 if res.Body != nil {
8942 res.Body.Close()
8943 }
8944 return nil, gensupport.WrapError(&googleapi.Error{
8945 Code: res.StatusCode,
8946 Header: res.Header,
8947 })
8948 }
8949 if err != nil {
8950 return nil, err
8951 }
8952 defer googleapi.CloseBody(res)
8953 if err := googleapi.CheckResponse(res); err != nil {
8954 return nil, gensupport.WrapError(err)
8955 }
8956 ret := &TestIamPermissionsResponse{
8957 ServerResponse: googleapi.ServerResponse{
8958 Header: res.Header,
8959 HTTPStatusCode: res.StatusCode,
8960 },
8961 }
8962 target := &ret
8963 b, err := gensupport.DecodeResponseBytes(target, res)
8964 if err != nil {
8965 return nil, err
8966 }
8967 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.testIamPermissions", "response", internallog.HTTPResponse(res, b))
8968 return ret, nil
8969 }
8970
8971 type ProjectsLocationsFleetsCreateCall struct {
8972 s *Service
8973 parent string
8974 fleet *Fleet
8975 urlParams_ gensupport.URLParams
8976 ctx_ context.Context
8977 header_ http.Header
8978 }
8979
8980 // Create: Creates a fleet.
8981 //
8982 // - parent: The parent (project and location) where the Fleet will be created.
8983 // Specified in the format `projects/*/locations/*`.
8984 func (r *ProjectsLocationsFleetsService) Create(parent string, fleet *Fleet) *ProjectsLocationsFleetsCreateCall {
8985 c := &ProjectsLocationsFleetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8986 c.parent = parent
8987 c.fleet = fleet
8988 return c
8989 }
8990
8991 // Fields allows partial responses to be retrieved. See
8992 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8993 // details.
8994 func (c *ProjectsLocationsFleetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFleetsCreateCall {
8995 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8996 return c
8997 }
8998
8999 // Context sets the context to be used in this call's Do method.
9000 func (c *ProjectsLocationsFleetsCreateCall) Context(ctx context.Context) *ProjectsLocationsFleetsCreateCall {
9001 c.ctx_ = ctx
9002 return c
9003 }
9004
9005 // Header returns a http.Header that can be modified by the caller to add
9006 // headers to the request.
9007 func (c *ProjectsLocationsFleetsCreateCall) Header() http.Header {
9008 if c.header_ == nil {
9009 c.header_ = make(http.Header)
9010 }
9011 return c.header_
9012 }
9013
9014 func (c *ProjectsLocationsFleetsCreateCall) doRequest(alt string) (*http.Response, error) {
9015 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9016 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.fleet)
9017 if err != nil {
9018 return nil, err
9019 }
9020 c.urlParams_.Set("alt", alt)
9021 c.urlParams_.Set("prettyPrint", "false")
9022 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/fleets")
9023 urls += "?" + c.urlParams_.Encode()
9024 req, err := http.NewRequest("POST", urls, body)
9025 if err != nil {
9026 return nil, err
9027 }
9028 req.Header = reqHeaders
9029 googleapi.Expand(req.URL, map[string]string{
9030 "parent": c.parent,
9031 })
9032 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.create", "request", internallog.HTTPRequest(req, body.Bytes()))
9033 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9034 }
9035
9036 // Do executes the "gkehub.projects.locations.fleets.create" call.
9037 // Any non-2xx status code is an error. Response headers are in either
9038 // *Operation.ServerResponse.Header or (if a response was returned at all) in
9039 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9040 // whether the returned error was because http.StatusNotModified was returned.
9041 func (c *ProjectsLocationsFleetsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9042 gensupport.SetOptions(c.urlParams_, opts...)
9043 res, err := c.doRequest("json")
9044 if res != nil && res.StatusCode == http.StatusNotModified {
9045 if res.Body != nil {
9046 res.Body.Close()
9047 }
9048 return nil, gensupport.WrapError(&googleapi.Error{
9049 Code: res.StatusCode,
9050 Header: res.Header,
9051 })
9052 }
9053 if err != nil {
9054 return nil, err
9055 }
9056 defer googleapi.CloseBody(res)
9057 if err := googleapi.CheckResponse(res); err != nil {
9058 return nil, gensupport.WrapError(err)
9059 }
9060 ret := &Operation{
9061 ServerResponse: googleapi.ServerResponse{
9062 Header: res.Header,
9063 HTTPStatusCode: res.StatusCode,
9064 },
9065 }
9066 target := &ret
9067 b, err := gensupport.DecodeResponseBytes(target, res)
9068 if err != nil {
9069 return nil, err
9070 }
9071 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.create", "response", internallog.HTTPResponse(res, b))
9072 return ret, nil
9073 }
9074
9075 type ProjectsLocationsFleetsDeleteCall struct {
9076 s *Service
9077 name string
9078 urlParams_ gensupport.URLParams
9079 ctx_ context.Context
9080 header_ http.Header
9081 }
9082
9083 // Delete: Removes a Fleet. There must be no memberships remaining in the
9084 // Fleet.
9085 //
9086 // - name: The Fleet resource name in the format
9087 // `projects/*/locations/*/fleets/*`.
9088 func (r *ProjectsLocationsFleetsService) Delete(name string) *ProjectsLocationsFleetsDeleteCall {
9089 c := &ProjectsLocationsFleetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9090 c.name = name
9091 return c
9092 }
9093
9094 // Fields allows partial responses to be retrieved. See
9095 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9096 // details.
9097 func (c *ProjectsLocationsFleetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFleetsDeleteCall {
9098 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9099 return c
9100 }
9101
9102 // Context sets the context to be used in this call's Do method.
9103 func (c *ProjectsLocationsFleetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFleetsDeleteCall {
9104 c.ctx_ = ctx
9105 return c
9106 }
9107
9108 // Header returns a http.Header that can be modified by the caller to add
9109 // headers to the request.
9110 func (c *ProjectsLocationsFleetsDeleteCall) Header() http.Header {
9111 if c.header_ == nil {
9112 c.header_ = make(http.Header)
9113 }
9114 return c.header_
9115 }
9116
9117 func (c *ProjectsLocationsFleetsDeleteCall) doRequest(alt string) (*http.Response, error) {
9118 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9119 c.urlParams_.Set("alt", alt)
9120 c.urlParams_.Set("prettyPrint", "false")
9121 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
9122 urls += "?" + c.urlParams_.Encode()
9123 req, err := http.NewRequest("DELETE", urls, nil)
9124 if err != nil {
9125 return nil, err
9126 }
9127 req.Header = reqHeaders
9128 googleapi.Expand(req.URL, map[string]string{
9129 "name": c.name,
9130 })
9131 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.delete", "request", internallog.HTTPRequest(req, nil))
9132 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9133 }
9134
9135 // Do executes the "gkehub.projects.locations.fleets.delete" call.
9136 // Any non-2xx status code is an error. Response headers are in either
9137 // *Operation.ServerResponse.Header or (if a response was returned at all) in
9138 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9139 // whether the returned error was because http.StatusNotModified was returned.
9140 func (c *ProjectsLocationsFleetsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9141 gensupport.SetOptions(c.urlParams_, opts...)
9142 res, err := c.doRequest("json")
9143 if res != nil && res.StatusCode == http.StatusNotModified {
9144 if res.Body != nil {
9145 res.Body.Close()
9146 }
9147 return nil, gensupport.WrapError(&googleapi.Error{
9148 Code: res.StatusCode,
9149 Header: res.Header,
9150 })
9151 }
9152 if err != nil {
9153 return nil, err
9154 }
9155 defer googleapi.CloseBody(res)
9156 if err := googleapi.CheckResponse(res); err != nil {
9157 return nil, gensupport.WrapError(err)
9158 }
9159 ret := &Operation{
9160 ServerResponse: googleapi.ServerResponse{
9161 Header: res.Header,
9162 HTTPStatusCode: res.StatusCode,
9163 },
9164 }
9165 target := &ret
9166 b, err := gensupport.DecodeResponseBytes(target, res)
9167 if err != nil {
9168 return nil, err
9169 }
9170 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.delete", "response", internallog.HTTPResponse(res, b))
9171 return ret, nil
9172 }
9173
9174 type ProjectsLocationsFleetsGetCall struct {
9175 s *Service
9176 name string
9177 urlParams_ gensupport.URLParams
9178 ifNoneMatch_ string
9179 ctx_ context.Context
9180 header_ http.Header
9181 }
9182
9183 // Get: Returns the details of a fleet.
9184 //
9185 // - name: The Fleet resource name in the format
9186 // `projects/*/locations/*/fleets/*`.
9187 func (r *ProjectsLocationsFleetsService) Get(name string) *ProjectsLocationsFleetsGetCall {
9188 c := &ProjectsLocationsFleetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9189 c.name = name
9190 return c
9191 }
9192
9193 // Fields allows partial responses to be retrieved. See
9194 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9195 // details.
9196 func (c *ProjectsLocationsFleetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFleetsGetCall {
9197 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9198 return c
9199 }
9200
9201 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9202 // object's ETag matches the given value. This is useful for getting updates
9203 // only after the object has changed since the last request.
9204 func (c *ProjectsLocationsFleetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFleetsGetCall {
9205 c.ifNoneMatch_ = entityTag
9206 return c
9207 }
9208
9209 // Context sets the context to be used in this call's Do method.
9210 func (c *ProjectsLocationsFleetsGetCall) Context(ctx context.Context) *ProjectsLocationsFleetsGetCall {
9211 c.ctx_ = ctx
9212 return c
9213 }
9214
9215 // Header returns a http.Header that can be modified by the caller to add
9216 // headers to the request.
9217 func (c *ProjectsLocationsFleetsGetCall) Header() http.Header {
9218 if c.header_ == nil {
9219 c.header_ = make(http.Header)
9220 }
9221 return c.header_
9222 }
9223
9224 func (c *ProjectsLocationsFleetsGetCall) doRequest(alt string) (*http.Response, error) {
9225 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9226 if c.ifNoneMatch_ != "" {
9227 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9228 }
9229 c.urlParams_.Set("alt", alt)
9230 c.urlParams_.Set("prettyPrint", "false")
9231 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
9232 urls += "?" + c.urlParams_.Encode()
9233 req, err := http.NewRequest("GET", urls, nil)
9234 if err != nil {
9235 return nil, err
9236 }
9237 req.Header = reqHeaders
9238 googleapi.Expand(req.URL, map[string]string{
9239 "name": c.name,
9240 })
9241 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.get", "request", internallog.HTTPRequest(req, nil))
9242 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9243 }
9244
9245 // Do executes the "gkehub.projects.locations.fleets.get" call.
9246 // Any non-2xx status code is an error. Response headers are in either
9247 // *Fleet.ServerResponse.Header or (if a response was returned at all) in
9248 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9249 // whether the returned error was because http.StatusNotModified was returned.
9250 func (c *ProjectsLocationsFleetsGetCall) Do(opts ...googleapi.CallOption) (*Fleet, error) {
9251 gensupport.SetOptions(c.urlParams_, opts...)
9252 res, err := c.doRequest("json")
9253 if res != nil && res.StatusCode == http.StatusNotModified {
9254 if res.Body != nil {
9255 res.Body.Close()
9256 }
9257 return nil, gensupport.WrapError(&googleapi.Error{
9258 Code: res.StatusCode,
9259 Header: res.Header,
9260 })
9261 }
9262 if err != nil {
9263 return nil, err
9264 }
9265 defer googleapi.CloseBody(res)
9266 if err := googleapi.CheckResponse(res); err != nil {
9267 return nil, gensupport.WrapError(err)
9268 }
9269 ret := &Fleet{
9270 ServerResponse: googleapi.ServerResponse{
9271 Header: res.Header,
9272 HTTPStatusCode: res.StatusCode,
9273 },
9274 }
9275 target := &ret
9276 b, err := gensupport.DecodeResponseBytes(target, res)
9277 if err != nil {
9278 return nil, err
9279 }
9280 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.get", "response", internallog.HTTPResponse(res, b))
9281 return ret, nil
9282 }
9283
9284 type ProjectsLocationsFleetsListCall struct {
9285 s *Service
9286 parent string
9287 urlParams_ gensupport.URLParams
9288 ifNoneMatch_ string
9289 ctx_ context.Context
9290 header_ http.Header
9291 }
9292
9293 // List: Returns all fleets within an organization or a project that the caller
9294 // has access to.
9295 //
9296 // - parent: The organization or project to list for Fleets under, in the
9297 // format `organizations/*/locations/*` or `projects/*/locations/*`.
9298 func (r *ProjectsLocationsFleetsService) List(parent string) *ProjectsLocationsFleetsListCall {
9299 c := &ProjectsLocationsFleetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9300 c.parent = parent
9301 return c
9302 }
9303
9304 // PageSize sets the optional parameter "pageSize": The maximum number of
9305 // fleets to return. The service may return fewer than this value. If
9306 // unspecified, at most 200 fleets will be returned. The maximum value is 1000;
9307 // values above 1000 will be coerced to 1000.
9308 func (c *ProjectsLocationsFleetsListCall) PageSize(pageSize int64) *ProjectsLocationsFleetsListCall {
9309 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9310 return c
9311 }
9312
9313 // PageToken sets the optional parameter "pageToken": A page token, received
9314 // from a previous `ListFleets` call. Provide this to retrieve the subsequent
9315 // page. When paginating, all other parameters provided to `ListFleets` must
9316 // match the call that provided the page token.
9317 func (c *ProjectsLocationsFleetsListCall) PageToken(pageToken string) *ProjectsLocationsFleetsListCall {
9318 c.urlParams_.Set("pageToken", pageToken)
9319 return c
9320 }
9321
9322 // Fields allows partial responses to be retrieved. See
9323 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9324 // details.
9325 func (c *ProjectsLocationsFleetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFleetsListCall {
9326 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9327 return c
9328 }
9329
9330 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9331 // object's ETag matches the given value. This is useful for getting updates
9332 // only after the object has changed since the last request.
9333 func (c *ProjectsLocationsFleetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFleetsListCall {
9334 c.ifNoneMatch_ = entityTag
9335 return c
9336 }
9337
9338 // Context sets the context to be used in this call's Do method.
9339 func (c *ProjectsLocationsFleetsListCall) Context(ctx context.Context) *ProjectsLocationsFleetsListCall {
9340 c.ctx_ = ctx
9341 return c
9342 }
9343
9344 // Header returns a http.Header that can be modified by the caller to add
9345 // headers to the request.
9346 func (c *ProjectsLocationsFleetsListCall) Header() http.Header {
9347 if c.header_ == nil {
9348 c.header_ = make(http.Header)
9349 }
9350 return c.header_
9351 }
9352
9353 func (c *ProjectsLocationsFleetsListCall) doRequest(alt string) (*http.Response, error) {
9354 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9355 if c.ifNoneMatch_ != "" {
9356 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9357 }
9358 c.urlParams_.Set("alt", alt)
9359 c.urlParams_.Set("prettyPrint", "false")
9360 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/fleets")
9361 urls += "?" + c.urlParams_.Encode()
9362 req, err := http.NewRequest("GET", urls, nil)
9363 if err != nil {
9364 return nil, err
9365 }
9366 req.Header = reqHeaders
9367 googleapi.Expand(req.URL, map[string]string{
9368 "parent": c.parent,
9369 })
9370 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.list", "request", internallog.HTTPRequest(req, nil))
9371 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9372 }
9373
9374 // Do executes the "gkehub.projects.locations.fleets.list" call.
9375 // Any non-2xx status code is an error. Response headers are in either
9376 // *ListFleetsResponse.ServerResponse.Header or (if a response was returned at
9377 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9378 // check whether the returned error was because http.StatusNotModified was
9379 // returned.
9380 func (c *ProjectsLocationsFleetsListCall) Do(opts ...googleapi.CallOption) (*ListFleetsResponse, error) {
9381 gensupport.SetOptions(c.urlParams_, opts...)
9382 res, err := c.doRequest("json")
9383 if res != nil && res.StatusCode == http.StatusNotModified {
9384 if res.Body != nil {
9385 res.Body.Close()
9386 }
9387 return nil, gensupport.WrapError(&googleapi.Error{
9388 Code: res.StatusCode,
9389 Header: res.Header,
9390 })
9391 }
9392 if err != nil {
9393 return nil, err
9394 }
9395 defer googleapi.CloseBody(res)
9396 if err := googleapi.CheckResponse(res); err != nil {
9397 return nil, gensupport.WrapError(err)
9398 }
9399 ret := &ListFleetsResponse{
9400 ServerResponse: googleapi.ServerResponse{
9401 Header: res.Header,
9402 HTTPStatusCode: res.StatusCode,
9403 },
9404 }
9405 target := &ret
9406 b, err := gensupport.DecodeResponseBytes(target, res)
9407 if err != nil {
9408 return nil, err
9409 }
9410 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.list", "response", internallog.HTTPResponse(res, b))
9411 return ret, nil
9412 }
9413
9414 // Pages invokes f for each page of results.
9415 // A non-nil error returned from f will halt the iteration.
9416 // The provided context supersedes any context provided to the Context method.
9417 func (c *ProjectsLocationsFleetsListCall) Pages(ctx context.Context, f func(*ListFleetsResponse) error) error {
9418 c.ctx_ = ctx
9419 defer c.PageToken(c.urlParams_.Get("pageToken"))
9420 for {
9421 x, err := c.Do()
9422 if err != nil {
9423 return err
9424 }
9425 if err := f(x); err != nil {
9426 return err
9427 }
9428 if x.NextPageToken == "" {
9429 return nil
9430 }
9431 c.PageToken(x.NextPageToken)
9432 }
9433 }
9434
9435 type ProjectsLocationsFleetsPatchCall struct {
9436 s *Service
9437 name string
9438 fleet *Fleet
9439 urlParams_ gensupport.URLParams
9440 ctx_ context.Context
9441 header_ http.Header
9442 }
9443
9444 // Patch: Updates a fleet.
9445 //
9446 // - name: Output only. The full, unique resource name of this fleet in the
9447 // format of `projects/{project}/locations/{location}/fleets/{fleet}`. Each
9448 // Google Cloud project can have at most one fleet resource, named "default".
9449 func (r *ProjectsLocationsFleetsService) Patch(name string, fleet *Fleet) *ProjectsLocationsFleetsPatchCall {
9450 c := &ProjectsLocationsFleetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9451 c.name = name
9452 c.fleet = fleet
9453 return c
9454 }
9455
9456 // UpdateMask sets the optional parameter "updateMask": Required. The fields to
9457 // be updated;
9458 func (c *ProjectsLocationsFleetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFleetsPatchCall {
9459 c.urlParams_.Set("updateMask", updateMask)
9460 return c
9461 }
9462
9463 // Fields allows partial responses to be retrieved. See
9464 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9465 // details.
9466 func (c *ProjectsLocationsFleetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFleetsPatchCall {
9467 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9468 return c
9469 }
9470
9471 // Context sets the context to be used in this call's Do method.
9472 func (c *ProjectsLocationsFleetsPatchCall) Context(ctx context.Context) *ProjectsLocationsFleetsPatchCall {
9473 c.ctx_ = ctx
9474 return c
9475 }
9476
9477 // Header returns a http.Header that can be modified by the caller to add
9478 // headers to the request.
9479 func (c *ProjectsLocationsFleetsPatchCall) Header() http.Header {
9480 if c.header_ == nil {
9481 c.header_ = make(http.Header)
9482 }
9483 return c.header_
9484 }
9485
9486 func (c *ProjectsLocationsFleetsPatchCall) doRequest(alt string) (*http.Response, error) {
9487 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9488 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.fleet)
9489 if err != nil {
9490 return nil, err
9491 }
9492 c.urlParams_.Set("alt", alt)
9493 c.urlParams_.Set("prettyPrint", "false")
9494 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
9495 urls += "?" + c.urlParams_.Encode()
9496 req, err := http.NewRequest("PATCH", urls, body)
9497 if err != nil {
9498 return nil, err
9499 }
9500 req.Header = reqHeaders
9501 googleapi.Expand(req.URL, map[string]string{
9502 "name": c.name,
9503 })
9504 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
9505 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9506 }
9507
9508 // Do executes the "gkehub.projects.locations.fleets.patch" call.
9509 // Any non-2xx status code is an error. Response headers are in either
9510 // *Operation.ServerResponse.Header or (if a response was returned at all) in
9511 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9512 // whether the returned error was because http.StatusNotModified was returned.
9513 func (c *ProjectsLocationsFleetsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9514 gensupport.SetOptions(c.urlParams_, opts...)
9515 res, err := c.doRequest("json")
9516 if res != nil && res.StatusCode == http.StatusNotModified {
9517 if res.Body != nil {
9518 res.Body.Close()
9519 }
9520 return nil, gensupport.WrapError(&googleapi.Error{
9521 Code: res.StatusCode,
9522 Header: res.Header,
9523 })
9524 }
9525 if err != nil {
9526 return nil, err
9527 }
9528 defer googleapi.CloseBody(res)
9529 if err := googleapi.CheckResponse(res); err != nil {
9530 return nil, gensupport.WrapError(err)
9531 }
9532 ret := &Operation{
9533 ServerResponse: googleapi.ServerResponse{
9534 Header: res.Header,
9535 HTTPStatusCode: res.StatusCode,
9536 },
9537 }
9538 target := &ret
9539 b, err := gensupport.DecodeResponseBytes(target, res)
9540 if err != nil {
9541 return nil, err
9542 }
9543 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.patch", "response", internallog.HTTPResponse(res, b))
9544 return ret, nil
9545 }
9546
9547 type ProjectsLocationsMembershipsCreateCall struct {
9548 s *Service
9549 parent string
9550 membership *Membership
9551 urlParams_ gensupport.URLParams
9552 ctx_ context.Context
9553 header_ http.Header
9554 }
9555
9556 // Create: Creates a new Membership. **This is currently only supported for GKE
9557 // clusters on Google Cloud**. To register other clusters, follow the
9558 // instructions at
9559 // https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
9560 //
9561 // - parent: The parent (project and location) where the Memberships will be
9562 // created. Specified in the format `projects/*/locations/*`.
9563 func (r *ProjectsLocationsMembershipsService) Create(parent string, membership *Membership) *ProjectsLocationsMembershipsCreateCall {
9564 c := &ProjectsLocationsMembershipsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9565 c.parent = parent
9566 c.membership = membership
9567 return c
9568 }
9569
9570 // MembershipId sets the optional parameter "membershipId": Required. Client
9571 // chosen ID for the membership. `membership_id` must be a valid RFC 1123
9572 // compliant DNS label: 1. At most 63 characters in length 2. It must consist
9573 // of lower case alphanumeric characters or `-` 3. It must start and end with
9574 // an alphanumeric character Which can be expressed as the regex:
9575 // `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
9576 func (c *ProjectsLocationsMembershipsCreateCall) MembershipId(membershipId string) *ProjectsLocationsMembershipsCreateCall {
9577 c.urlParams_.Set("membershipId", membershipId)
9578 return c
9579 }
9580
9581 // RequestId sets the optional parameter "requestId": A request ID to identify
9582 // requests. Specify a unique request ID so that if you must retry your
9583 // request, the server will know to ignore the request if it has already been
9584 // completed. The server will guarantee that for at least 60 minutes after the
9585 // first request. For example, consider a situation where you make an initial
9586 // request and the request times out. If you make the request again with the
9587 // same request ID, the server can check if original operation with the same
9588 // request ID was received, and if so, will ignore the second request. This
9589 // prevents clients from accidentally creating duplicate commitments. The
9590 // request ID must be a valid UUID with the exception that zero UUID is not
9591 // supported (00000000-0000-0000-0000-000000000000).
9592 func (c *ProjectsLocationsMembershipsCreateCall) RequestId(requestId string) *ProjectsLocationsMembershipsCreateCall {
9593 c.urlParams_.Set("requestId", requestId)
9594 return c
9595 }
9596
9597 // Fields allows partial responses to be retrieved. See
9598 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9599 // details.
9600 func (c *ProjectsLocationsMembershipsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsCreateCall {
9601 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9602 return c
9603 }
9604
9605 // Context sets the context to be used in this call's Do method.
9606 func (c *ProjectsLocationsMembershipsCreateCall) Context(ctx context.Context) *ProjectsLocationsMembershipsCreateCall {
9607 c.ctx_ = ctx
9608 return c
9609 }
9610
9611 // Header returns a http.Header that can be modified by the caller to add
9612 // headers to the request.
9613 func (c *ProjectsLocationsMembershipsCreateCall) Header() http.Header {
9614 if c.header_ == nil {
9615 c.header_ = make(http.Header)
9616 }
9617 return c.header_
9618 }
9619
9620 func (c *ProjectsLocationsMembershipsCreateCall) doRequest(alt string) (*http.Response, error) {
9621 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9622 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.membership)
9623 if err != nil {
9624 return nil, err
9625 }
9626 c.urlParams_.Set("alt", alt)
9627 c.urlParams_.Set("prettyPrint", "false")
9628 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/memberships")
9629 urls += "?" + c.urlParams_.Encode()
9630 req, err := http.NewRequest("POST", urls, body)
9631 if err != nil {
9632 return nil, err
9633 }
9634 req.Header = reqHeaders
9635 googleapi.Expand(req.URL, map[string]string{
9636 "parent": c.parent,
9637 })
9638 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.create", "request", internallog.HTTPRequest(req, body.Bytes()))
9639 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9640 }
9641
9642 // Do executes the "gkehub.projects.locations.memberships.create" call.
9643 // Any non-2xx status code is an error. Response headers are in either
9644 // *Operation.ServerResponse.Header or (if a response was returned at all) in
9645 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9646 // whether the returned error was because http.StatusNotModified was returned.
9647 func (c *ProjectsLocationsMembershipsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9648 gensupport.SetOptions(c.urlParams_, opts...)
9649 res, err := c.doRequest("json")
9650 if res != nil && res.StatusCode == http.StatusNotModified {
9651 if res.Body != nil {
9652 res.Body.Close()
9653 }
9654 return nil, gensupport.WrapError(&googleapi.Error{
9655 Code: res.StatusCode,
9656 Header: res.Header,
9657 })
9658 }
9659 if err != nil {
9660 return nil, err
9661 }
9662 defer googleapi.CloseBody(res)
9663 if err := googleapi.CheckResponse(res); err != nil {
9664 return nil, gensupport.WrapError(err)
9665 }
9666 ret := &Operation{
9667 ServerResponse: googleapi.ServerResponse{
9668 Header: res.Header,
9669 HTTPStatusCode: res.StatusCode,
9670 },
9671 }
9672 target := &ret
9673 b, err := gensupport.DecodeResponseBytes(target, res)
9674 if err != nil {
9675 return nil, err
9676 }
9677 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.create", "response", internallog.HTTPResponse(res, b))
9678 return ret, nil
9679 }
9680
9681 type ProjectsLocationsMembershipsDeleteCall struct {
9682 s *Service
9683 name string
9684 urlParams_ gensupport.URLParams
9685 ctx_ context.Context
9686 header_ http.Header
9687 }
9688
9689 // Delete: Removes a Membership. **This is currently only supported for GKE
9690 // clusters on Google Cloud**. To unregister other clusters, follow the
9691 // instructions at
9692 // https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
9693 //
9694 // - name: The Membership resource name in the format
9695 // `projects/*/locations/*/memberships/*`.
9696 func (r *ProjectsLocationsMembershipsService) Delete(name string) *ProjectsLocationsMembershipsDeleteCall {
9697 c := &ProjectsLocationsMembershipsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9698 c.name = name
9699 return c
9700 }
9701
9702 // Force sets the optional parameter "force": If set to true, any subresource
9703 // from this Membership will also be deleted. Otherwise, the request will only
9704 // work if the Membership has no subresource.
9705 func (c *ProjectsLocationsMembershipsDeleteCall) Force(force bool) *ProjectsLocationsMembershipsDeleteCall {
9706 c.urlParams_.Set("force", fmt.Sprint(force))
9707 return c
9708 }
9709
9710 // RequestId sets the optional parameter "requestId": A request ID to identify
9711 // requests. Specify a unique request ID so that if you must retry your
9712 // request, the server will know to ignore the request if it has already been
9713 // completed. The server will guarantee that for at least 60 minutes after the
9714 // first request. For example, consider a situation where you make an initial
9715 // request and the request times out. If you make the request again with the
9716 // same request ID, the server can check if original operation with the same
9717 // request ID was received, and if so, will ignore the second request. This
9718 // prevents clients from accidentally creating duplicate commitments. The
9719 // request ID must be a valid UUID with the exception that zero UUID is not
9720 // supported (00000000-0000-0000-0000-000000000000).
9721 func (c *ProjectsLocationsMembershipsDeleteCall) RequestId(requestId string) *ProjectsLocationsMembershipsDeleteCall {
9722 c.urlParams_.Set("requestId", requestId)
9723 return c
9724 }
9725
9726 // Fields allows partial responses to be retrieved. See
9727 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9728 // details.
9729 func (c *ProjectsLocationsMembershipsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsDeleteCall {
9730 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9731 return c
9732 }
9733
9734 // Context sets the context to be used in this call's Do method.
9735 func (c *ProjectsLocationsMembershipsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMembershipsDeleteCall {
9736 c.ctx_ = ctx
9737 return c
9738 }
9739
9740 // Header returns a http.Header that can be modified by the caller to add
9741 // headers to the request.
9742 func (c *ProjectsLocationsMembershipsDeleteCall) Header() http.Header {
9743 if c.header_ == nil {
9744 c.header_ = make(http.Header)
9745 }
9746 return c.header_
9747 }
9748
9749 func (c *ProjectsLocationsMembershipsDeleteCall) doRequest(alt string) (*http.Response, error) {
9750 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9751 c.urlParams_.Set("alt", alt)
9752 c.urlParams_.Set("prettyPrint", "false")
9753 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
9754 urls += "?" + c.urlParams_.Encode()
9755 req, err := http.NewRequest("DELETE", urls, nil)
9756 if err != nil {
9757 return nil, err
9758 }
9759 req.Header = reqHeaders
9760 googleapi.Expand(req.URL, map[string]string{
9761 "name": c.name,
9762 })
9763 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.delete", "request", internallog.HTTPRequest(req, nil))
9764 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9765 }
9766
9767 // Do executes the "gkehub.projects.locations.memberships.delete" call.
9768 // Any non-2xx status code is an error. Response headers are in either
9769 // *Operation.ServerResponse.Header or (if a response was returned at all) in
9770 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9771 // whether the returned error was because http.StatusNotModified was returned.
9772 func (c *ProjectsLocationsMembershipsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9773 gensupport.SetOptions(c.urlParams_, opts...)
9774 res, err := c.doRequest("json")
9775 if res != nil && res.StatusCode == http.StatusNotModified {
9776 if res.Body != nil {
9777 res.Body.Close()
9778 }
9779 return nil, gensupport.WrapError(&googleapi.Error{
9780 Code: res.StatusCode,
9781 Header: res.Header,
9782 })
9783 }
9784 if err != nil {
9785 return nil, err
9786 }
9787 defer googleapi.CloseBody(res)
9788 if err := googleapi.CheckResponse(res); err != nil {
9789 return nil, gensupport.WrapError(err)
9790 }
9791 ret := &Operation{
9792 ServerResponse: googleapi.ServerResponse{
9793 Header: res.Header,
9794 HTTPStatusCode: res.StatusCode,
9795 },
9796 }
9797 target := &ret
9798 b, err := gensupport.DecodeResponseBytes(target, res)
9799 if err != nil {
9800 return nil, err
9801 }
9802 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.delete", "response", internallog.HTTPResponse(res, b))
9803 return ret, nil
9804 }
9805
9806 type ProjectsLocationsMembershipsGenerateConnectManifestCall struct {
9807 s *Service
9808 name string
9809 urlParams_ gensupport.URLParams
9810 ifNoneMatch_ string
9811 ctx_ context.Context
9812 header_ http.Header
9813 }
9814
9815 // GenerateConnectManifest: Generates the manifest for deployment of the GKE
9816 // connect agent. **This method is used internally by Google-provided
9817 // libraries.** Most clients should not need to call this method directly.
9818 //
9819 // - name: The Membership resource name the Agent will associate with, in the
9820 // format `projects/*/locations/*/memberships/*`.
9821 func (r *ProjectsLocationsMembershipsService) GenerateConnectManifest(name string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9822 c := &ProjectsLocationsMembershipsGenerateConnectManifestCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9823 c.name = name
9824 return c
9825 }
9826
9827 // ImagePullSecretContent sets the optional parameter "imagePullSecretContent":
9828 // The image pull secret content for the registry, if not public.
9829 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) ImagePullSecretContent(imagePullSecretContent string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9830 c.urlParams_.Set("imagePullSecretContent", imagePullSecretContent)
9831 return c
9832 }
9833
9834 // IsUpgrade sets the optional parameter "isUpgrade": If true, generate the
9835 // resources for upgrade only. Some resources generated only for installation
9836 // (e.g. secrets) will be excluded.
9837 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) IsUpgrade(isUpgrade bool) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9838 c.urlParams_.Set("isUpgrade", fmt.Sprint(isUpgrade))
9839 return c
9840 }
9841
9842 // Namespace sets the optional parameter "namespace": Namespace for GKE Connect
9843 // agent resources. Defaults to `gke-connect`. The Connect Agent is authorized
9844 // automatically when run in the default namespace. Otherwise, explicit
9845 // authorization must be granted with an additional IAM binding.
9846 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Namespace(namespace string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9847 c.urlParams_.Set("namespace", namespace)
9848 return c
9849 }
9850
9851 // Proxy sets the optional parameter "proxy": URI of a proxy if connectivity
9852 // from the agent to gkeconnect.googleapis.com requires the use of a proxy.
9853 // Format must be in the form `http(s)://{proxy_address}`, depending on the
9854 // HTTP/HTTPS protocol supported by the proxy. This will direct the connect
9855 // agent's outbound traffic through a HTTP(S) proxy.
9856 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Proxy(proxy string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9857 c.urlParams_.Set("proxy", proxy)
9858 return c
9859 }
9860
9861 // Registry sets the optional parameter "registry": The registry to fetch the
9862 // connect agent image from. Defaults to gcr.io/gkeconnect.
9863 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Registry(registry string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9864 c.urlParams_.Set("registry", registry)
9865 return c
9866 }
9867
9868 // Version sets the optional parameter "version": The Connect agent version to
9869 // use. Defaults to the most current version.
9870 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Version(version string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9871 c.urlParams_.Set("version", version)
9872 return c
9873 }
9874
9875 // Fields allows partial responses to be retrieved. See
9876 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9877 // details.
9878 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9879 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9880 return c
9881 }
9882
9883 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9884 // object's ETag matches the given value. This is useful for getting updates
9885 // only after the object has changed since the last request.
9886 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9887 c.ifNoneMatch_ = entityTag
9888 return c
9889 }
9890
9891 // Context sets the context to be used in this call's Do method.
9892 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Context(ctx context.Context) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
9893 c.ctx_ = ctx
9894 return c
9895 }
9896
9897 // Header returns a http.Header that can be modified by the caller to add
9898 // headers to the request.
9899 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Header() http.Header {
9900 if c.header_ == nil {
9901 c.header_ = make(http.Header)
9902 }
9903 return c.header_
9904 }
9905
9906 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) doRequest(alt string) (*http.Response, error) {
9907 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9908 if c.ifNoneMatch_ != "" {
9909 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9910 }
9911 c.urlParams_.Set("alt", alt)
9912 c.urlParams_.Set("prettyPrint", "false")
9913 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:generateConnectManifest")
9914 urls += "?" + c.urlParams_.Encode()
9915 req, err := http.NewRequest("GET", urls, nil)
9916 if err != nil {
9917 return nil, err
9918 }
9919 req.Header = reqHeaders
9920 googleapi.Expand(req.URL, map[string]string{
9921 "name": c.name,
9922 })
9923 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.generateConnectManifest", "request", internallog.HTTPRequest(req, nil))
9924 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9925 }
9926
9927 // Do executes the "gkehub.projects.locations.memberships.generateConnectManifest" call.
9928 // Any non-2xx status code is an error. Response headers are in either
9929 // *GenerateConnectManifestResponse.ServerResponse.Header or (if a response was
9930 // returned at all) in error.(*googleapi.Error).Header. Use
9931 // googleapi.IsNotModified to check whether the returned error was because
9932 // http.StatusNotModified was returned.
9933 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Do(opts ...googleapi.CallOption) (*GenerateConnectManifestResponse, error) {
9934 gensupport.SetOptions(c.urlParams_, opts...)
9935 res, err := c.doRequest("json")
9936 if res != nil && res.StatusCode == http.StatusNotModified {
9937 if res.Body != nil {
9938 res.Body.Close()
9939 }
9940 return nil, gensupport.WrapError(&googleapi.Error{
9941 Code: res.StatusCode,
9942 Header: res.Header,
9943 })
9944 }
9945 if err != nil {
9946 return nil, err
9947 }
9948 defer googleapi.CloseBody(res)
9949 if err := googleapi.CheckResponse(res); err != nil {
9950 return nil, gensupport.WrapError(err)
9951 }
9952 ret := &GenerateConnectManifestResponse{
9953 ServerResponse: googleapi.ServerResponse{
9954 Header: res.Header,
9955 HTTPStatusCode: res.StatusCode,
9956 },
9957 }
9958 target := &ret
9959 b, err := gensupport.DecodeResponseBytes(target, res)
9960 if err != nil {
9961 return nil, err
9962 }
9963 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.generateConnectManifest", "response", internallog.HTTPResponse(res, b))
9964 return ret, nil
9965 }
9966
9967 type ProjectsLocationsMembershipsGenerateExclusivityManifestCall struct {
9968 s *Service
9969 name string
9970 urlParams_ gensupport.URLParams
9971 ifNoneMatch_ string
9972 ctx_ context.Context
9973 header_ http.Header
9974 }
9975
9976 // GenerateExclusivityManifest: GenerateExclusivityManifest generates the
9977 // manifests to update the exclusivity artifacts in the cluster if needed.
9978 // Exclusivity artifacts include the Membership custom resource definition
9979 // (CRD) and the singleton Membership custom resource (CR). Combined with
9980 // ValidateExclusivity, exclusivity artifacts guarantee that a Kubernetes
9981 // cluster is only registered to a single GKE Hub. The Membership CRD is
9982 // versioned, and may require conversion when the GKE Hub API server begins
9983 // serving a newer version of the CRD and corresponding CR. The response will
9984 // be the converted CRD and CR if there are any differences between the
9985 // versions.
9986 //
9987 // - name: The Membership resource name in the format
9988 // `projects/*/locations/*/memberships/*`.
9989 func (r *ProjectsLocationsMembershipsService) GenerateExclusivityManifest(name string) *ProjectsLocationsMembershipsGenerateExclusivityManifestCall {
9990 c := &ProjectsLocationsMembershipsGenerateExclusivityManifestCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9991 c.name = name
9992 return c
9993 }
9994
9995 // CrManifest sets the optional parameter "crManifest": The YAML manifest of
9996 // the membership CR retrieved by `kubectl get memberships membership`. Leave
9997 // empty if the resource does not exist.
9998 func (c *ProjectsLocationsMembershipsGenerateExclusivityManifestCall) CrManifest(crManifest string) *ProjectsLocationsMembershipsGenerateExclusivityManifestCall {
9999 c.urlParams_.Set("crManifest", crManifest)
10000 return c
10001 }
10002
10003 // CrdManifest sets the optional parameter "crdManifest": The YAML manifest of
10004 // the membership CRD retrieved by `kubectl get customresourcedefinitions
10005 // membership`. Leave empty if the resource does not exist.
10006 func (c *ProjectsLocationsMembershipsGenerateExclusivityManifestCall) CrdManifest(crdManifest string) *ProjectsLocationsMembershipsGenerateExclusivityManifestCall {
10007 c.urlParams_.Set("crdManifest", crdManifest)
10008 return c
10009 }
10010
10011 // Fields allows partial responses to be retrieved. See
10012 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10013 // details.
10014 func (c *ProjectsLocationsMembershipsGenerateExclusivityManifestCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsGenerateExclusivityManifestCall {
10015 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10016 return c
10017 }
10018
10019 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10020 // object's ETag matches the given value. This is useful for getting updates
10021 // only after the object has changed since the last request.
10022 func (c *ProjectsLocationsMembershipsGenerateExclusivityManifestCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsGenerateExclusivityManifestCall {
10023 c.ifNoneMatch_ = entityTag
10024 return c
10025 }
10026
10027 // Context sets the context to be used in this call's Do method.
10028 func (c *ProjectsLocationsMembershipsGenerateExclusivityManifestCall) Context(ctx context.Context) *ProjectsLocationsMembershipsGenerateExclusivityManifestCall {
10029 c.ctx_ = ctx
10030 return c
10031 }
10032
10033 // Header returns a http.Header that can be modified by the caller to add
10034 // headers to the request.
10035 func (c *ProjectsLocationsMembershipsGenerateExclusivityManifestCall) Header() http.Header {
10036 if c.header_ == nil {
10037 c.header_ = make(http.Header)
10038 }
10039 return c.header_
10040 }
10041
10042 func (c *ProjectsLocationsMembershipsGenerateExclusivityManifestCall) doRequest(alt string) (*http.Response, error) {
10043 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10044 if c.ifNoneMatch_ != "" {
10045 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10046 }
10047 c.urlParams_.Set("alt", alt)
10048 c.urlParams_.Set("prettyPrint", "false")
10049 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:generateExclusivityManifest")
10050 urls += "?" + c.urlParams_.Encode()
10051 req, err := http.NewRequest("GET", urls, nil)
10052 if err != nil {
10053 return nil, err
10054 }
10055 req.Header = reqHeaders
10056 googleapi.Expand(req.URL, map[string]string{
10057 "name": c.name,
10058 })
10059 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.generateExclusivityManifest", "request", internallog.HTTPRequest(req, nil))
10060 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10061 }
10062
10063 // Do executes the "gkehub.projects.locations.memberships.generateExclusivityManifest" call.
10064 // Any non-2xx status code is an error. Response headers are in either
10065 // *GenerateExclusivityManifestResponse.ServerResponse.Header or (if a response
10066 // was returned at all) in error.(*googleapi.Error).Header. Use
10067 // googleapi.IsNotModified to check whether the returned error was because
10068 // http.StatusNotModified was returned.
10069 func (c *ProjectsLocationsMembershipsGenerateExclusivityManifestCall) Do(opts ...googleapi.CallOption) (*GenerateExclusivityManifestResponse, error) {
10070 gensupport.SetOptions(c.urlParams_, opts...)
10071 res, err := c.doRequest("json")
10072 if res != nil && res.StatusCode == http.StatusNotModified {
10073 if res.Body != nil {
10074 res.Body.Close()
10075 }
10076 return nil, gensupport.WrapError(&googleapi.Error{
10077 Code: res.StatusCode,
10078 Header: res.Header,
10079 })
10080 }
10081 if err != nil {
10082 return nil, err
10083 }
10084 defer googleapi.CloseBody(res)
10085 if err := googleapi.CheckResponse(res); err != nil {
10086 return nil, gensupport.WrapError(err)
10087 }
10088 ret := &GenerateExclusivityManifestResponse{
10089 ServerResponse: googleapi.ServerResponse{
10090 Header: res.Header,
10091 HTTPStatusCode: res.StatusCode,
10092 },
10093 }
10094 target := &ret
10095 b, err := gensupport.DecodeResponseBytes(target, res)
10096 if err != nil {
10097 return nil, err
10098 }
10099 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.generateExclusivityManifest", "response", internallog.HTTPResponse(res, b))
10100 return ret, nil
10101 }
10102
10103 type ProjectsLocationsMembershipsGetCall struct {
10104 s *Service
10105 name string
10106 urlParams_ gensupport.URLParams
10107 ifNoneMatch_ string
10108 ctx_ context.Context
10109 header_ http.Header
10110 }
10111
10112 // Get: Gets the details of a Membership.
10113 //
10114 // - name: The Membership resource name in the format
10115 // `projects/*/locations/*/memberships/*`.
10116 func (r *ProjectsLocationsMembershipsService) Get(name string) *ProjectsLocationsMembershipsGetCall {
10117 c := &ProjectsLocationsMembershipsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10118 c.name = name
10119 return c
10120 }
10121
10122 // Fields allows partial responses to be retrieved. See
10123 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10124 // details.
10125 func (c *ProjectsLocationsMembershipsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsGetCall {
10126 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10127 return c
10128 }
10129
10130 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10131 // object's ETag matches the given value. This is useful for getting updates
10132 // only after the object has changed since the last request.
10133 func (c *ProjectsLocationsMembershipsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsGetCall {
10134 c.ifNoneMatch_ = entityTag
10135 return c
10136 }
10137
10138 // Context sets the context to be used in this call's Do method.
10139 func (c *ProjectsLocationsMembershipsGetCall) Context(ctx context.Context) *ProjectsLocationsMembershipsGetCall {
10140 c.ctx_ = ctx
10141 return c
10142 }
10143
10144 // Header returns a http.Header that can be modified by the caller to add
10145 // headers to the request.
10146 func (c *ProjectsLocationsMembershipsGetCall) Header() http.Header {
10147 if c.header_ == nil {
10148 c.header_ = make(http.Header)
10149 }
10150 return c.header_
10151 }
10152
10153 func (c *ProjectsLocationsMembershipsGetCall) doRequest(alt string) (*http.Response, error) {
10154 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10155 if c.ifNoneMatch_ != "" {
10156 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10157 }
10158 c.urlParams_.Set("alt", alt)
10159 c.urlParams_.Set("prettyPrint", "false")
10160 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
10161 urls += "?" + c.urlParams_.Encode()
10162 req, err := http.NewRequest("GET", urls, nil)
10163 if err != nil {
10164 return nil, err
10165 }
10166 req.Header = reqHeaders
10167 googleapi.Expand(req.URL, map[string]string{
10168 "name": c.name,
10169 })
10170 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.get", "request", internallog.HTTPRequest(req, nil))
10171 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10172 }
10173
10174 // Do executes the "gkehub.projects.locations.memberships.get" call.
10175 // Any non-2xx status code is an error. Response headers are in either
10176 // *Membership.ServerResponse.Header or (if a response was returned at all) in
10177 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10178 // whether the returned error was because http.StatusNotModified was returned.
10179 func (c *ProjectsLocationsMembershipsGetCall) Do(opts ...googleapi.CallOption) (*Membership, error) {
10180 gensupport.SetOptions(c.urlParams_, opts...)
10181 res, err := c.doRequest("json")
10182 if res != nil && res.StatusCode == http.StatusNotModified {
10183 if res.Body != nil {
10184 res.Body.Close()
10185 }
10186 return nil, gensupport.WrapError(&googleapi.Error{
10187 Code: res.StatusCode,
10188 Header: res.Header,
10189 })
10190 }
10191 if err != nil {
10192 return nil, err
10193 }
10194 defer googleapi.CloseBody(res)
10195 if err := googleapi.CheckResponse(res); err != nil {
10196 return nil, gensupport.WrapError(err)
10197 }
10198 ret := &Membership{
10199 ServerResponse: googleapi.ServerResponse{
10200 Header: res.Header,
10201 HTTPStatusCode: res.StatusCode,
10202 },
10203 }
10204 target := &ret
10205 b, err := gensupport.DecodeResponseBytes(target, res)
10206 if err != nil {
10207 return nil, err
10208 }
10209 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.get", "response", internallog.HTTPResponse(res, b))
10210 return ret, nil
10211 }
10212
10213 type ProjectsLocationsMembershipsGetIamPolicyCall struct {
10214 s *Service
10215 resource string
10216 urlParams_ gensupport.URLParams
10217 ifNoneMatch_ string
10218 ctx_ context.Context
10219 header_ http.Header
10220 }
10221
10222 // GetIamPolicy: Gets the access control policy for a resource. Returns an
10223 // empty policy if the resource exists and does not have a policy set.
10224 //
10225 // - resource: REQUIRED: The resource for which the policy is being requested.
10226 // See Resource names (https://cloud.google.com/apis/design/resource_names)
10227 // for the appropriate value for this field.
10228 func (r *ProjectsLocationsMembershipsService) GetIamPolicy(resource string) *ProjectsLocationsMembershipsGetIamPolicyCall {
10229 c := &ProjectsLocationsMembershipsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10230 c.resource = resource
10231 return c
10232 }
10233
10234 // OptionsRequestedPolicyVersion sets the optional parameter
10235 // "options.requestedPolicyVersion": The maximum policy version that will be
10236 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
10237 // an invalid value will be rejected. Requests for policies with any
10238 // conditional role bindings must specify version 3. Policies with no
10239 // conditional role bindings may specify any valid value or leave the field
10240 // unset. The policy in the response might use the policy version that you
10241 // specified, or it might use a lower policy version. For example, if you
10242 // specify version 3, but the policy has no conditional role bindings, the
10243 // response uses version 1. To learn which resources support conditions in
10244 // their IAM policies, see the IAM documentation
10245 // (https://cloud.google.com/iam/help/conditions/resource-policies).
10246 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsMembershipsGetIamPolicyCall {
10247 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
10248 return c
10249 }
10250
10251 // Fields allows partial responses to be retrieved. See
10252 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10253 // details.
10254 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsGetIamPolicyCall {
10255 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10256 return c
10257 }
10258
10259 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10260 // object's ETag matches the given value. This is useful for getting updates
10261 // only after the object has changed since the last request.
10262 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsGetIamPolicyCall {
10263 c.ifNoneMatch_ = entityTag
10264 return c
10265 }
10266
10267 // Context sets the context to be used in this call's Do method.
10268 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMembershipsGetIamPolicyCall {
10269 c.ctx_ = ctx
10270 return c
10271 }
10272
10273 // Header returns a http.Header that can be modified by the caller to add
10274 // headers to the request.
10275 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) Header() http.Header {
10276 if c.header_ == nil {
10277 c.header_ = make(http.Header)
10278 }
10279 return c.header_
10280 }
10281
10282 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
10283 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10284 if c.ifNoneMatch_ != "" {
10285 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10286 }
10287 c.urlParams_.Set("alt", alt)
10288 c.urlParams_.Set("prettyPrint", "false")
10289 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy")
10290 urls += "?" + c.urlParams_.Encode()
10291 req, err := http.NewRequest("GET", urls, nil)
10292 if err != nil {
10293 return nil, err
10294 }
10295 req.Header = reqHeaders
10296 googleapi.Expand(req.URL, map[string]string{
10297 "resource": c.resource,
10298 })
10299 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
10300 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10301 }
10302
10303 // Do executes the "gkehub.projects.locations.memberships.getIamPolicy" call.
10304 // Any non-2xx status code is an error. Response headers are in either
10305 // *Policy.ServerResponse.Header or (if a response was returned at all) in
10306 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10307 // whether the returned error was because http.StatusNotModified was returned.
10308 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
10309 gensupport.SetOptions(c.urlParams_, opts...)
10310 res, err := c.doRequest("json")
10311 if res != nil && res.StatusCode == http.StatusNotModified {
10312 if res.Body != nil {
10313 res.Body.Close()
10314 }
10315 return nil, gensupport.WrapError(&googleapi.Error{
10316 Code: res.StatusCode,
10317 Header: res.Header,
10318 })
10319 }
10320 if err != nil {
10321 return nil, err
10322 }
10323 defer googleapi.CloseBody(res)
10324 if err := googleapi.CheckResponse(res); err != nil {
10325 return nil, gensupport.WrapError(err)
10326 }
10327 ret := &Policy{
10328 ServerResponse: googleapi.ServerResponse{
10329 Header: res.Header,
10330 HTTPStatusCode: res.StatusCode,
10331 },
10332 }
10333 target := &ret
10334 b, err := gensupport.DecodeResponseBytes(target, res)
10335 if err != nil {
10336 return nil, err
10337 }
10338 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.getIamPolicy", "response", internallog.HTTPResponse(res, b))
10339 return ret, nil
10340 }
10341
10342 type ProjectsLocationsMembershipsListCall struct {
10343 s *Service
10344 parent string
10345 urlParams_ gensupport.URLParams
10346 ifNoneMatch_ string
10347 ctx_ context.Context
10348 header_ http.Header
10349 }
10350
10351 // List: Lists Memberships in a given project and location.
10352 //
10353 // - parent: The parent (project and location) where the Memberships will be
10354 // listed. Specified in the format `projects/*/locations/*`.
10355 // `projects/*/locations/-` list memberships in all the regions.
10356 func (r *ProjectsLocationsMembershipsService) List(parent string) *ProjectsLocationsMembershipsListCall {
10357 c := &ProjectsLocationsMembershipsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10358 c.parent = parent
10359 return c
10360 }
10361
10362 // Filter sets the optional parameter "filter": Lists Memberships that match
10363 // the filter expression, following the syntax outlined in
10364 // https://google.aip.dev/160. Examples: - Name is `bar` in project `foo-proj`
10365 // and location `global`: name =
10366 // "projects/foo-proj/locations/global/membership/bar" - Memberships that have
10367 // a label called `foo`: labels.foo:* - Memberships that have a label called
10368 // `foo` whose value is `bar`: labels.foo = bar - Memberships in the CREATING
10369 // state: state = CREATING
10370 func (c *ProjectsLocationsMembershipsListCall) Filter(filter string) *ProjectsLocationsMembershipsListCall {
10371 c.urlParams_.Set("filter", filter)
10372 return c
10373 }
10374
10375 // OrderBy sets the optional parameter "orderBy": One or more fields to compare
10376 // and use to sort the output. See https://google.aip.dev/132#ordering.
10377 func (c *ProjectsLocationsMembershipsListCall) OrderBy(orderBy string) *ProjectsLocationsMembershipsListCall {
10378 c.urlParams_.Set("orderBy", orderBy)
10379 return c
10380 }
10381
10382 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
10383 // resources, `page_size` specifies number of resources to return. If
10384 // unspecified or set to 0, all resources will be returned.
10385 func (c *ProjectsLocationsMembershipsListCall) PageSize(pageSize int64) *ProjectsLocationsMembershipsListCall {
10386 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10387 return c
10388 }
10389
10390 // PageToken sets the optional parameter "pageToken": Token returned by
10391 // previous call to `ListMemberships` which specifies the position in the list
10392 // from where to continue listing the resources.
10393 func (c *ProjectsLocationsMembershipsListCall) PageToken(pageToken string) *ProjectsLocationsMembershipsListCall {
10394 c.urlParams_.Set("pageToken", pageToken)
10395 return c
10396 }
10397
10398 // Fields allows partial responses to be retrieved. See
10399 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10400 // details.
10401 func (c *ProjectsLocationsMembershipsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsListCall {
10402 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10403 return c
10404 }
10405
10406 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10407 // object's ETag matches the given value. This is useful for getting updates
10408 // only after the object has changed since the last request.
10409 func (c *ProjectsLocationsMembershipsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsListCall {
10410 c.ifNoneMatch_ = entityTag
10411 return c
10412 }
10413
10414 // Context sets the context to be used in this call's Do method.
10415 func (c *ProjectsLocationsMembershipsListCall) Context(ctx context.Context) *ProjectsLocationsMembershipsListCall {
10416 c.ctx_ = ctx
10417 return c
10418 }
10419
10420 // Header returns a http.Header that can be modified by the caller to add
10421 // headers to the request.
10422 func (c *ProjectsLocationsMembershipsListCall) Header() http.Header {
10423 if c.header_ == nil {
10424 c.header_ = make(http.Header)
10425 }
10426 return c.header_
10427 }
10428
10429 func (c *ProjectsLocationsMembershipsListCall) doRequest(alt string) (*http.Response, error) {
10430 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10431 if c.ifNoneMatch_ != "" {
10432 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10433 }
10434 c.urlParams_.Set("alt", alt)
10435 c.urlParams_.Set("prettyPrint", "false")
10436 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/memberships")
10437 urls += "?" + c.urlParams_.Encode()
10438 req, err := http.NewRequest("GET", urls, nil)
10439 if err != nil {
10440 return nil, err
10441 }
10442 req.Header = reqHeaders
10443 googleapi.Expand(req.URL, map[string]string{
10444 "parent": c.parent,
10445 })
10446 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.list", "request", internallog.HTTPRequest(req, nil))
10447 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10448 }
10449
10450 // Do executes the "gkehub.projects.locations.memberships.list" call.
10451 // Any non-2xx status code is an error. Response headers are in either
10452 // *ListMembershipsResponse.ServerResponse.Header or (if a response was
10453 // returned at all) in error.(*googleapi.Error).Header. Use
10454 // googleapi.IsNotModified to check whether the returned error was because
10455 // http.StatusNotModified was returned.
10456 func (c *ProjectsLocationsMembershipsListCall) Do(opts ...googleapi.CallOption) (*ListMembershipsResponse, error) {
10457 gensupport.SetOptions(c.urlParams_, opts...)
10458 res, err := c.doRequest("json")
10459 if res != nil && res.StatusCode == http.StatusNotModified {
10460 if res.Body != nil {
10461 res.Body.Close()
10462 }
10463 return nil, gensupport.WrapError(&googleapi.Error{
10464 Code: res.StatusCode,
10465 Header: res.Header,
10466 })
10467 }
10468 if err != nil {
10469 return nil, err
10470 }
10471 defer googleapi.CloseBody(res)
10472 if err := googleapi.CheckResponse(res); err != nil {
10473 return nil, gensupport.WrapError(err)
10474 }
10475 ret := &ListMembershipsResponse{
10476 ServerResponse: googleapi.ServerResponse{
10477 Header: res.Header,
10478 HTTPStatusCode: res.StatusCode,
10479 },
10480 }
10481 target := &ret
10482 b, err := gensupport.DecodeResponseBytes(target, res)
10483 if err != nil {
10484 return nil, err
10485 }
10486 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.list", "response", internallog.HTTPResponse(res, b))
10487 return ret, nil
10488 }
10489
10490 // Pages invokes f for each page of results.
10491 // A non-nil error returned from f will halt the iteration.
10492 // The provided context supersedes any context provided to the Context method.
10493 func (c *ProjectsLocationsMembershipsListCall) Pages(ctx context.Context, f func(*ListMembershipsResponse) error) error {
10494 c.ctx_ = ctx
10495 defer c.PageToken(c.urlParams_.Get("pageToken"))
10496 for {
10497 x, err := c.Do()
10498 if err != nil {
10499 return err
10500 }
10501 if err := f(x); err != nil {
10502 return err
10503 }
10504 if x.NextPageToken == "" {
10505 return nil
10506 }
10507 c.PageToken(x.NextPageToken)
10508 }
10509 }
10510
10511 type ProjectsLocationsMembershipsListAdminCall struct {
10512 s *Service
10513 parent string
10514 urlParams_ gensupport.URLParams
10515 ifNoneMatch_ string
10516 ctx_ context.Context
10517 header_ http.Header
10518 }
10519
10520 // ListAdmin: Lists Memberships of admin clusters in a given project and
10521 // location. **This method is only used internally**.
10522 //
10523 // - parent: The parent (project and location) where the Memberships of admin
10524 // cluster will be listed. Specified in the format `projects/*/locations/*`.
10525 func (r *ProjectsLocationsMembershipsService) ListAdmin(parent string) *ProjectsLocationsMembershipsListAdminCall {
10526 c := &ProjectsLocationsMembershipsListAdminCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10527 c.parent = parent
10528 return c
10529 }
10530
10531 // Filter sets the optional parameter "filter": Lists Memberships of admin
10532 // clusters that match the filter expression.
10533 func (c *ProjectsLocationsMembershipsListAdminCall) Filter(filter string) *ProjectsLocationsMembershipsListAdminCall {
10534 c.urlParams_.Set("filter", filter)
10535 return c
10536 }
10537
10538 // OrderBy sets the optional parameter "orderBy": One or more fields to compare
10539 // and use to sort the output. See https://google.aip.dev/132#ordering.
10540 func (c *ProjectsLocationsMembershipsListAdminCall) OrderBy(orderBy string) *ProjectsLocationsMembershipsListAdminCall {
10541 c.urlParams_.Set("orderBy", orderBy)
10542 return c
10543 }
10544
10545 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
10546 // resources, `page_size` specifies number of resources to return. If
10547 // unspecified or set to 0, all resources will be returned.
10548 func (c *ProjectsLocationsMembershipsListAdminCall) PageSize(pageSize int64) *ProjectsLocationsMembershipsListAdminCall {
10549 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10550 return c
10551 }
10552
10553 // PageToken sets the optional parameter "pageToken": Token returned by
10554 // previous call to `ListAdminClusterMemberships` which specifies the position
10555 // in the list from where to continue listing the resources.
10556 func (c *ProjectsLocationsMembershipsListAdminCall) PageToken(pageToken string) *ProjectsLocationsMembershipsListAdminCall {
10557 c.urlParams_.Set("pageToken", pageToken)
10558 return c
10559 }
10560
10561 // Fields allows partial responses to be retrieved. See
10562 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10563 // details.
10564 func (c *ProjectsLocationsMembershipsListAdminCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsListAdminCall {
10565 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10566 return c
10567 }
10568
10569 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10570 // object's ETag matches the given value. This is useful for getting updates
10571 // only after the object has changed since the last request.
10572 func (c *ProjectsLocationsMembershipsListAdminCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsListAdminCall {
10573 c.ifNoneMatch_ = entityTag
10574 return c
10575 }
10576
10577 // Context sets the context to be used in this call's Do method.
10578 func (c *ProjectsLocationsMembershipsListAdminCall) Context(ctx context.Context) *ProjectsLocationsMembershipsListAdminCall {
10579 c.ctx_ = ctx
10580 return c
10581 }
10582
10583 // Header returns a http.Header that can be modified by the caller to add
10584 // headers to the request.
10585 func (c *ProjectsLocationsMembershipsListAdminCall) Header() http.Header {
10586 if c.header_ == nil {
10587 c.header_ = make(http.Header)
10588 }
10589 return c.header_
10590 }
10591
10592 func (c *ProjectsLocationsMembershipsListAdminCall) doRequest(alt string) (*http.Response, error) {
10593 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10594 if c.ifNoneMatch_ != "" {
10595 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10596 }
10597 c.urlParams_.Set("alt", alt)
10598 c.urlParams_.Set("prettyPrint", "false")
10599 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/memberships:listAdmin")
10600 urls += "?" + c.urlParams_.Encode()
10601 req, err := http.NewRequest("GET", urls, nil)
10602 if err != nil {
10603 return nil, err
10604 }
10605 req.Header = reqHeaders
10606 googleapi.Expand(req.URL, map[string]string{
10607 "parent": c.parent,
10608 })
10609 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.listAdmin", "request", internallog.HTTPRequest(req, nil))
10610 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10611 }
10612
10613 // Do executes the "gkehub.projects.locations.memberships.listAdmin" call.
10614 // Any non-2xx status code is an error. Response headers are in either
10615 // *ListAdminClusterMembershipsResponse.ServerResponse.Header or (if a response
10616 // was returned at all) in error.(*googleapi.Error).Header. Use
10617 // googleapi.IsNotModified to check whether the returned error was because
10618 // http.StatusNotModified was returned.
10619 func (c *ProjectsLocationsMembershipsListAdminCall) Do(opts ...googleapi.CallOption) (*ListAdminClusterMembershipsResponse, error) {
10620 gensupport.SetOptions(c.urlParams_, opts...)
10621 res, err := c.doRequest("json")
10622 if res != nil && res.StatusCode == http.StatusNotModified {
10623 if res.Body != nil {
10624 res.Body.Close()
10625 }
10626 return nil, gensupport.WrapError(&googleapi.Error{
10627 Code: res.StatusCode,
10628 Header: res.Header,
10629 })
10630 }
10631 if err != nil {
10632 return nil, err
10633 }
10634 defer googleapi.CloseBody(res)
10635 if err := googleapi.CheckResponse(res); err != nil {
10636 return nil, gensupport.WrapError(err)
10637 }
10638 ret := &ListAdminClusterMembershipsResponse{
10639 ServerResponse: googleapi.ServerResponse{
10640 Header: res.Header,
10641 HTTPStatusCode: res.StatusCode,
10642 },
10643 }
10644 target := &ret
10645 b, err := gensupport.DecodeResponseBytes(target, res)
10646 if err != nil {
10647 return nil, err
10648 }
10649 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.listAdmin", "response", internallog.HTTPResponse(res, b))
10650 return ret, nil
10651 }
10652
10653 // Pages invokes f for each page of results.
10654 // A non-nil error returned from f will halt the iteration.
10655 // The provided context supersedes any context provided to the Context method.
10656 func (c *ProjectsLocationsMembershipsListAdminCall) Pages(ctx context.Context, f func(*ListAdminClusterMembershipsResponse) error) error {
10657 c.ctx_ = ctx
10658 defer c.PageToken(c.urlParams_.Get("pageToken"))
10659 for {
10660 x, err := c.Do()
10661 if err != nil {
10662 return err
10663 }
10664 if err := f(x); err != nil {
10665 return err
10666 }
10667 if x.NextPageToken == "" {
10668 return nil
10669 }
10670 c.PageToken(x.NextPageToken)
10671 }
10672 }
10673
10674 type ProjectsLocationsMembershipsPatchCall struct {
10675 s *Service
10676 name string
10677 membership *Membership
10678 urlParams_ gensupport.URLParams
10679 ctx_ context.Context
10680 header_ http.Header
10681 }
10682
10683 // Patch: Updates an existing Membership.
10684 //
10685 // - name: The Membership resource name in the format
10686 // `projects/*/locations/*/memberships/*`.
10687 func (r *ProjectsLocationsMembershipsService) Patch(name string, membership *Membership) *ProjectsLocationsMembershipsPatchCall {
10688 c := &ProjectsLocationsMembershipsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10689 c.name = name
10690 c.membership = membership
10691 return c
10692 }
10693
10694 // RequestId sets the optional parameter "requestId": A request ID to identify
10695 // requests. Specify a unique request ID so that if you must retry your
10696 // request, the server will know to ignore the request if it has already been
10697 // completed. The server will guarantee that for at least 60 minutes after the
10698 // first request. For example, consider a situation where you make an initial
10699 // request and the request times out. If you make the request again with the
10700 // same request ID, the server can check if original operation with the same
10701 // request ID was received, and if so, will ignore the second request. This
10702 // prevents clients from accidentally creating duplicate commitments. The
10703 // request ID must be a valid UUID with the exception that zero UUID is not
10704 // supported (00000000-0000-0000-0000-000000000000).
10705 func (c *ProjectsLocationsMembershipsPatchCall) RequestId(requestId string) *ProjectsLocationsMembershipsPatchCall {
10706 c.urlParams_.Set("requestId", requestId)
10707 return c
10708 }
10709
10710 // UpdateMask sets the optional parameter "updateMask": Required. Mask of
10711 // fields to update.
10712 func (c *ProjectsLocationsMembershipsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMembershipsPatchCall {
10713 c.urlParams_.Set("updateMask", updateMask)
10714 return c
10715 }
10716
10717 // Fields allows partial responses to be retrieved. See
10718 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10719 // details.
10720 func (c *ProjectsLocationsMembershipsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsPatchCall {
10721 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10722 return c
10723 }
10724
10725 // Context sets the context to be used in this call's Do method.
10726 func (c *ProjectsLocationsMembershipsPatchCall) Context(ctx context.Context) *ProjectsLocationsMembershipsPatchCall {
10727 c.ctx_ = ctx
10728 return c
10729 }
10730
10731 // Header returns a http.Header that can be modified by the caller to add
10732 // headers to the request.
10733 func (c *ProjectsLocationsMembershipsPatchCall) Header() http.Header {
10734 if c.header_ == nil {
10735 c.header_ = make(http.Header)
10736 }
10737 return c.header_
10738 }
10739
10740 func (c *ProjectsLocationsMembershipsPatchCall) doRequest(alt string) (*http.Response, error) {
10741 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10742 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.membership)
10743 if err != nil {
10744 return nil, err
10745 }
10746 c.urlParams_.Set("alt", alt)
10747 c.urlParams_.Set("prettyPrint", "false")
10748 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
10749 urls += "?" + c.urlParams_.Encode()
10750 req, err := http.NewRequest("PATCH", urls, body)
10751 if err != nil {
10752 return nil, err
10753 }
10754 req.Header = reqHeaders
10755 googleapi.Expand(req.URL, map[string]string{
10756 "name": c.name,
10757 })
10758 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
10759 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10760 }
10761
10762 // Do executes the "gkehub.projects.locations.memberships.patch" call.
10763 // Any non-2xx status code is an error. Response headers are in either
10764 // *Operation.ServerResponse.Header or (if a response was returned at all) in
10765 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10766 // whether the returned error was because http.StatusNotModified was returned.
10767 func (c *ProjectsLocationsMembershipsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10768 gensupport.SetOptions(c.urlParams_, opts...)
10769 res, err := c.doRequest("json")
10770 if res != nil && res.StatusCode == http.StatusNotModified {
10771 if res.Body != nil {
10772 res.Body.Close()
10773 }
10774 return nil, gensupport.WrapError(&googleapi.Error{
10775 Code: res.StatusCode,
10776 Header: res.Header,
10777 })
10778 }
10779 if err != nil {
10780 return nil, err
10781 }
10782 defer googleapi.CloseBody(res)
10783 if err := googleapi.CheckResponse(res); err != nil {
10784 return nil, gensupport.WrapError(err)
10785 }
10786 ret := &Operation{
10787 ServerResponse: googleapi.ServerResponse{
10788 Header: res.Header,
10789 HTTPStatusCode: res.StatusCode,
10790 },
10791 }
10792 target := &ret
10793 b, err := gensupport.DecodeResponseBytes(target, res)
10794 if err != nil {
10795 return nil, err
10796 }
10797 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.patch", "response", internallog.HTTPResponse(res, b))
10798 return ret, nil
10799 }
10800
10801 type ProjectsLocationsMembershipsSetIamPolicyCall struct {
10802 s *Service
10803 resource string
10804 setiampolicyrequest *SetIamPolicyRequest
10805 urlParams_ gensupport.URLParams
10806 ctx_ context.Context
10807 header_ http.Header
10808 }
10809
10810 // SetIamPolicy: Sets the access control policy on the specified resource.
10811 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
10812 // and `PERMISSION_DENIED` errors.
10813 //
10814 // - resource: REQUIRED: The resource for which the policy is being specified.
10815 // See Resource names (https://cloud.google.com/apis/design/resource_names)
10816 // for the appropriate value for this field.
10817 func (r *ProjectsLocationsMembershipsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsMembershipsSetIamPolicyCall {
10818 c := &ProjectsLocationsMembershipsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10819 c.resource = resource
10820 c.setiampolicyrequest = setiampolicyrequest
10821 return c
10822 }
10823
10824 // Fields allows partial responses to be retrieved. See
10825 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10826 // details.
10827 func (c *ProjectsLocationsMembershipsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsSetIamPolicyCall {
10828 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10829 return c
10830 }
10831
10832 // Context sets the context to be used in this call's Do method.
10833 func (c *ProjectsLocationsMembershipsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMembershipsSetIamPolicyCall {
10834 c.ctx_ = ctx
10835 return c
10836 }
10837
10838 // Header returns a http.Header that can be modified by the caller to add
10839 // headers to the request.
10840 func (c *ProjectsLocationsMembershipsSetIamPolicyCall) Header() http.Header {
10841 if c.header_ == nil {
10842 c.header_ = make(http.Header)
10843 }
10844 return c.header_
10845 }
10846
10847 func (c *ProjectsLocationsMembershipsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
10848 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10849 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
10850 if err != nil {
10851 return nil, err
10852 }
10853 c.urlParams_.Set("alt", alt)
10854 c.urlParams_.Set("prettyPrint", "false")
10855 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy")
10856 urls += "?" + c.urlParams_.Encode()
10857 req, err := http.NewRequest("POST", urls, body)
10858 if err != nil {
10859 return nil, err
10860 }
10861 req.Header = reqHeaders
10862 googleapi.Expand(req.URL, map[string]string{
10863 "resource": c.resource,
10864 })
10865 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
10866 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10867 }
10868
10869 // Do executes the "gkehub.projects.locations.memberships.setIamPolicy" call.
10870 // Any non-2xx status code is an error. Response headers are in either
10871 // *Policy.ServerResponse.Header or (if a response was returned at all) in
10872 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10873 // whether the returned error was because http.StatusNotModified was returned.
10874 func (c *ProjectsLocationsMembershipsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
10875 gensupport.SetOptions(c.urlParams_, opts...)
10876 res, err := c.doRequest("json")
10877 if res != nil && res.StatusCode == http.StatusNotModified {
10878 if res.Body != nil {
10879 res.Body.Close()
10880 }
10881 return nil, gensupport.WrapError(&googleapi.Error{
10882 Code: res.StatusCode,
10883 Header: res.Header,
10884 })
10885 }
10886 if err != nil {
10887 return nil, err
10888 }
10889 defer googleapi.CloseBody(res)
10890 if err := googleapi.CheckResponse(res); err != nil {
10891 return nil, gensupport.WrapError(err)
10892 }
10893 ret := &Policy{
10894 ServerResponse: googleapi.ServerResponse{
10895 Header: res.Header,
10896 HTTPStatusCode: res.StatusCode,
10897 },
10898 }
10899 target := &ret
10900 b, err := gensupport.DecodeResponseBytes(target, res)
10901 if err != nil {
10902 return nil, err
10903 }
10904 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.setIamPolicy", "response", internallog.HTTPResponse(res, b))
10905 return ret, nil
10906 }
10907
10908 type ProjectsLocationsMembershipsTestIamPermissionsCall struct {
10909 s *Service
10910 resource string
10911 testiampermissionsrequest *TestIamPermissionsRequest
10912 urlParams_ gensupport.URLParams
10913 ctx_ context.Context
10914 header_ http.Header
10915 }
10916
10917 // TestIamPermissions: Returns permissions that a caller has on the specified
10918 // resource. If the resource does not exist, this will return an empty set of
10919 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
10920 // used for building permission-aware UIs and command-line tools, not for
10921 // authorization checking. This operation may "fail open" without warning.
10922 //
10923 // - resource: REQUIRED: The resource for which the policy detail is being
10924 // requested. See Resource names
10925 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
10926 // value for this field.
10927 func (r *ProjectsLocationsMembershipsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsMembershipsTestIamPermissionsCall {
10928 c := &ProjectsLocationsMembershipsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10929 c.resource = resource
10930 c.testiampermissionsrequest = testiampermissionsrequest
10931 return c
10932 }
10933
10934 // Fields allows partial responses to be retrieved. See
10935 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10936 // details.
10937 func (c *ProjectsLocationsMembershipsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsTestIamPermissionsCall {
10938 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10939 return c
10940 }
10941
10942 // Context sets the context to be used in this call's Do method.
10943 func (c *ProjectsLocationsMembershipsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsMembershipsTestIamPermissionsCall {
10944 c.ctx_ = ctx
10945 return c
10946 }
10947
10948 // Header returns a http.Header that can be modified by the caller to add
10949 // headers to the request.
10950 func (c *ProjectsLocationsMembershipsTestIamPermissionsCall) Header() http.Header {
10951 if c.header_ == nil {
10952 c.header_ = make(http.Header)
10953 }
10954 return c.header_
10955 }
10956
10957 func (c *ProjectsLocationsMembershipsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
10958 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10959 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
10960 if err != nil {
10961 return nil, err
10962 }
10963 c.urlParams_.Set("alt", alt)
10964 c.urlParams_.Set("prettyPrint", "false")
10965 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions")
10966 urls += "?" + c.urlParams_.Encode()
10967 req, err := http.NewRequest("POST", urls, body)
10968 if err != nil {
10969 return nil, err
10970 }
10971 req.Header = reqHeaders
10972 googleapi.Expand(req.URL, map[string]string{
10973 "resource": c.resource,
10974 })
10975 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
10976 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10977 }
10978
10979 // Do executes the "gkehub.projects.locations.memberships.testIamPermissions" call.
10980 // Any non-2xx status code is an error. Response headers are in either
10981 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
10982 // returned at all) in error.(*googleapi.Error).Header. Use
10983 // googleapi.IsNotModified to check whether the returned error was because
10984 // http.StatusNotModified was returned.
10985 func (c *ProjectsLocationsMembershipsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
10986 gensupport.SetOptions(c.urlParams_, opts...)
10987 res, err := c.doRequest("json")
10988 if res != nil && res.StatusCode == http.StatusNotModified {
10989 if res.Body != nil {
10990 res.Body.Close()
10991 }
10992 return nil, gensupport.WrapError(&googleapi.Error{
10993 Code: res.StatusCode,
10994 Header: res.Header,
10995 })
10996 }
10997 if err != nil {
10998 return nil, err
10999 }
11000 defer googleapi.CloseBody(res)
11001 if err := googleapi.CheckResponse(res); err != nil {
11002 return nil, gensupport.WrapError(err)
11003 }
11004 ret := &TestIamPermissionsResponse{
11005 ServerResponse: googleapi.ServerResponse{
11006 Header: res.Header,
11007 HTTPStatusCode: res.StatusCode,
11008 },
11009 }
11010 target := &ret
11011 b, err := gensupport.DecodeResponseBytes(target, res)
11012 if err != nil {
11013 return nil, err
11014 }
11015 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.testIamPermissions", "response", internallog.HTTPResponse(res, b))
11016 return ret, nil
11017 }
11018
11019 type ProjectsLocationsMembershipsValidateCreateCall struct {
11020 s *Service
11021 parent string
11022 validatecreatemembershiprequest *ValidateCreateMembershipRequest
11023 urlParams_ gensupport.URLParams
11024 ctx_ context.Context
11025 header_ http.Header
11026 }
11027
11028 // ValidateCreate: ValidateCreateMembership is a preflight check for
11029 // CreateMembership. It checks the following: 1. Caller has the required
11030 // `gkehub.memberships.create` permission. 2. The membership_id is still
11031 // available.
11032 //
11033 // - parent: The parent (project and location) where the Memberships will be
11034 // created. Specified in the format `projects/*/locations/*`.
11035 func (r *ProjectsLocationsMembershipsService) ValidateCreate(parent string, validatecreatemembershiprequest *ValidateCreateMembershipRequest) *ProjectsLocationsMembershipsValidateCreateCall {
11036 c := &ProjectsLocationsMembershipsValidateCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11037 c.parent = parent
11038 c.validatecreatemembershiprequest = validatecreatemembershiprequest
11039 return c
11040 }
11041
11042 // Fields allows partial responses to be retrieved. See
11043 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11044 // details.
11045 func (c *ProjectsLocationsMembershipsValidateCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsValidateCreateCall {
11046 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11047 return c
11048 }
11049
11050 // Context sets the context to be used in this call's Do method.
11051 func (c *ProjectsLocationsMembershipsValidateCreateCall) Context(ctx context.Context) *ProjectsLocationsMembershipsValidateCreateCall {
11052 c.ctx_ = ctx
11053 return c
11054 }
11055
11056 // Header returns a http.Header that can be modified by the caller to add
11057 // headers to the request.
11058 func (c *ProjectsLocationsMembershipsValidateCreateCall) Header() http.Header {
11059 if c.header_ == nil {
11060 c.header_ = make(http.Header)
11061 }
11062 return c.header_
11063 }
11064
11065 func (c *ProjectsLocationsMembershipsValidateCreateCall) doRequest(alt string) (*http.Response, error) {
11066 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11067 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.validatecreatemembershiprequest)
11068 if err != nil {
11069 return nil, err
11070 }
11071 c.urlParams_.Set("alt", alt)
11072 c.urlParams_.Set("prettyPrint", "false")
11073 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/memberships:validateCreate")
11074 urls += "?" + c.urlParams_.Encode()
11075 req, err := http.NewRequest("POST", urls, body)
11076 if err != nil {
11077 return nil, err
11078 }
11079 req.Header = reqHeaders
11080 googleapi.Expand(req.URL, map[string]string{
11081 "parent": c.parent,
11082 })
11083 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.validateCreate", "request", internallog.HTTPRequest(req, body.Bytes()))
11084 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11085 }
11086
11087 // Do executes the "gkehub.projects.locations.memberships.validateCreate" call.
11088 // Any non-2xx status code is an error. Response headers are in either
11089 // *ValidateCreateMembershipResponse.ServerResponse.Header or (if a response
11090 // was returned at all) in error.(*googleapi.Error).Header. Use
11091 // googleapi.IsNotModified to check whether the returned error was because
11092 // http.StatusNotModified was returned.
11093 func (c *ProjectsLocationsMembershipsValidateCreateCall) Do(opts ...googleapi.CallOption) (*ValidateCreateMembershipResponse, error) {
11094 gensupport.SetOptions(c.urlParams_, opts...)
11095 res, err := c.doRequest("json")
11096 if res != nil && res.StatusCode == http.StatusNotModified {
11097 if res.Body != nil {
11098 res.Body.Close()
11099 }
11100 return nil, gensupport.WrapError(&googleapi.Error{
11101 Code: res.StatusCode,
11102 Header: res.Header,
11103 })
11104 }
11105 if err != nil {
11106 return nil, err
11107 }
11108 defer googleapi.CloseBody(res)
11109 if err := googleapi.CheckResponse(res); err != nil {
11110 return nil, gensupport.WrapError(err)
11111 }
11112 ret := &ValidateCreateMembershipResponse{
11113 ServerResponse: googleapi.ServerResponse{
11114 Header: res.Header,
11115 HTTPStatusCode: res.StatusCode,
11116 },
11117 }
11118 target := &ret
11119 b, err := gensupport.DecodeResponseBytes(target, res)
11120 if err != nil {
11121 return nil, err
11122 }
11123 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.validateCreate", "response", internallog.HTTPResponse(res, b))
11124 return ret, nil
11125 }
11126
11127 type ProjectsLocationsMembershipsValidateExclusivityCall struct {
11128 s *Service
11129 parent string
11130 urlParams_ gensupport.URLParams
11131 ifNoneMatch_ string
11132 ctx_ context.Context
11133 header_ http.Header
11134 }
11135
11136 // ValidateExclusivity: ValidateExclusivity validates the state of exclusivity
11137 // in the cluster. The validation does not depend on an existing Hub membership
11138 // resource.
11139 //
11140 // - parent: The parent (project and location) where the Memberships will be
11141 // created. Specified in the format `projects/*/locations/*`.
11142 func (r *ProjectsLocationsMembershipsService) ValidateExclusivity(parent string) *ProjectsLocationsMembershipsValidateExclusivityCall {
11143 c := &ProjectsLocationsMembershipsValidateExclusivityCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11144 c.parent = parent
11145 return c
11146 }
11147
11148 // CrManifest sets the optional parameter "crManifest": The YAML of the
11149 // membership CR in the cluster. Empty if the membership CR does not exist.
11150 func (c *ProjectsLocationsMembershipsValidateExclusivityCall) CrManifest(crManifest string) *ProjectsLocationsMembershipsValidateExclusivityCall {
11151 c.urlParams_.Set("crManifest", crManifest)
11152 return c
11153 }
11154
11155 // IntendedMembership sets the optional parameter "intendedMembership":
11156 // Required. The intended membership name under the `parent`. This method only
11157 // does validation in anticipation of a CreateMembership call with the same
11158 // name.
11159 func (c *ProjectsLocationsMembershipsValidateExclusivityCall) IntendedMembership(intendedMembership string) *ProjectsLocationsMembershipsValidateExclusivityCall {
11160 c.urlParams_.Set("intendedMembership", intendedMembership)
11161 return c
11162 }
11163
11164 // Fields allows partial responses to be retrieved. See
11165 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11166 // details.
11167 func (c *ProjectsLocationsMembershipsValidateExclusivityCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsValidateExclusivityCall {
11168 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11169 return c
11170 }
11171
11172 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11173 // object's ETag matches the given value. This is useful for getting updates
11174 // only after the object has changed since the last request.
11175 func (c *ProjectsLocationsMembershipsValidateExclusivityCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsValidateExclusivityCall {
11176 c.ifNoneMatch_ = entityTag
11177 return c
11178 }
11179
11180 // Context sets the context to be used in this call's Do method.
11181 func (c *ProjectsLocationsMembershipsValidateExclusivityCall) Context(ctx context.Context) *ProjectsLocationsMembershipsValidateExclusivityCall {
11182 c.ctx_ = ctx
11183 return c
11184 }
11185
11186 // Header returns a http.Header that can be modified by the caller to add
11187 // headers to the request.
11188 func (c *ProjectsLocationsMembershipsValidateExclusivityCall) Header() http.Header {
11189 if c.header_ == nil {
11190 c.header_ = make(http.Header)
11191 }
11192 return c.header_
11193 }
11194
11195 func (c *ProjectsLocationsMembershipsValidateExclusivityCall) doRequest(alt string) (*http.Response, error) {
11196 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11197 if c.ifNoneMatch_ != "" {
11198 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11199 }
11200 c.urlParams_.Set("alt", alt)
11201 c.urlParams_.Set("prettyPrint", "false")
11202 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/memberships:validateExclusivity")
11203 urls += "?" + c.urlParams_.Encode()
11204 req, err := http.NewRequest("GET", urls, nil)
11205 if err != nil {
11206 return nil, err
11207 }
11208 req.Header = reqHeaders
11209 googleapi.Expand(req.URL, map[string]string{
11210 "parent": c.parent,
11211 })
11212 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.validateExclusivity", "request", internallog.HTTPRequest(req, nil))
11213 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11214 }
11215
11216 // Do executes the "gkehub.projects.locations.memberships.validateExclusivity" call.
11217 // Any non-2xx status code is an error. Response headers are in either
11218 // *ValidateExclusivityResponse.ServerResponse.Header or (if a response was
11219 // returned at all) in error.(*googleapi.Error).Header. Use
11220 // googleapi.IsNotModified to check whether the returned error was because
11221 // http.StatusNotModified was returned.
11222 func (c *ProjectsLocationsMembershipsValidateExclusivityCall) Do(opts ...googleapi.CallOption) (*ValidateExclusivityResponse, error) {
11223 gensupport.SetOptions(c.urlParams_, opts...)
11224 res, err := c.doRequest("json")
11225 if res != nil && res.StatusCode == http.StatusNotModified {
11226 if res.Body != nil {
11227 res.Body.Close()
11228 }
11229 return nil, gensupport.WrapError(&googleapi.Error{
11230 Code: res.StatusCode,
11231 Header: res.Header,
11232 })
11233 }
11234 if err != nil {
11235 return nil, err
11236 }
11237 defer googleapi.CloseBody(res)
11238 if err := googleapi.CheckResponse(res); err != nil {
11239 return nil, gensupport.WrapError(err)
11240 }
11241 ret := &ValidateExclusivityResponse{
11242 ServerResponse: googleapi.ServerResponse{
11243 Header: res.Header,
11244 HTTPStatusCode: res.StatusCode,
11245 },
11246 }
11247 target := &ret
11248 b, err := gensupport.DecodeResponseBytes(target, res)
11249 if err != nil {
11250 return nil, err
11251 }
11252 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.validateExclusivity", "response", internallog.HTTPResponse(res, b))
11253 return ret, nil
11254 }
11255
11256 type ProjectsLocationsMembershipsBindingsCreateCall struct {
11257 s *Service
11258 parent string
11259 membershipbinding *MembershipBinding
11260 urlParams_ gensupport.URLParams
11261 ctx_ context.Context
11262 header_ http.Header
11263 }
11264
11265 // Create: Creates a MembershipBinding.
11266 //
11267 // - parent: The parent (project and location) where the MembershipBinding will
11268 // be created. Specified in the format
11269 // `projects/*/locations/*/memberships/*`.
11270 func (r *ProjectsLocationsMembershipsBindingsService) Create(parent string, membershipbinding *MembershipBinding) *ProjectsLocationsMembershipsBindingsCreateCall {
11271 c := &ProjectsLocationsMembershipsBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11272 c.parent = parent
11273 c.membershipbinding = membershipbinding
11274 return c
11275 }
11276
11277 // MembershipBindingId sets the optional parameter "membershipBindingId":
11278 // Required. The ID to use for the MembershipBinding.
11279 func (c *ProjectsLocationsMembershipsBindingsCreateCall) MembershipBindingId(membershipBindingId string) *ProjectsLocationsMembershipsBindingsCreateCall {
11280 c.urlParams_.Set("membershipBindingId", membershipBindingId)
11281 return c
11282 }
11283
11284 // Fields allows partial responses to be retrieved. See
11285 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11286 // details.
11287 func (c *ProjectsLocationsMembershipsBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsBindingsCreateCall {
11288 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11289 return c
11290 }
11291
11292 // Context sets the context to be used in this call's Do method.
11293 func (c *ProjectsLocationsMembershipsBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsMembershipsBindingsCreateCall {
11294 c.ctx_ = ctx
11295 return c
11296 }
11297
11298 // Header returns a http.Header that can be modified by the caller to add
11299 // headers to the request.
11300 func (c *ProjectsLocationsMembershipsBindingsCreateCall) Header() http.Header {
11301 if c.header_ == nil {
11302 c.header_ = make(http.Header)
11303 }
11304 return c.header_
11305 }
11306
11307 func (c *ProjectsLocationsMembershipsBindingsCreateCall) doRequest(alt string) (*http.Response, error) {
11308 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11309 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.membershipbinding)
11310 if err != nil {
11311 return nil, err
11312 }
11313 c.urlParams_.Set("alt", alt)
11314 c.urlParams_.Set("prettyPrint", "false")
11315 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/bindings")
11316 urls += "?" + c.urlParams_.Encode()
11317 req, err := http.NewRequest("POST", urls, body)
11318 if err != nil {
11319 return nil, err
11320 }
11321 req.Header = reqHeaders
11322 googleapi.Expand(req.URL, map[string]string{
11323 "parent": c.parent,
11324 })
11325 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.create", "request", internallog.HTTPRequest(req, body.Bytes()))
11326 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11327 }
11328
11329 // Do executes the "gkehub.projects.locations.memberships.bindings.create" call.
11330 // Any non-2xx status code is an error. Response headers are in either
11331 // *Operation.ServerResponse.Header or (if a response was returned at all) in
11332 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11333 // whether the returned error was because http.StatusNotModified was returned.
11334 func (c *ProjectsLocationsMembershipsBindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11335 gensupport.SetOptions(c.urlParams_, opts...)
11336 res, err := c.doRequest("json")
11337 if res != nil && res.StatusCode == http.StatusNotModified {
11338 if res.Body != nil {
11339 res.Body.Close()
11340 }
11341 return nil, gensupport.WrapError(&googleapi.Error{
11342 Code: res.StatusCode,
11343 Header: res.Header,
11344 })
11345 }
11346 if err != nil {
11347 return nil, err
11348 }
11349 defer googleapi.CloseBody(res)
11350 if err := googleapi.CheckResponse(res); err != nil {
11351 return nil, gensupport.WrapError(err)
11352 }
11353 ret := &Operation{
11354 ServerResponse: googleapi.ServerResponse{
11355 Header: res.Header,
11356 HTTPStatusCode: res.StatusCode,
11357 },
11358 }
11359 target := &ret
11360 b, err := gensupport.DecodeResponseBytes(target, res)
11361 if err != nil {
11362 return nil, err
11363 }
11364 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.create", "response", internallog.HTTPResponse(res, b))
11365 return ret, nil
11366 }
11367
11368 type ProjectsLocationsMembershipsBindingsDeleteCall struct {
11369 s *Service
11370 name string
11371 urlParams_ gensupport.URLParams
11372 ctx_ context.Context
11373 header_ http.Header
11374 }
11375
11376 // Delete: Deletes a MembershipBinding.
11377 //
11378 // - name: The MembershipBinding resource name in the format
11379 // `projects/*/locations/*/memberships/*/bindings/*`.
11380 func (r *ProjectsLocationsMembershipsBindingsService) Delete(name string) *ProjectsLocationsMembershipsBindingsDeleteCall {
11381 c := &ProjectsLocationsMembershipsBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11382 c.name = name
11383 return c
11384 }
11385
11386 // Fields allows partial responses to be retrieved. See
11387 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11388 // details.
11389 func (c *ProjectsLocationsMembershipsBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsBindingsDeleteCall {
11390 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11391 return c
11392 }
11393
11394 // Context sets the context to be used in this call's Do method.
11395 func (c *ProjectsLocationsMembershipsBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMembershipsBindingsDeleteCall {
11396 c.ctx_ = ctx
11397 return c
11398 }
11399
11400 // Header returns a http.Header that can be modified by the caller to add
11401 // headers to the request.
11402 func (c *ProjectsLocationsMembershipsBindingsDeleteCall) Header() http.Header {
11403 if c.header_ == nil {
11404 c.header_ = make(http.Header)
11405 }
11406 return c.header_
11407 }
11408
11409 func (c *ProjectsLocationsMembershipsBindingsDeleteCall) doRequest(alt string) (*http.Response, error) {
11410 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11411 c.urlParams_.Set("alt", alt)
11412 c.urlParams_.Set("prettyPrint", "false")
11413 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
11414 urls += "?" + c.urlParams_.Encode()
11415 req, err := http.NewRequest("DELETE", urls, nil)
11416 if err != nil {
11417 return nil, err
11418 }
11419 req.Header = reqHeaders
11420 googleapi.Expand(req.URL, map[string]string{
11421 "name": c.name,
11422 })
11423 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.delete", "request", internallog.HTTPRequest(req, nil))
11424 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11425 }
11426
11427 // Do executes the "gkehub.projects.locations.memberships.bindings.delete" call.
11428 // Any non-2xx status code is an error. Response headers are in either
11429 // *Operation.ServerResponse.Header or (if a response was returned at all) in
11430 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11431 // whether the returned error was because http.StatusNotModified was returned.
11432 func (c *ProjectsLocationsMembershipsBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11433 gensupport.SetOptions(c.urlParams_, opts...)
11434 res, err := c.doRequest("json")
11435 if res != nil && res.StatusCode == http.StatusNotModified {
11436 if res.Body != nil {
11437 res.Body.Close()
11438 }
11439 return nil, gensupport.WrapError(&googleapi.Error{
11440 Code: res.StatusCode,
11441 Header: res.Header,
11442 })
11443 }
11444 if err != nil {
11445 return nil, err
11446 }
11447 defer googleapi.CloseBody(res)
11448 if err := googleapi.CheckResponse(res); err != nil {
11449 return nil, gensupport.WrapError(err)
11450 }
11451 ret := &Operation{
11452 ServerResponse: googleapi.ServerResponse{
11453 Header: res.Header,
11454 HTTPStatusCode: res.StatusCode,
11455 },
11456 }
11457 target := &ret
11458 b, err := gensupport.DecodeResponseBytes(target, res)
11459 if err != nil {
11460 return nil, err
11461 }
11462 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.delete", "response", internallog.HTTPResponse(res, b))
11463 return ret, nil
11464 }
11465
11466 type ProjectsLocationsMembershipsBindingsGetCall struct {
11467 s *Service
11468 name string
11469 urlParams_ gensupport.URLParams
11470 ifNoneMatch_ string
11471 ctx_ context.Context
11472 header_ http.Header
11473 }
11474
11475 // Get: Returns the details of a MembershipBinding.
11476 //
11477 // - name: The MembershipBinding resource name in the format
11478 // `projects/*/locations/*/memberships/*/bindings/*`.
11479 func (r *ProjectsLocationsMembershipsBindingsService) Get(name string) *ProjectsLocationsMembershipsBindingsGetCall {
11480 c := &ProjectsLocationsMembershipsBindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11481 c.name = name
11482 return c
11483 }
11484
11485 // Fields allows partial responses to be retrieved. See
11486 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11487 // details.
11488 func (c *ProjectsLocationsMembershipsBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsBindingsGetCall {
11489 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11490 return c
11491 }
11492
11493 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11494 // object's ETag matches the given value. This is useful for getting updates
11495 // only after the object has changed since the last request.
11496 func (c *ProjectsLocationsMembershipsBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsBindingsGetCall {
11497 c.ifNoneMatch_ = entityTag
11498 return c
11499 }
11500
11501 // Context sets the context to be used in this call's Do method.
11502 func (c *ProjectsLocationsMembershipsBindingsGetCall) Context(ctx context.Context) *ProjectsLocationsMembershipsBindingsGetCall {
11503 c.ctx_ = ctx
11504 return c
11505 }
11506
11507 // Header returns a http.Header that can be modified by the caller to add
11508 // headers to the request.
11509 func (c *ProjectsLocationsMembershipsBindingsGetCall) Header() http.Header {
11510 if c.header_ == nil {
11511 c.header_ = make(http.Header)
11512 }
11513 return c.header_
11514 }
11515
11516 func (c *ProjectsLocationsMembershipsBindingsGetCall) doRequest(alt string) (*http.Response, error) {
11517 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11518 if c.ifNoneMatch_ != "" {
11519 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11520 }
11521 c.urlParams_.Set("alt", alt)
11522 c.urlParams_.Set("prettyPrint", "false")
11523 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
11524 urls += "?" + c.urlParams_.Encode()
11525 req, err := http.NewRequest("GET", urls, nil)
11526 if err != nil {
11527 return nil, err
11528 }
11529 req.Header = reqHeaders
11530 googleapi.Expand(req.URL, map[string]string{
11531 "name": c.name,
11532 })
11533 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.get", "request", internallog.HTTPRequest(req, nil))
11534 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11535 }
11536
11537 // Do executes the "gkehub.projects.locations.memberships.bindings.get" call.
11538 // Any non-2xx status code is an error. Response headers are in either
11539 // *MembershipBinding.ServerResponse.Header or (if a response was returned at
11540 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11541 // check whether the returned error was because http.StatusNotModified was
11542 // returned.
11543 func (c *ProjectsLocationsMembershipsBindingsGetCall) Do(opts ...googleapi.CallOption) (*MembershipBinding, error) {
11544 gensupport.SetOptions(c.urlParams_, opts...)
11545 res, err := c.doRequest("json")
11546 if res != nil && res.StatusCode == http.StatusNotModified {
11547 if res.Body != nil {
11548 res.Body.Close()
11549 }
11550 return nil, gensupport.WrapError(&googleapi.Error{
11551 Code: res.StatusCode,
11552 Header: res.Header,
11553 })
11554 }
11555 if err != nil {
11556 return nil, err
11557 }
11558 defer googleapi.CloseBody(res)
11559 if err := googleapi.CheckResponse(res); err != nil {
11560 return nil, gensupport.WrapError(err)
11561 }
11562 ret := &MembershipBinding{
11563 ServerResponse: googleapi.ServerResponse{
11564 Header: res.Header,
11565 HTTPStatusCode: res.StatusCode,
11566 },
11567 }
11568 target := &ret
11569 b, err := gensupport.DecodeResponseBytes(target, res)
11570 if err != nil {
11571 return nil, err
11572 }
11573 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.get", "response", internallog.HTTPResponse(res, b))
11574 return ret, nil
11575 }
11576
11577 type ProjectsLocationsMembershipsBindingsListCall struct {
11578 s *Service
11579 parent string
11580 urlParams_ gensupport.URLParams
11581 ifNoneMatch_ string
11582 ctx_ context.Context
11583 header_ http.Header
11584 }
11585
11586 // List: Lists MembershipBindings.
11587 //
11588 // - parent: The parent Membership for which the MembershipBindings will be
11589 // listed. Specified in the format `projects/*/locations/*/memberships/*`.
11590 func (r *ProjectsLocationsMembershipsBindingsService) List(parent string) *ProjectsLocationsMembershipsBindingsListCall {
11591 c := &ProjectsLocationsMembershipsBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11592 c.parent = parent
11593 return c
11594 }
11595
11596 // Filter sets the optional parameter "filter": Lists MembershipBindings that
11597 // match the filter expression, following the syntax outlined in
11598 // https://google.aip.dev/160.
11599 func (c *ProjectsLocationsMembershipsBindingsListCall) Filter(filter string) *ProjectsLocationsMembershipsBindingsListCall {
11600 c.urlParams_.Set("filter", filter)
11601 return c
11602 }
11603
11604 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
11605 // resources, `page_size` specifies number of resources to return. If
11606 // unspecified or set to 0, all resources will be returned.
11607 func (c *ProjectsLocationsMembershipsBindingsListCall) PageSize(pageSize int64) *ProjectsLocationsMembershipsBindingsListCall {
11608 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11609 return c
11610 }
11611
11612 // PageToken sets the optional parameter "pageToken": Token returned by
11613 // previous call to `ListMembershipBindings` which specifies the position in
11614 // the list from where to continue listing the resources.
11615 func (c *ProjectsLocationsMembershipsBindingsListCall) PageToken(pageToken string) *ProjectsLocationsMembershipsBindingsListCall {
11616 c.urlParams_.Set("pageToken", pageToken)
11617 return c
11618 }
11619
11620 // Fields allows partial responses to be retrieved. See
11621 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11622 // details.
11623 func (c *ProjectsLocationsMembershipsBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsBindingsListCall {
11624 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11625 return c
11626 }
11627
11628 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11629 // object's ETag matches the given value. This is useful for getting updates
11630 // only after the object has changed since the last request.
11631 func (c *ProjectsLocationsMembershipsBindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsBindingsListCall {
11632 c.ifNoneMatch_ = entityTag
11633 return c
11634 }
11635
11636 // Context sets the context to be used in this call's Do method.
11637 func (c *ProjectsLocationsMembershipsBindingsListCall) Context(ctx context.Context) *ProjectsLocationsMembershipsBindingsListCall {
11638 c.ctx_ = ctx
11639 return c
11640 }
11641
11642 // Header returns a http.Header that can be modified by the caller to add
11643 // headers to the request.
11644 func (c *ProjectsLocationsMembershipsBindingsListCall) Header() http.Header {
11645 if c.header_ == nil {
11646 c.header_ = make(http.Header)
11647 }
11648 return c.header_
11649 }
11650
11651 func (c *ProjectsLocationsMembershipsBindingsListCall) doRequest(alt string) (*http.Response, error) {
11652 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11653 if c.ifNoneMatch_ != "" {
11654 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11655 }
11656 c.urlParams_.Set("alt", alt)
11657 c.urlParams_.Set("prettyPrint", "false")
11658 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/bindings")
11659 urls += "?" + c.urlParams_.Encode()
11660 req, err := http.NewRequest("GET", urls, nil)
11661 if err != nil {
11662 return nil, err
11663 }
11664 req.Header = reqHeaders
11665 googleapi.Expand(req.URL, map[string]string{
11666 "parent": c.parent,
11667 })
11668 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.list", "request", internallog.HTTPRequest(req, nil))
11669 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11670 }
11671
11672 // Do executes the "gkehub.projects.locations.memberships.bindings.list" call.
11673 // Any non-2xx status code is an error. Response headers are in either
11674 // *ListMembershipBindingsResponse.ServerResponse.Header or (if a response was
11675 // returned at all) in error.(*googleapi.Error).Header. Use
11676 // googleapi.IsNotModified to check whether the returned error was because
11677 // http.StatusNotModified was returned.
11678 func (c *ProjectsLocationsMembershipsBindingsListCall) Do(opts ...googleapi.CallOption) (*ListMembershipBindingsResponse, error) {
11679 gensupport.SetOptions(c.urlParams_, opts...)
11680 res, err := c.doRequest("json")
11681 if res != nil && res.StatusCode == http.StatusNotModified {
11682 if res.Body != nil {
11683 res.Body.Close()
11684 }
11685 return nil, gensupport.WrapError(&googleapi.Error{
11686 Code: res.StatusCode,
11687 Header: res.Header,
11688 })
11689 }
11690 if err != nil {
11691 return nil, err
11692 }
11693 defer googleapi.CloseBody(res)
11694 if err := googleapi.CheckResponse(res); err != nil {
11695 return nil, gensupport.WrapError(err)
11696 }
11697 ret := &ListMembershipBindingsResponse{
11698 ServerResponse: googleapi.ServerResponse{
11699 Header: res.Header,
11700 HTTPStatusCode: res.StatusCode,
11701 },
11702 }
11703 target := &ret
11704 b, err := gensupport.DecodeResponseBytes(target, res)
11705 if err != nil {
11706 return nil, err
11707 }
11708 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.list", "response", internallog.HTTPResponse(res, b))
11709 return ret, nil
11710 }
11711
11712 // Pages invokes f for each page of results.
11713 // A non-nil error returned from f will halt the iteration.
11714 // The provided context supersedes any context provided to the Context method.
11715 func (c *ProjectsLocationsMembershipsBindingsListCall) Pages(ctx context.Context, f func(*ListMembershipBindingsResponse) error) error {
11716 c.ctx_ = ctx
11717 defer c.PageToken(c.urlParams_.Get("pageToken"))
11718 for {
11719 x, err := c.Do()
11720 if err != nil {
11721 return err
11722 }
11723 if err := f(x); err != nil {
11724 return err
11725 }
11726 if x.NextPageToken == "" {
11727 return nil
11728 }
11729 c.PageToken(x.NextPageToken)
11730 }
11731 }
11732
11733 type ProjectsLocationsMembershipsBindingsPatchCall struct {
11734 s *Service
11735 name string
11736 membershipbinding *MembershipBinding
11737 urlParams_ gensupport.URLParams
11738 ctx_ context.Context
11739 header_ http.Header
11740 }
11741
11742 // Patch: Updates a MembershipBinding.
11743 //
11744 // - name: The resource name for the membershipbinding itself
11745 // `projects/{project}/locations/{location}/memberships/{membership}/bindings/
11746 // {membershipbinding}`.
11747 func (r *ProjectsLocationsMembershipsBindingsService) Patch(name string, membershipbinding *MembershipBinding) *ProjectsLocationsMembershipsBindingsPatchCall {
11748 c := &ProjectsLocationsMembershipsBindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11749 c.name = name
11750 c.membershipbinding = membershipbinding
11751 return c
11752 }
11753
11754 // UpdateMask sets the optional parameter "updateMask": Required. The fields to
11755 // be updated.
11756 func (c *ProjectsLocationsMembershipsBindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMembershipsBindingsPatchCall {
11757 c.urlParams_.Set("updateMask", updateMask)
11758 return c
11759 }
11760
11761 // Fields allows partial responses to be retrieved. See
11762 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11763 // details.
11764 func (c *ProjectsLocationsMembershipsBindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsBindingsPatchCall {
11765 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11766 return c
11767 }
11768
11769 // Context sets the context to be used in this call's Do method.
11770 func (c *ProjectsLocationsMembershipsBindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsMembershipsBindingsPatchCall {
11771 c.ctx_ = ctx
11772 return c
11773 }
11774
11775 // Header returns a http.Header that can be modified by the caller to add
11776 // headers to the request.
11777 func (c *ProjectsLocationsMembershipsBindingsPatchCall) Header() http.Header {
11778 if c.header_ == nil {
11779 c.header_ = make(http.Header)
11780 }
11781 return c.header_
11782 }
11783
11784 func (c *ProjectsLocationsMembershipsBindingsPatchCall) doRequest(alt string) (*http.Response, error) {
11785 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11786 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.membershipbinding)
11787 if err != nil {
11788 return nil, err
11789 }
11790 c.urlParams_.Set("alt", alt)
11791 c.urlParams_.Set("prettyPrint", "false")
11792 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
11793 urls += "?" + c.urlParams_.Encode()
11794 req, err := http.NewRequest("PATCH", urls, body)
11795 if err != nil {
11796 return nil, err
11797 }
11798 req.Header = reqHeaders
11799 googleapi.Expand(req.URL, map[string]string{
11800 "name": c.name,
11801 })
11802 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
11803 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11804 }
11805
11806 // Do executes the "gkehub.projects.locations.memberships.bindings.patch" call.
11807 // Any non-2xx status code is an error. Response headers are in either
11808 // *Operation.ServerResponse.Header or (if a response was returned at all) in
11809 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11810 // whether the returned error was because http.StatusNotModified was returned.
11811 func (c *ProjectsLocationsMembershipsBindingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11812 gensupport.SetOptions(c.urlParams_, opts...)
11813 res, err := c.doRequest("json")
11814 if res != nil && res.StatusCode == http.StatusNotModified {
11815 if res.Body != nil {
11816 res.Body.Close()
11817 }
11818 return nil, gensupport.WrapError(&googleapi.Error{
11819 Code: res.StatusCode,
11820 Header: res.Header,
11821 })
11822 }
11823 if err != nil {
11824 return nil, err
11825 }
11826 defer googleapi.CloseBody(res)
11827 if err := googleapi.CheckResponse(res); err != nil {
11828 return nil, gensupport.WrapError(err)
11829 }
11830 ret := &Operation{
11831 ServerResponse: googleapi.ServerResponse{
11832 Header: res.Header,
11833 HTTPStatusCode: res.StatusCode,
11834 },
11835 }
11836 target := &ret
11837 b, err := gensupport.DecodeResponseBytes(target, res)
11838 if err != nil {
11839 return nil, err
11840 }
11841 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.patch", "response", internallog.HTTPResponse(res, b))
11842 return ret, nil
11843 }
11844
11845 type ProjectsLocationsMembershipsRbacrolebindingsCreateCall struct {
11846 s *Service
11847 parent string
11848 rbacrolebinding *RBACRoleBinding
11849 urlParams_ gensupport.URLParams
11850 ctx_ context.Context
11851 header_ http.Header
11852 }
11853
11854 // Create: Creates a Membership RBACRoleBinding.
11855 //
11856 // - parent: The parent (project and location) where the RBACRoleBinding will
11857 // be created. Specified in the format
11858 // `projects/*/locations/*/memberships/*`.
11859 func (r *ProjectsLocationsMembershipsRbacrolebindingsService) Create(parent string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsMembershipsRbacrolebindingsCreateCall {
11860 c := &ProjectsLocationsMembershipsRbacrolebindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11861 c.parent = parent
11862 c.rbacrolebinding = rbacrolebinding
11863 return c
11864 }
11865
11866 // RbacrolebindingId sets the optional parameter "rbacrolebindingId": Required.
11867 // Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a
11868 // valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It
11869 // must consist of lower case alphanumeric characters or `-` 3. It must start
11870 // and end with an alphanumeric character Which can be expressed as the regex:
11871 // `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
11872 func (c *ProjectsLocationsMembershipsRbacrolebindingsCreateCall) RbacrolebindingId(rbacrolebindingId string) *ProjectsLocationsMembershipsRbacrolebindingsCreateCall {
11873 c.urlParams_.Set("rbacrolebindingId", rbacrolebindingId)
11874 return c
11875 }
11876
11877 // Fields allows partial responses to be retrieved. See
11878 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11879 // details.
11880 func (c *ProjectsLocationsMembershipsRbacrolebindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsRbacrolebindingsCreateCall {
11881 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11882 return c
11883 }
11884
11885 // Context sets the context to be used in this call's Do method.
11886 func (c *ProjectsLocationsMembershipsRbacrolebindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsMembershipsRbacrolebindingsCreateCall {
11887 c.ctx_ = ctx
11888 return c
11889 }
11890
11891 // Header returns a http.Header that can be modified by the caller to add
11892 // headers to the request.
11893 func (c *ProjectsLocationsMembershipsRbacrolebindingsCreateCall) Header() http.Header {
11894 if c.header_ == nil {
11895 c.header_ = make(http.Header)
11896 }
11897 return c.header_
11898 }
11899
11900 func (c *ProjectsLocationsMembershipsRbacrolebindingsCreateCall) doRequest(alt string) (*http.Response, error) {
11901 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11902 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rbacrolebinding)
11903 if err != nil {
11904 return nil, err
11905 }
11906 c.urlParams_.Set("alt", alt)
11907 c.urlParams_.Set("prettyPrint", "false")
11908 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/rbacrolebindings")
11909 urls += "?" + c.urlParams_.Encode()
11910 req, err := http.NewRequest("POST", urls, body)
11911 if err != nil {
11912 return nil, err
11913 }
11914 req.Header = reqHeaders
11915 googleapi.Expand(req.URL, map[string]string{
11916 "parent": c.parent,
11917 })
11918 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.create", "request", internallog.HTTPRequest(req, body.Bytes()))
11919 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11920 }
11921
11922 // Do executes the "gkehub.projects.locations.memberships.rbacrolebindings.create" call.
11923 // Any non-2xx status code is an error. Response headers are in either
11924 // *Operation.ServerResponse.Header or (if a response was returned at all) in
11925 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11926 // whether the returned error was because http.StatusNotModified was returned.
11927 func (c *ProjectsLocationsMembershipsRbacrolebindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11928 gensupport.SetOptions(c.urlParams_, opts...)
11929 res, err := c.doRequest("json")
11930 if res != nil && res.StatusCode == http.StatusNotModified {
11931 if res.Body != nil {
11932 res.Body.Close()
11933 }
11934 return nil, gensupport.WrapError(&googleapi.Error{
11935 Code: res.StatusCode,
11936 Header: res.Header,
11937 })
11938 }
11939 if err != nil {
11940 return nil, err
11941 }
11942 defer googleapi.CloseBody(res)
11943 if err := googleapi.CheckResponse(res); err != nil {
11944 return nil, gensupport.WrapError(err)
11945 }
11946 ret := &Operation{
11947 ServerResponse: googleapi.ServerResponse{
11948 Header: res.Header,
11949 HTTPStatusCode: res.StatusCode,
11950 },
11951 }
11952 target := &ret
11953 b, err := gensupport.DecodeResponseBytes(target, res)
11954 if err != nil {
11955 return nil, err
11956 }
11957 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.create", "response", internallog.HTTPResponse(res, b))
11958 return ret, nil
11959 }
11960
11961 type ProjectsLocationsMembershipsRbacrolebindingsDeleteCall struct {
11962 s *Service
11963 name string
11964 urlParams_ gensupport.URLParams
11965 ctx_ context.Context
11966 header_ http.Header
11967 }
11968
11969 // Delete: Deletes a Membership RBACRoleBinding.
11970 //
11971 // - name: The RBACRoleBinding resource name in the format
11972 // `projects/*/locations/*/memberships/*/rbacrolebindings/*`.
11973 func (r *ProjectsLocationsMembershipsRbacrolebindingsService) Delete(name string) *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall {
11974 c := &ProjectsLocationsMembershipsRbacrolebindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11975 c.name = name
11976 return c
11977 }
11978
11979 // Fields allows partial responses to be retrieved. See
11980 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11981 // details.
11982 func (c *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall {
11983 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11984 return c
11985 }
11986
11987 // Context sets the context to be used in this call's Do method.
11988 func (c *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall {
11989 c.ctx_ = ctx
11990 return c
11991 }
11992
11993 // Header returns a http.Header that can be modified by the caller to add
11994 // headers to the request.
11995 func (c *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall) Header() http.Header {
11996 if c.header_ == nil {
11997 c.header_ = make(http.Header)
11998 }
11999 return c.header_
12000 }
12001
12002 func (c *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall) doRequest(alt string) (*http.Response, error) {
12003 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12004 c.urlParams_.Set("alt", alt)
12005 c.urlParams_.Set("prettyPrint", "false")
12006 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
12007 urls += "?" + c.urlParams_.Encode()
12008 req, err := http.NewRequest("DELETE", urls, nil)
12009 if err != nil {
12010 return nil, err
12011 }
12012 req.Header = reqHeaders
12013 googleapi.Expand(req.URL, map[string]string{
12014 "name": c.name,
12015 })
12016 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.delete", "request", internallog.HTTPRequest(req, nil))
12017 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12018 }
12019
12020 // Do executes the "gkehub.projects.locations.memberships.rbacrolebindings.delete" call.
12021 // Any non-2xx status code is an error. Response headers are in either
12022 // *Operation.ServerResponse.Header or (if a response was returned at all) in
12023 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12024 // whether the returned error was because http.StatusNotModified was returned.
12025 func (c *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12026 gensupport.SetOptions(c.urlParams_, opts...)
12027 res, err := c.doRequest("json")
12028 if res != nil && res.StatusCode == http.StatusNotModified {
12029 if res.Body != nil {
12030 res.Body.Close()
12031 }
12032 return nil, gensupport.WrapError(&googleapi.Error{
12033 Code: res.StatusCode,
12034 Header: res.Header,
12035 })
12036 }
12037 if err != nil {
12038 return nil, err
12039 }
12040 defer googleapi.CloseBody(res)
12041 if err := googleapi.CheckResponse(res); err != nil {
12042 return nil, gensupport.WrapError(err)
12043 }
12044 ret := &Operation{
12045 ServerResponse: googleapi.ServerResponse{
12046 Header: res.Header,
12047 HTTPStatusCode: res.StatusCode,
12048 },
12049 }
12050 target := &ret
12051 b, err := gensupport.DecodeResponseBytes(target, res)
12052 if err != nil {
12053 return nil, err
12054 }
12055 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.delete", "response", internallog.HTTPResponse(res, b))
12056 return ret, nil
12057 }
12058
12059 type ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall struct {
12060 s *Service
12061 parent string
12062 rbacrolebinding *RBACRoleBinding
12063 urlParams_ gensupport.URLParams
12064 ctx_ context.Context
12065 header_ http.Header
12066 }
12067
12068 // GenerateMembershipRBACRoleBindingYAML: Generates a YAML of the RBAC policies
12069 // for the specified RoleBinding and its associated impersonation resources.
12070 //
12071 // - parent: The parent (project and location) where the RBACRoleBinding will
12072 // be created. Specified in the format
12073 // `projects/*/locations/*/memberships/*`.
12074 func (r *ProjectsLocationsMembershipsRbacrolebindingsService) GenerateMembershipRBACRoleBindingYAML(parent string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall {
12075 c := &ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12076 c.parent = parent
12077 c.rbacrolebinding = rbacrolebinding
12078 return c
12079 }
12080
12081 // RbacrolebindingId sets the optional parameter "rbacrolebindingId": Required.
12082 // Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a
12083 // valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It
12084 // must consist of lower case alphanumeric characters or `-` 3. It must start
12085 // and end with an alphanumeric character Which can be expressed as the regex:
12086 // `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
12087 func (c *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall) RbacrolebindingId(rbacrolebindingId string) *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall {
12088 c.urlParams_.Set("rbacrolebindingId", rbacrolebindingId)
12089 return c
12090 }
12091
12092 // Fields allows partial responses to be retrieved. See
12093 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12094 // details.
12095 func (c *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall {
12096 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12097 return c
12098 }
12099
12100 // Context sets the context to be used in this call's Do method.
12101 func (c *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall) Context(ctx context.Context) *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall {
12102 c.ctx_ = ctx
12103 return c
12104 }
12105
12106 // Header returns a http.Header that can be modified by the caller to add
12107 // headers to the request.
12108 func (c *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall) Header() http.Header {
12109 if c.header_ == nil {
12110 c.header_ = make(http.Header)
12111 }
12112 return c.header_
12113 }
12114
12115 func (c *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall) doRequest(alt string) (*http.Response, error) {
12116 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12117 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rbacrolebinding)
12118 if err != nil {
12119 return nil, err
12120 }
12121 c.urlParams_.Set("alt", alt)
12122 c.urlParams_.Set("prettyPrint", "false")
12123 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/rbacrolebindings:generateMembershipRBACRoleBindingYAML")
12124 urls += "?" + c.urlParams_.Encode()
12125 req, err := http.NewRequest("POST", urls, body)
12126 if err != nil {
12127 return nil, err
12128 }
12129 req.Header = reqHeaders
12130 googleapi.Expand(req.URL, map[string]string{
12131 "parent": c.parent,
12132 })
12133 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.generateMembershipRBACRoleBindingYAML", "request", internallog.HTTPRequest(req, body.Bytes()))
12134 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12135 }
12136
12137 // Do executes the "gkehub.projects.locations.memberships.rbacrolebindings.generateMembershipRBACRoleBindingYAML" call.
12138 // Any non-2xx status code is an error. Response headers are in either
12139 // *GenerateMembershipRBACRoleBindingYAMLResponse.ServerResponse.Header or (if
12140 // a response was returned at all) in error.(*googleapi.Error).Header. Use
12141 // googleapi.IsNotModified to check whether the returned error was because
12142 // http.StatusNotModified was returned.
12143 func (c *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall) Do(opts ...googleapi.CallOption) (*GenerateMembershipRBACRoleBindingYAMLResponse, error) {
12144 gensupport.SetOptions(c.urlParams_, opts...)
12145 res, err := c.doRequest("json")
12146 if res != nil && res.StatusCode == http.StatusNotModified {
12147 if res.Body != nil {
12148 res.Body.Close()
12149 }
12150 return nil, gensupport.WrapError(&googleapi.Error{
12151 Code: res.StatusCode,
12152 Header: res.Header,
12153 })
12154 }
12155 if err != nil {
12156 return nil, err
12157 }
12158 defer googleapi.CloseBody(res)
12159 if err := googleapi.CheckResponse(res); err != nil {
12160 return nil, gensupport.WrapError(err)
12161 }
12162 ret := &GenerateMembershipRBACRoleBindingYAMLResponse{
12163 ServerResponse: googleapi.ServerResponse{
12164 Header: res.Header,
12165 HTTPStatusCode: res.StatusCode,
12166 },
12167 }
12168 target := &ret
12169 b, err := gensupport.DecodeResponseBytes(target, res)
12170 if err != nil {
12171 return nil, err
12172 }
12173 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.generateMembershipRBACRoleBindingYAML", "response", internallog.HTTPResponse(res, b))
12174 return ret, nil
12175 }
12176
12177 type ProjectsLocationsMembershipsRbacrolebindingsGetCall struct {
12178 s *Service
12179 name string
12180 urlParams_ gensupport.URLParams
12181 ifNoneMatch_ string
12182 ctx_ context.Context
12183 header_ http.Header
12184 }
12185
12186 // Get: Returns the details of a Membership RBACRoleBinding.
12187 //
12188 // - name: The RBACRoleBinding resource name in the format
12189 // `projects/*/locations/*/memberships/*/rbacrolebindings/*`.
12190 func (r *ProjectsLocationsMembershipsRbacrolebindingsService) Get(name string) *ProjectsLocationsMembershipsRbacrolebindingsGetCall {
12191 c := &ProjectsLocationsMembershipsRbacrolebindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12192 c.name = name
12193 return c
12194 }
12195
12196 // Fields allows partial responses to be retrieved. See
12197 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12198 // details.
12199 func (c *ProjectsLocationsMembershipsRbacrolebindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsRbacrolebindingsGetCall {
12200 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12201 return c
12202 }
12203
12204 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12205 // object's ETag matches the given value. This is useful for getting updates
12206 // only after the object has changed since the last request.
12207 func (c *ProjectsLocationsMembershipsRbacrolebindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsRbacrolebindingsGetCall {
12208 c.ifNoneMatch_ = entityTag
12209 return c
12210 }
12211
12212 // Context sets the context to be used in this call's Do method.
12213 func (c *ProjectsLocationsMembershipsRbacrolebindingsGetCall) Context(ctx context.Context) *ProjectsLocationsMembershipsRbacrolebindingsGetCall {
12214 c.ctx_ = ctx
12215 return c
12216 }
12217
12218 // Header returns a http.Header that can be modified by the caller to add
12219 // headers to the request.
12220 func (c *ProjectsLocationsMembershipsRbacrolebindingsGetCall) Header() http.Header {
12221 if c.header_ == nil {
12222 c.header_ = make(http.Header)
12223 }
12224 return c.header_
12225 }
12226
12227 func (c *ProjectsLocationsMembershipsRbacrolebindingsGetCall) doRequest(alt string) (*http.Response, error) {
12228 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12229 if c.ifNoneMatch_ != "" {
12230 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12231 }
12232 c.urlParams_.Set("alt", alt)
12233 c.urlParams_.Set("prettyPrint", "false")
12234 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
12235 urls += "?" + c.urlParams_.Encode()
12236 req, err := http.NewRequest("GET", urls, nil)
12237 if err != nil {
12238 return nil, err
12239 }
12240 req.Header = reqHeaders
12241 googleapi.Expand(req.URL, map[string]string{
12242 "name": c.name,
12243 })
12244 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.get", "request", internallog.HTTPRequest(req, nil))
12245 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12246 }
12247
12248 // Do executes the "gkehub.projects.locations.memberships.rbacrolebindings.get" call.
12249 // Any non-2xx status code is an error. Response headers are in either
12250 // *RBACRoleBinding.ServerResponse.Header or (if a response was returned at
12251 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12252 // check whether the returned error was because http.StatusNotModified was
12253 // returned.
12254 func (c *ProjectsLocationsMembershipsRbacrolebindingsGetCall) Do(opts ...googleapi.CallOption) (*RBACRoleBinding, error) {
12255 gensupport.SetOptions(c.urlParams_, opts...)
12256 res, err := c.doRequest("json")
12257 if res != nil && res.StatusCode == http.StatusNotModified {
12258 if res.Body != nil {
12259 res.Body.Close()
12260 }
12261 return nil, gensupport.WrapError(&googleapi.Error{
12262 Code: res.StatusCode,
12263 Header: res.Header,
12264 })
12265 }
12266 if err != nil {
12267 return nil, err
12268 }
12269 defer googleapi.CloseBody(res)
12270 if err := googleapi.CheckResponse(res); err != nil {
12271 return nil, gensupport.WrapError(err)
12272 }
12273 ret := &RBACRoleBinding{
12274 ServerResponse: googleapi.ServerResponse{
12275 Header: res.Header,
12276 HTTPStatusCode: res.StatusCode,
12277 },
12278 }
12279 target := &ret
12280 b, err := gensupport.DecodeResponseBytes(target, res)
12281 if err != nil {
12282 return nil, err
12283 }
12284 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.get", "response", internallog.HTTPResponse(res, b))
12285 return ret, nil
12286 }
12287
12288 type ProjectsLocationsMembershipsRbacrolebindingsListCall struct {
12289 s *Service
12290 parent string
12291 urlParams_ gensupport.URLParams
12292 ifNoneMatch_ string
12293 ctx_ context.Context
12294 header_ http.Header
12295 }
12296
12297 // List: Lists all Membership RBACRoleBindings.
12298 //
12299 // - parent: The parent (project and location) where the Features will be
12300 // listed. Specified in the format `projects/*/locations/*/memberships/*`.
12301 func (r *ProjectsLocationsMembershipsRbacrolebindingsService) List(parent string) *ProjectsLocationsMembershipsRbacrolebindingsListCall {
12302 c := &ProjectsLocationsMembershipsRbacrolebindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12303 c.parent = parent
12304 return c
12305 }
12306
12307 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
12308 // resources, `page_size` specifies number of resources to return. If
12309 // unspecified or set to 0, all resources will be returned.
12310 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) PageSize(pageSize int64) *ProjectsLocationsMembershipsRbacrolebindingsListCall {
12311 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12312 return c
12313 }
12314
12315 // PageToken sets the optional parameter "pageToken": Token returned by
12316 // previous call to `ListMembershipRBACRoleBindings` which specifies the
12317 // position in the list from where to continue listing the resources.
12318 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) PageToken(pageToken string) *ProjectsLocationsMembershipsRbacrolebindingsListCall {
12319 c.urlParams_.Set("pageToken", pageToken)
12320 return c
12321 }
12322
12323 // Fields allows partial responses to be retrieved. See
12324 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12325 // details.
12326 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsRbacrolebindingsListCall {
12327 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12328 return c
12329 }
12330
12331 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12332 // object's ETag matches the given value. This is useful for getting updates
12333 // only after the object has changed since the last request.
12334 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsRbacrolebindingsListCall {
12335 c.ifNoneMatch_ = entityTag
12336 return c
12337 }
12338
12339 // Context sets the context to be used in this call's Do method.
12340 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) Context(ctx context.Context) *ProjectsLocationsMembershipsRbacrolebindingsListCall {
12341 c.ctx_ = ctx
12342 return c
12343 }
12344
12345 // Header returns a http.Header that can be modified by the caller to add
12346 // headers to the request.
12347 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) Header() http.Header {
12348 if c.header_ == nil {
12349 c.header_ = make(http.Header)
12350 }
12351 return c.header_
12352 }
12353
12354 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) doRequest(alt string) (*http.Response, error) {
12355 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12356 if c.ifNoneMatch_ != "" {
12357 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12358 }
12359 c.urlParams_.Set("alt", alt)
12360 c.urlParams_.Set("prettyPrint", "false")
12361 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/rbacrolebindings")
12362 urls += "?" + c.urlParams_.Encode()
12363 req, err := http.NewRequest("GET", urls, nil)
12364 if err != nil {
12365 return nil, err
12366 }
12367 req.Header = reqHeaders
12368 googleapi.Expand(req.URL, map[string]string{
12369 "parent": c.parent,
12370 })
12371 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.list", "request", internallog.HTTPRequest(req, nil))
12372 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12373 }
12374
12375 // Do executes the "gkehub.projects.locations.memberships.rbacrolebindings.list" call.
12376 // Any non-2xx status code is an error. Response headers are in either
12377 // *ListMembershipRBACRoleBindingsResponse.ServerResponse.Header or (if a
12378 // response was returned at all) in error.(*googleapi.Error).Header. Use
12379 // googleapi.IsNotModified to check whether the returned error was because
12380 // http.StatusNotModified was returned.
12381 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) Do(opts ...googleapi.CallOption) (*ListMembershipRBACRoleBindingsResponse, error) {
12382 gensupport.SetOptions(c.urlParams_, opts...)
12383 res, err := c.doRequest("json")
12384 if res != nil && res.StatusCode == http.StatusNotModified {
12385 if res.Body != nil {
12386 res.Body.Close()
12387 }
12388 return nil, gensupport.WrapError(&googleapi.Error{
12389 Code: res.StatusCode,
12390 Header: res.Header,
12391 })
12392 }
12393 if err != nil {
12394 return nil, err
12395 }
12396 defer googleapi.CloseBody(res)
12397 if err := googleapi.CheckResponse(res); err != nil {
12398 return nil, gensupport.WrapError(err)
12399 }
12400 ret := &ListMembershipRBACRoleBindingsResponse{
12401 ServerResponse: googleapi.ServerResponse{
12402 Header: res.Header,
12403 HTTPStatusCode: res.StatusCode,
12404 },
12405 }
12406 target := &ret
12407 b, err := gensupport.DecodeResponseBytes(target, res)
12408 if err != nil {
12409 return nil, err
12410 }
12411 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.list", "response", internallog.HTTPResponse(res, b))
12412 return ret, nil
12413 }
12414
12415 // Pages invokes f for each page of results.
12416 // A non-nil error returned from f will halt the iteration.
12417 // The provided context supersedes any context provided to the Context method.
12418 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) Pages(ctx context.Context, f func(*ListMembershipRBACRoleBindingsResponse) error) error {
12419 c.ctx_ = ctx
12420 defer c.PageToken(c.urlParams_.Get("pageToken"))
12421 for {
12422 x, err := c.Do()
12423 if err != nil {
12424 return err
12425 }
12426 if err := f(x); err != nil {
12427 return err
12428 }
12429 if x.NextPageToken == "" {
12430 return nil
12431 }
12432 c.PageToken(x.NextPageToken)
12433 }
12434 }
12435
12436 type ProjectsLocationsMembershipsRbacrolebindingsPatchCall struct {
12437 s *Service
12438 name string
12439 rbacrolebinding *RBACRoleBinding
12440 urlParams_ gensupport.URLParams
12441 ctx_ context.Context
12442 header_ http.Header
12443 }
12444
12445 // Patch: Updates a Membership RBACRoleBinding.
12446 //
12447 // - name: The resource name for the rbacrolebinding
12448 // `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{r
12449 // bacrolebinding}` or
12450 // `projects/{project}/locations/{location}/memberships/{membership}/rbacroleb
12451 // indings/{rbacrolebinding}`.
12452 func (r *ProjectsLocationsMembershipsRbacrolebindingsService) Patch(name string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsMembershipsRbacrolebindingsPatchCall {
12453 c := &ProjectsLocationsMembershipsRbacrolebindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12454 c.name = name
12455 c.rbacrolebinding = rbacrolebinding
12456 return c
12457 }
12458
12459 // UpdateMask sets the optional parameter "updateMask": Required. The fields to
12460 // be updated.
12461 func (c *ProjectsLocationsMembershipsRbacrolebindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMembershipsRbacrolebindingsPatchCall {
12462 c.urlParams_.Set("updateMask", updateMask)
12463 return c
12464 }
12465
12466 // Fields allows partial responses to be retrieved. See
12467 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12468 // details.
12469 func (c *ProjectsLocationsMembershipsRbacrolebindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsRbacrolebindingsPatchCall {
12470 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12471 return c
12472 }
12473
12474 // Context sets the context to be used in this call's Do method.
12475 func (c *ProjectsLocationsMembershipsRbacrolebindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsMembershipsRbacrolebindingsPatchCall {
12476 c.ctx_ = ctx
12477 return c
12478 }
12479
12480 // Header returns a http.Header that can be modified by the caller to add
12481 // headers to the request.
12482 func (c *ProjectsLocationsMembershipsRbacrolebindingsPatchCall) Header() http.Header {
12483 if c.header_ == nil {
12484 c.header_ = make(http.Header)
12485 }
12486 return c.header_
12487 }
12488
12489 func (c *ProjectsLocationsMembershipsRbacrolebindingsPatchCall) doRequest(alt string) (*http.Response, error) {
12490 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12491 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rbacrolebinding)
12492 if err != nil {
12493 return nil, err
12494 }
12495 c.urlParams_.Set("alt", alt)
12496 c.urlParams_.Set("prettyPrint", "false")
12497 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
12498 urls += "?" + c.urlParams_.Encode()
12499 req, err := http.NewRequest("PATCH", urls, body)
12500 if err != nil {
12501 return nil, err
12502 }
12503 req.Header = reqHeaders
12504 googleapi.Expand(req.URL, map[string]string{
12505 "name": c.name,
12506 })
12507 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
12508 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12509 }
12510
12511 // Do executes the "gkehub.projects.locations.memberships.rbacrolebindings.patch" call.
12512 // Any non-2xx status code is an error. Response headers are in either
12513 // *Operation.ServerResponse.Header or (if a response was returned at all) in
12514 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12515 // whether the returned error was because http.StatusNotModified was returned.
12516 func (c *ProjectsLocationsMembershipsRbacrolebindingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12517 gensupport.SetOptions(c.urlParams_, opts...)
12518 res, err := c.doRequest("json")
12519 if res != nil && res.StatusCode == http.StatusNotModified {
12520 if res.Body != nil {
12521 res.Body.Close()
12522 }
12523 return nil, gensupport.WrapError(&googleapi.Error{
12524 Code: res.StatusCode,
12525 Header: res.Header,
12526 })
12527 }
12528 if err != nil {
12529 return nil, err
12530 }
12531 defer googleapi.CloseBody(res)
12532 if err := googleapi.CheckResponse(res); err != nil {
12533 return nil, gensupport.WrapError(err)
12534 }
12535 ret := &Operation{
12536 ServerResponse: googleapi.ServerResponse{
12537 Header: res.Header,
12538 HTTPStatusCode: res.StatusCode,
12539 },
12540 }
12541 target := &ret
12542 b, err := gensupport.DecodeResponseBytes(target, res)
12543 if err != nil {
12544 return nil, err
12545 }
12546 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.patch", "response", internallog.HTTPResponse(res, b))
12547 return ret, nil
12548 }
12549
12550 type ProjectsLocationsOperationsCancelCall struct {
12551 s *Service
12552 name string
12553 canceloperationrequest *CancelOperationRequest
12554 urlParams_ gensupport.URLParams
12555 ctx_ context.Context
12556 header_ http.Header
12557 }
12558
12559 // Cancel: Starts asynchronous cancellation on a long-running operation. The
12560 // server makes a best effort to cancel the operation, but success is not
12561 // guaranteed. If the server doesn't support this method, it returns
12562 // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
12563 // other methods to check whether the cancellation succeeded or whether the
12564 // operation completed despite cancellation. On successful cancellation, the
12565 // operation is not deleted; instead, it becomes an operation with an
12566 // Operation.error value with a google.rpc.Status.code of `1`, corresponding to
12567 // `Code.CANCELLED`.
12568 //
12569 // - name: The name of the operation resource to be cancelled.
12570 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
12571 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12572 c.name = name
12573 c.canceloperationrequest = canceloperationrequest
12574 return c
12575 }
12576
12577 // Fields allows partial responses to be retrieved. See
12578 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12579 // details.
12580 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
12581 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12582 return c
12583 }
12584
12585 // Context sets the context to be used in this call's Do method.
12586 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
12587 c.ctx_ = ctx
12588 return c
12589 }
12590
12591 // Header returns a http.Header that can be modified by the caller to add
12592 // headers to the request.
12593 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
12594 if c.header_ == nil {
12595 c.header_ = make(http.Header)
12596 }
12597 return c.header_
12598 }
12599
12600 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
12601 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12602 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.canceloperationrequest)
12603 if err != nil {
12604 return nil, err
12605 }
12606 c.urlParams_.Set("alt", alt)
12607 c.urlParams_.Set("prettyPrint", "false")
12608 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:cancel")
12609 urls += "?" + c.urlParams_.Encode()
12610 req, err := http.NewRequest("POST", urls, body)
12611 if err != nil {
12612 return nil, err
12613 }
12614 req.Header = reqHeaders
12615 googleapi.Expand(req.URL, map[string]string{
12616 "name": c.name,
12617 })
12618 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.cancel", "request", internallog.HTTPRequest(req, body.Bytes()))
12619 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12620 }
12621
12622 // Do executes the "gkehub.projects.locations.operations.cancel" call.
12623 // Any non-2xx status code is an error. Response headers are in either
12624 // *Empty.ServerResponse.Header or (if a response was returned at all) in
12625 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12626 // whether the returned error was because http.StatusNotModified was returned.
12627 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
12628 gensupport.SetOptions(c.urlParams_, opts...)
12629 res, err := c.doRequest("json")
12630 if res != nil && res.StatusCode == http.StatusNotModified {
12631 if res.Body != nil {
12632 res.Body.Close()
12633 }
12634 return nil, gensupport.WrapError(&googleapi.Error{
12635 Code: res.StatusCode,
12636 Header: res.Header,
12637 })
12638 }
12639 if err != nil {
12640 return nil, err
12641 }
12642 defer googleapi.CloseBody(res)
12643 if err := googleapi.CheckResponse(res); err != nil {
12644 return nil, gensupport.WrapError(err)
12645 }
12646 ret := &Empty{
12647 ServerResponse: googleapi.ServerResponse{
12648 Header: res.Header,
12649 HTTPStatusCode: res.StatusCode,
12650 },
12651 }
12652 target := &ret
12653 b, err := gensupport.DecodeResponseBytes(target, res)
12654 if err != nil {
12655 return nil, err
12656 }
12657 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.cancel", "response", internallog.HTTPResponse(res, b))
12658 return ret, nil
12659 }
12660
12661 type ProjectsLocationsOperationsDeleteCall struct {
12662 s *Service
12663 name string
12664 urlParams_ gensupport.URLParams
12665 ctx_ context.Context
12666 header_ http.Header
12667 }
12668
12669 // Delete: Deletes a long-running operation. This method indicates that the
12670 // client is no longer interested in the operation result. It does not cancel
12671 // the operation. If the server doesn't support this method, it returns
12672 // `google.rpc.Code.UNIMPLEMENTED`.
12673 //
12674 // - name: The name of the operation resource to be deleted.
12675 func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
12676 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12677 c.name = name
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 *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
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 *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
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 *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
12698 if c.header_ == nil {
12699 c.header_ = make(http.Header)
12700 }
12701 return c.header_
12702 }
12703
12704 func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
12705 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12706 c.urlParams_.Set("alt", alt)
12707 c.urlParams_.Set("prettyPrint", "false")
12708 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
12709 urls += "?" + c.urlParams_.Encode()
12710 req, err := http.NewRequest("DELETE", urls, nil)
12711 if err != nil {
12712 return nil, err
12713 }
12714 req.Header = reqHeaders
12715 googleapi.Expand(req.URL, map[string]string{
12716 "name": c.name,
12717 })
12718 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.delete", "request", internallog.HTTPRequest(req, nil))
12719 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12720 }
12721
12722 // Do executes the "gkehub.projects.locations.operations.delete" call.
12723 // Any non-2xx status code is an error. Response headers are in either
12724 // *Empty.ServerResponse.Header or (if a response was returned at all) in
12725 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12726 // whether the returned error was because http.StatusNotModified was returned.
12727 func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
12728 gensupport.SetOptions(c.urlParams_, opts...)
12729 res, err := c.doRequest("json")
12730 if res != nil && res.StatusCode == http.StatusNotModified {
12731 if res.Body != nil {
12732 res.Body.Close()
12733 }
12734 return nil, gensupport.WrapError(&googleapi.Error{
12735 Code: res.StatusCode,
12736 Header: res.Header,
12737 })
12738 }
12739 if err != nil {
12740 return nil, err
12741 }
12742 defer googleapi.CloseBody(res)
12743 if err := googleapi.CheckResponse(res); err != nil {
12744 return nil, gensupport.WrapError(err)
12745 }
12746 ret := &Empty{
12747 ServerResponse: googleapi.ServerResponse{
12748 Header: res.Header,
12749 HTTPStatusCode: res.StatusCode,
12750 },
12751 }
12752 target := &ret
12753 b, err := gensupport.DecodeResponseBytes(target, res)
12754 if err != nil {
12755 return nil, err
12756 }
12757 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.delete", "response", internallog.HTTPResponse(res, b))
12758 return ret, nil
12759 }
12760
12761 type ProjectsLocationsOperationsGetCall struct {
12762 s *Service
12763 name string
12764 urlParams_ gensupport.URLParams
12765 ifNoneMatch_ string
12766 ctx_ context.Context
12767 header_ http.Header
12768 }
12769
12770 // Get: Gets the latest state of a long-running operation. Clients can use this
12771 // method to poll the operation result at intervals as recommended by the API
12772 // service.
12773 //
12774 // - name: The name of the operation resource.
12775 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
12776 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12777 c.name = name
12778 return c
12779 }
12780
12781 // Fields allows partial responses to be retrieved. See
12782 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12783 // details.
12784 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
12785 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12786 return c
12787 }
12788
12789 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12790 // object's ETag matches the given value. This is useful for getting updates
12791 // only after the object has changed since the last request.
12792 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
12793 c.ifNoneMatch_ = entityTag
12794 return c
12795 }
12796
12797 // Context sets the context to be used in this call's Do method.
12798 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
12799 c.ctx_ = ctx
12800 return c
12801 }
12802
12803 // Header returns a http.Header that can be modified by the caller to add
12804 // headers to the request.
12805 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
12806 if c.header_ == nil {
12807 c.header_ = make(http.Header)
12808 }
12809 return c.header_
12810 }
12811
12812 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
12813 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12814 if c.ifNoneMatch_ != "" {
12815 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12816 }
12817 c.urlParams_.Set("alt", alt)
12818 c.urlParams_.Set("prettyPrint", "false")
12819 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
12820 urls += "?" + c.urlParams_.Encode()
12821 req, err := http.NewRequest("GET", urls, nil)
12822 if err != nil {
12823 return nil, err
12824 }
12825 req.Header = reqHeaders
12826 googleapi.Expand(req.URL, map[string]string{
12827 "name": c.name,
12828 })
12829 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.get", "request", internallog.HTTPRequest(req, nil))
12830 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12831 }
12832
12833 // Do executes the "gkehub.projects.locations.operations.get" call.
12834 // Any non-2xx status code is an error. Response headers are in either
12835 // *Operation.ServerResponse.Header or (if a response was returned at all) in
12836 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12837 // whether the returned error was because http.StatusNotModified was returned.
12838 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12839 gensupport.SetOptions(c.urlParams_, opts...)
12840 res, err := c.doRequest("json")
12841 if res != nil && res.StatusCode == http.StatusNotModified {
12842 if res.Body != nil {
12843 res.Body.Close()
12844 }
12845 return nil, gensupport.WrapError(&googleapi.Error{
12846 Code: res.StatusCode,
12847 Header: res.Header,
12848 })
12849 }
12850 if err != nil {
12851 return nil, err
12852 }
12853 defer googleapi.CloseBody(res)
12854 if err := googleapi.CheckResponse(res); err != nil {
12855 return nil, gensupport.WrapError(err)
12856 }
12857 ret := &Operation{
12858 ServerResponse: googleapi.ServerResponse{
12859 Header: res.Header,
12860 HTTPStatusCode: res.StatusCode,
12861 },
12862 }
12863 target := &ret
12864 b, err := gensupport.DecodeResponseBytes(target, res)
12865 if err != nil {
12866 return nil, err
12867 }
12868 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.get", "response", internallog.HTTPResponse(res, b))
12869 return ret, nil
12870 }
12871
12872 type ProjectsLocationsOperationsListCall struct {
12873 s *Service
12874 name string
12875 urlParams_ gensupport.URLParams
12876 ifNoneMatch_ string
12877 ctx_ context.Context
12878 header_ http.Header
12879 }
12880
12881 // List: Lists operations that match the specified filter in the request. If
12882 // the server doesn't support this method, it returns `UNIMPLEMENTED`.
12883 //
12884 // - name: The name of the operation's parent resource.
12885 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
12886 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12887 c.name = name
12888 return c
12889 }
12890
12891 // Filter sets the optional parameter "filter": The standard list filter.
12892 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
12893 c.urlParams_.Set("filter", filter)
12894 return c
12895 }
12896
12897 // PageSize sets the optional parameter "pageSize": The standard list page
12898 // size.
12899 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
12900 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12901 return c
12902 }
12903
12904 // PageToken sets the optional parameter "pageToken": The standard list page
12905 // token.
12906 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
12907 c.urlParams_.Set("pageToken", pageToken)
12908 return c
12909 }
12910
12911 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess":
12912 // When set to `true`, operations that are reachable are returned as normal,
12913 // and those that are unreachable are returned in the
12914 // ListOperationsResponse.unreachable field. This can only be `true` when
12915 // reading across collections. For example, when `parent` is set to
12916 // "projects/example/locations/-". This field is not supported by default and
12917 // will result in an `UNIMPLEMENTED` error if set unless explicitly documented
12918 // otherwise in service or product specific documentation.
12919 func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall {
12920 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
12921 return c
12922 }
12923
12924 // Fields allows partial responses to be retrieved. See
12925 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12926 // details.
12927 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
12928 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12929 return c
12930 }
12931
12932 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12933 // object's ETag matches the given value. This is useful for getting updates
12934 // only after the object has changed since the last request.
12935 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
12936 c.ifNoneMatch_ = entityTag
12937 return c
12938 }
12939
12940 // Context sets the context to be used in this call's Do method.
12941 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
12942 c.ctx_ = ctx
12943 return c
12944 }
12945
12946 // Header returns a http.Header that can be modified by the caller to add
12947 // headers to the request.
12948 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
12949 if c.header_ == nil {
12950 c.header_ = make(http.Header)
12951 }
12952 return c.header_
12953 }
12954
12955 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
12956 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12957 if c.ifNoneMatch_ != "" {
12958 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12959 }
12960 c.urlParams_.Set("alt", alt)
12961 c.urlParams_.Set("prettyPrint", "false")
12962 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations")
12963 urls += "?" + c.urlParams_.Encode()
12964 req, err := http.NewRequest("GET", urls, nil)
12965 if err != nil {
12966 return nil, err
12967 }
12968 req.Header = reqHeaders
12969 googleapi.Expand(req.URL, map[string]string{
12970 "name": c.name,
12971 })
12972 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.list", "request", internallog.HTTPRequest(req, nil))
12973 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12974 }
12975
12976 // Do executes the "gkehub.projects.locations.operations.list" call.
12977 // Any non-2xx status code is an error. Response headers are in either
12978 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
12979 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12980 // check whether the returned error was because http.StatusNotModified was
12981 // returned.
12982 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
12983 gensupport.SetOptions(c.urlParams_, opts...)
12984 res, err := c.doRequest("json")
12985 if res != nil && res.StatusCode == http.StatusNotModified {
12986 if res.Body != nil {
12987 res.Body.Close()
12988 }
12989 return nil, gensupport.WrapError(&googleapi.Error{
12990 Code: res.StatusCode,
12991 Header: res.Header,
12992 })
12993 }
12994 if err != nil {
12995 return nil, err
12996 }
12997 defer googleapi.CloseBody(res)
12998 if err := googleapi.CheckResponse(res); err != nil {
12999 return nil, gensupport.WrapError(err)
13000 }
13001 ret := &ListOperationsResponse{
13002 ServerResponse: googleapi.ServerResponse{
13003 Header: res.Header,
13004 HTTPStatusCode: res.StatusCode,
13005 },
13006 }
13007 target := &ret
13008 b, err := gensupport.DecodeResponseBytes(target, res)
13009 if err != nil {
13010 return nil, err
13011 }
13012 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.list", "response", internallog.HTTPResponse(res, b))
13013 return ret, nil
13014 }
13015
13016 // Pages invokes f for each page of results.
13017 // A non-nil error returned from f will halt the iteration.
13018 // The provided context supersedes any context provided to the Context method.
13019 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
13020 c.ctx_ = ctx
13021 defer c.PageToken(c.urlParams_.Get("pageToken"))
13022 for {
13023 x, err := c.Do()
13024 if err != nil {
13025 return err
13026 }
13027 if err := f(x); err != nil {
13028 return err
13029 }
13030 if x.NextPageToken == "" {
13031 return nil
13032 }
13033 c.PageToken(x.NextPageToken)
13034 }
13035 }
13036
13037 type ProjectsLocationsRolloutSequencesCreateCall struct {
13038 s *Service
13039 parent string
13040 rolloutsequence *RolloutSequence
13041 urlParams_ gensupport.URLParams
13042 ctx_ context.Context
13043 header_ http.Header
13044 }
13045
13046 // Create: Create a new rollout sequence resource.
13047 //
13048 // - parent: The parent resource where this rollout sequence will be created.
13049 // projects/{project}/locations/{location}.
13050 func (r *ProjectsLocationsRolloutSequencesService) Create(parent string, rolloutsequence *RolloutSequence) *ProjectsLocationsRolloutSequencesCreateCall {
13051 c := &ProjectsLocationsRolloutSequencesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13052 c.parent = parent
13053 c.rolloutsequence = rolloutsequence
13054 return c
13055 }
13056
13057 // RolloutSequenceId sets the optional parameter "rolloutSequenceId": Required.
13058 // User provided identifier that is used as part of the resource name; must
13059 // conform to RFC-1034 and additionally restrict to lower-cased letters. This
13060 // comes out roughly to: /^a-z+[a-z0-9]$/
13061 func (c *ProjectsLocationsRolloutSequencesCreateCall) RolloutSequenceId(rolloutSequenceId string) *ProjectsLocationsRolloutSequencesCreateCall {
13062 c.urlParams_.Set("rolloutSequenceId", rolloutSequenceId)
13063 return c
13064 }
13065
13066 // Fields allows partial responses to be retrieved. See
13067 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13068 // details.
13069 func (c *ProjectsLocationsRolloutSequencesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutSequencesCreateCall {
13070 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13071 return c
13072 }
13073
13074 // Context sets the context to be used in this call's Do method.
13075 func (c *ProjectsLocationsRolloutSequencesCreateCall) Context(ctx context.Context) *ProjectsLocationsRolloutSequencesCreateCall {
13076 c.ctx_ = ctx
13077 return c
13078 }
13079
13080 // Header returns a http.Header that can be modified by the caller to add
13081 // headers to the request.
13082 func (c *ProjectsLocationsRolloutSequencesCreateCall) Header() http.Header {
13083 if c.header_ == nil {
13084 c.header_ = make(http.Header)
13085 }
13086 return c.header_
13087 }
13088
13089 func (c *ProjectsLocationsRolloutSequencesCreateCall) doRequest(alt string) (*http.Response, error) {
13090 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13091 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rolloutsequence)
13092 if err != nil {
13093 return nil, err
13094 }
13095 c.urlParams_.Set("alt", alt)
13096 c.urlParams_.Set("prettyPrint", "false")
13097 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/rolloutSequences")
13098 urls += "?" + c.urlParams_.Encode()
13099 req, err := http.NewRequest("POST", urls, body)
13100 if err != nil {
13101 return nil, err
13102 }
13103 req.Header = reqHeaders
13104 googleapi.Expand(req.URL, map[string]string{
13105 "parent": c.parent,
13106 })
13107 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.create", "request", internallog.HTTPRequest(req, body.Bytes()))
13108 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13109 }
13110
13111 // Do executes the "gkehub.projects.locations.rolloutSequences.create" call.
13112 // Any non-2xx status code is an error. Response headers are in either
13113 // *Operation.ServerResponse.Header or (if a response was returned at all) in
13114 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13115 // whether the returned error was because http.StatusNotModified was returned.
13116 func (c *ProjectsLocationsRolloutSequencesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13117 gensupport.SetOptions(c.urlParams_, opts...)
13118 res, err := c.doRequest("json")
13119 if res != nil && res.StatusCode == http.StatusNotModified {
13120 if res.Body != nil {
13121 res.Body.Close()
13122 }
13123 return nil, gensupport.WrapError(&googleapi.Error{
13124 Code: res.StatusCode,
13125 Header: res.Header,
13126 })
13127 }
13128 if err != nil {
13129 return nil, err
13130 }
13131 defer googleapi.CloseBody(res)
13132 if err := googleapi.CheckResponse(res); err != nil {
13133 return nil, gensupport.WrapError(err)
13134 }
13135 ret := &Operation{
13136 ServerResponse: googleapi.ServerResponse{
13137 Header: res.Header,
13138 HTTPStatusCode: res.StatusCode,
13139 },
13140 }
13141 target := &ret
13142 b, err := gensupport.DecodeResponseBytes(target, res)
13143 if err != nil {
13144 return nil, err
13145 }
13146 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.create", "response", internallog.HTTPResponse(res, b))
13147 return ret, nil
13148 }
13149
13150 type ProjectsLocationsRolloutSequencesDeleteCall struct {
13151 s *Service
13152 name string
13153 urlParams_ gensupport.URLParams
13154 ctx_ context.Context
13155 header_ http.Header
13156 }
13157
13158 // Delete: Remove a RolloutSequence.
13159 //
13160 // - name: The name of the rollout sequence to delete.
13161 // projects/{project}/locations/{location}/rolloutSequences/{rollout_sequence}.
13162 func (r *ProjectsLocationsRolloutSequencesService) Delete(name string) *ProjectsLocationsRolloutSequencesDeleteCall {
13163 c := &ProjectsLocationsRolloutSequencesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13164 c.name = name
13165 return c
13166 }
13167
13168 // Fields allows partial responses to be retrieved. See
13169 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13170 // details.
13171 func (c *ProjectsLocationsRolloutSequencesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutSequencesDeleteCall {
13172 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13173 return c
13174 }
13175
13176 // Context sets the context to be used in this call's Do method.
13177 func (c *ProjectsLocationsRolloutSequencesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRolloutSequencesDeleteCall {
13178 c.ctx_ = ctx
13179 return c
13180 }
13181
13182 // Header returns a http.Header that can be modified by the caller to add
13183 // headers to the request.
13184 func (c *ProjectsLocationsRolloutSequencesDeleteCall) Header() http.Header {
13185 if c.header_ == nil {
13186 c.header_ = make(http.Header)
13187 }
13188 return c.header_
13189 }
13190
13191 func (c *ProjectsLocationsRolloutSequencesDeleteCall) doRequest(alt string) (*http.Response, error) {
13192 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13193 c.urlParams_.Set("alt", alt)
13194 c.urlParams_.Set("prettyPrint", "false")
13195 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
13196 urls += "?" + c.urlParams_.Encode()
13197 req, err := http.NewRequest("DELETE", urls, nil)
13198 if err != nil {
13199 return nil, err
13200 }
13201 req.Header = reqHeaders
13202 googleapi.Expand(req.URL, map[string]string{
13203 "name": c.name,
13204 })
13205 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.delete", "request", internallog.HTTPRequest(req, nil))
13206 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13207 }
13208
13209 // Do executes the "gkehub.projects.locations.rolloutSequences.delete" call.
13210 // Any non-2xx status code is an error. Response headers are in either
13211 // *Operation.ServerResponse.Header or (if a response was returned at all) in
13212 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13213 // whether the returned error was because http.StatusNotModified was returned.
13214 func (c *ProjectsLocationsRolloutSequencesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13215 gensupport.SetOptions(c.urlParams_, opts...)
13216 res, err := c.doRequest("json")
13217 if res != nil && res.StatusCode == http.StatusNotModified {
13218 if res.Body != nil {
13219 res.Body.Close()
13220 }
13221 return nil, gensupport.WrapError(&googleapi.Error{
13222 Code: res.StatusCode,
13223 Header: res.Header,
13224 })
13225 }
13226 if err != nil {
13227 return nil, err
13228 }
13229 defer googleapi.CloseBody(res)
13230 if err := googleapi.CheckResponse(res); err != nil {
13231 return nil, gensupport.WrapError(err)
13232 }
13233 ret := &Operation{
13234 ServerResponse: googleapi.ServerResponse{
13235 Header: res.Header,
13236 HTTPStatusCode: res.StatusCode,
13237 },
13238 }
13239 target := &ret
13240 b, err := gensupport.DecodeResponseBytes(target, res)
13241 if err != nil {
13242 return nil, err
13243 }
13244 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.delete", "response", internallog.HTTPResponse(res, b))
13245 return ret, nil
13246 }
13247
13248 type ProjectsLocationsRolloutSequencesGetCall struct {
13249 s *Service
13250 name string
13251 urlParams_ gensupport.URLParams
13252 ifNoneMatch_ string
13253 ctx_ context.Context
13254 header_ http.Header
13255 }
13256
13257 // Get: Retrieve a single rollout sequence.
13258 //
13259 // - name: The name of the rollout sequence to retrieve.
13260 // projects/{project}/locations/{location}/rolloutSequences/{rollout_sequence}.
13261 func (r *ProjectsLocationsRolloutSequencesService) Get(name string) *ProjectsLocationsRolloutSequencesGetCall {
13262 c := &ProjectsLocationsRolloutSequencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13263 c.name = name
13264 return c
13265 }
13266
13267 // Fields allows partial responses to be retrieved. See
13268 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13269 // details.
13270 func (c *ProjectsLocationsRolloutSequencesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutSequencesGetCall {
13271 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13272 return c
13273 }
13274
13275 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13276 // object's ETag matches the given value. This is useful for getting updates
13277 // only after the object has changed since the last request.
13278 func (c *ProjectsLocationsRolloutSequencesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRolloutSequencesGetCall {
13279 c.ifNoneMatch_ = entityTag
13280 return c
13281 }
13282
13283 // Context sets the context to be used in this call's Do method.
13284 func (c *ProjectsLocationsRolloutSequencesGetCall) Context(ctx context.Context) *ProjectsLocationsRolloutSequencesGetCall {
13285 c.ctx_ = ctx
13286 return c
13287 }
13288
13289 // Header returns a http.Header that can be modified by the caller to add
13290 // headers to the request.
13291 func (c *ProjectsLocationsRolloutSequencesGetCall) Header() http.Header {
13292 if c.header_ == nil {
13293 c.header_ = make(http.Header)
13294 }
13295 return c.header_
13296 }
13297
13298 func (c *ProjectsLocationsRolloutSequencesGetCall) doRequest(alt string) (*http.Response, error) {
13299 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13300 if c.ifNoneMatch_ != "" {
13301 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13302 }
13303 c.urlParams_.Set("alt", alt)
13304 c.urlParams_.Set("prettyPrint", "false")
13305 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
13306 urls += "?" + c.urlParams_.Encode()
13307 req, err := http.NewRequest("GET", urls, nil)
13308 if err != nil {
13309 return nil, err
13310 }
13311 req.Header = reqHeaders
13312 googleapi.Expand(req.URL, map[string]string{
13313 "name": c.name,
13314 })
13315 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.get", "request", internallog.HTTPRequest(req, nil))
13316 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13317 }
13318
13319 // Do executes the "gkehub.projects.locations.rolloutSequences.get" call.
13320 // Any non-2xx status code is an error. Response headers are in either
13321 // *RolloutSequence.ServerResponse.Header or (if a response was returned at
13322 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13323 // check whether the returned error was because http.StatusNotModified was
13324 // returned.
13325 func (c *ProjectsLocationsRolloutSequencesGetCall) Do(opts ...googleapi.CallOption) (*RolloutSequence, error) {
13326 gensupport.SetOptions(c.urlParams_, opts...)
13327 res, err := c.doRequest("json")
13328 if res != nil && res.StatusCode == http.StatusNotModified {
13329 if res.Body != nil {
13330 res.Body.Close()
13331 }
13332 return nil, gensupport.WrapError(&googleapi.Error{
13333 Code: res.StatusCode,
13334 Header: res.Header,
13335 })
13336 }
13337 if err != nil {
13338 return nil, err
13339 }
13340 defer googleapi.CloseBody(res)
13341 if err := googleapi.CheckResponse(res); err != nil {
13342 return nil, gensupport.WrapError(err)
13343 }
13344 ret := &RolloutSequence{
13345 ServerResponse: googleapi.ServerResponse{
13346 Header: res.Header,
13347 HTTPStatusCode: res.StatusCode,
13348 },
13349 }
13350 target := &ret
13351 b, err := gensupport.DecodeResponseBytes(target, res)
13352 if err != nil {
13353 return nil, err
13354 }
13355 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.get", "response", internallog.HTTPResponse(res, b))
13356 return ret, nil
13357 }
13358
13359 type ProjectsLocationsRolloutSequencesListCall struct {
13360 s *Service
13361 parent string
13362 urlParams_ gensupport.URLParams
13363 ifNoneMatch_ string
13364 ctx_ context.Context
13365 header_ http.Header
13366 }
13367
13368 // List: Retrieve the list of all rollout sequences.
13369 //
13370 // - parent: The parent, which owns this collection of rollout sequences.
13371 // Format: projects/{project}/locations/{location}.
13372 func (r *ProjectsLocationsRolloutSequencesService) List(parent string) *ProjectsLocationsRolloutSequencesListCall {
13373 c := &ProjectsLocationsRolloutSequencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13374 c.parent = parent
13375 return c
13376 }
13377
13378 // Filter sets the optional parameter "filter": Lists Rollout Sequences that
13379 // match the filter expression, following the syntax outlined in
13380 // https://google.aip.dev/160.
13381 func (c *ProjectsLocationsRolloutSequencesListCall) Filter(filter string) *ProjectsLocationsRolloutSequencesListCall {
13382 c.urlParams_.Set("filter", filter)
13383 return c
13384 }
13385
13386 // PageSize sets the optional parameter "pageSize": The maximum number of
13387 // rollout sequences to return. The service may return fewer than this value.
13388 // If unspecified, at most 50 rollout sequences will be returned. The maximum
13389 // value is 1000; values above 1000 will be coerced to 1000.
13390 func (c *ProjectsLocationsRolloutSequencesListCall) PageSize(pageSize int64) *ProjectsLocationsRolloutSequencesListCall {
13391 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13392 return c
13393 }
13394
13395 // PageToken sets the optional parameter "pageToken": A page token, received
13396 // from a previous `ListRolloutSequences` call. Provide this to retrieve the
13397 // subsequent page. When paginating, all other parameters provided to
13398 // `ListRolloutSequences` must match the call that provided the page token.
13399 func (c *ProjectsLocationsRolloutSequencesListCall) PageToken(pageToken string) *ProjectsLocationsRolloutSequencesListCall {
13400 c.urlParams_.Set("pageToken", pageToken)
13401 return c
13402 }
13403
13404 // Fields allows partial responses to be retrieved. See
13405 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13406 // details.
13407 func (c *ProjectsLocationsRolloutSequencesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutSequencesListCall {
13408 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13409 return c
13410 }
13411
13412 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13413 // object's ETag matches the given value. This is useful for getting updates
13414 // only after the object has changed since the last request.
13415 func (c *ProjectsLocationsRolloutSequencesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRolloutSequencesListCall {
13416 c.ifNoneMatch_ = entityTag
13417 return c
13418 }
13419
13420 // Context sets the context to be used in this call's Do method.
13421 func (c *ProjectsLocationsRolloutSequencesListCall) Context(ctx context.Context) *ProjectsLocationsRolloutSequencesListCall {
13422 c.ctx_ = ctx
13423 return c
13424 }
13425
13426 // Header returns a http.Header that can be modified by the caller to add
13427 // headers to the request.
13428 func (c *ProjectsLocationsRolloutSequencesListCall) Header() http.Header {
13429 if c.header_ == nil {
13430 c.header_ = make(http.Header)
13431 }
13432 return c.header_
13433 }
13434
13435 func (c *ProjectsLocationsRolloutSequencesListCall) doRequest(alt string) (*http.Response, error) {
13436 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13437 if c.ifNoneMatch_ != "" {
13438 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13439 }
13440 c.urlParams_.Set("alt", alt)
13441 c.urlParams_.Set("prettyPrint", "false")
13442 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/rolloutSequences")
13443 urls += "?" + c.urlParams_.Encode()
13444 req, err := http.NewRequest("GET", urls, nil)
13445 if err != nil {
13446 return nil, err
13447 }
13448 req.Header = reqHeaders
13449 googleapi.Expand(req.URL, map[string]string{
13450 "parent": c.parent,
13451 })
13452 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.list", "request", internallog.HTTPRequest(req, nil))
13453 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13454 }
13455
13456 // Do executes the "gkehub.projects.locations.rolloutSequences.list" call.
13457 // Any non-2xx status code is an error. Response headers are in either
13458 // *ListRolloutSequencesResponse.ServerResponse.Header or (if a response was
13459 // returned at all) in error.(*googleapi.Error).Header. Use
13460 // googleapi.IsNotModified to check whether the returned error was because
13461 // http.StatusNotModified was returned.
13462 func (c *ProjectsLocationsRolloutSequencesListCall) Do(opts ...googleapi.CallOption) (*ListRolloutSequencesResponse, error) {
13463 gensupport.SetOptions(c.urlParams_, opts...)
13464 res, err := c.doRequest("json")
13465 if res != nil && res.StatusCode == http.StatusNotModified {
13466 if res.Body != nil {
13467 res.Body.Close()
13468 }
13469 return nil, gensupport.WrapError(&googleapi.Error{
13470 Code: res.StatusCode,
13471 Header: res.Header,
13472 })
13473 }
13474 if err != nil {
13475 return nil, err
13476 }
13477 defer googleapi.CloseBody(res)
13478 if err := googleapi.CheckResponse(res); err != nil {
13479 return nil, gensupport.WrapError(err)
13480 }
13481 ret := &ListRolloutSequencesResponse{
13482 ServerResponse: googleapi.ServerResponse{
13483 Header: res.Header,
13484 HTTPStatusCode: res.StatusCode,
13485 },
13486 }
13487 target := &ret
13488 b, err := gensupport.DecodeResponseBytes(target, res)
13489 if err != nil {
13490 return nil, err
13491 }
13492 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.list", "response", internallog.HTTPResponse(res, b))
13493 return ret, nil
13494 }
13495
13496 // Pages invokes f for each page of results.
13497 // A non-nil error returned from f will halt the iteration.
13498 // The provided context supersedes any context provided to the Context method.
13499 func (c *ProjectsLocationsRolloutSequencesListCall) Pages(ctx context.Context, f func(*ListRolloutSequencesResponse) error) error {
13500 c.ctx_ = ctx
13501 defer c.PageToken(c.urlParams_.Get("pageToken"))
13502 for {
13503 x, err := c.Do()
13504 if err != nil {
13505 return err
13506 }
13507 if err := f(x); err != nil {
13508 return err
13509 }
13510 if x.NextPageToken == "" {
13511 return nil
13512 }
13513 c.PageToken(x.NextPageToken)
13514 }
13515 }
13516
13517 type ProjectsLocationsRolloutSequencesPatchCall struct {
13518 s *Service
13519 name string
13520 rolloutsequence *RolloutSequence
13521 urlParams_ gensupport.URLParams
13522 ctx_ context.Context
13523 header_ http.Header
13524 }
13525
13526 // Patch: Update a rollout sequence.
13527 //
13528 // - name: Identifier. Name of the rollout sequence in the format of:
13529 // projects/{PROJECT_ID}/locations/global/rolloutSequences/{NAME}.
13530 func (r *ProjectsLocationsRolloutSequencesService) Patch(name string, rolloutsequence *RolloutSequence) *ProjectsLocationsRolloutSequencesPatchCall {
13531 c := &ProjectsLocationsRolloutSequencesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13532 c.name = name
13533 c.rolloutsequence = rolloutsequence
13534 return c
13535 }
13536
13537 // UpdateMask sets the optional parameter "updateMask": The list of fields to
13538 // update.
13539 func (c *ProjectsLocationsRolloutSequencesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRolloutSequencesPatchCall {
13540 c.urlParams_.Set("updateMask", updateMask)
13541 return c
13542 }
13543
13544 // Fields allows partial responses to be retrieved. See
13545 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13546 // details.
13547 func (c *ProjectsLocationsRolloutSequencesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutSequencesPatchCall {
13548 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13549 return c
13550 }
13551
13552 // Context sets the context to be used in this call's Do method.
13553 func (c *ProjectsLocationsRolloutSequencesPatchCall) Context(ctx context.Context) *ProjectsLocationsRolloutSequencesPatchCall {
13554 c.ctx_ = ctx
13555 return c
13556 }
13557
13558 // Header returns a http.Header that can be modified by the caller to add
13559 // headers to the request.
13560 func (c *ProjectsLocationsRolloutSequencesPatchCall) Header() http.Header {
13561 if c.header_ == nil {
13562 c.header_ = make(http.Header)
13563 }
13564 return c.header_
13565 }
13566
13567 func (c *ProjectsLocationsRolloutSequencesPatchCall) doRequest(alt string) (*http.Response, error) {
13568 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13569 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rolloutsequence)
13570 if err != nil {
13571 return nil, err
13572 }
13573 c.urlParams_.Set("alt", alt)
13574 c.urlParams_.Set("prettyPrint", "false")
13575 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
13576 urls += "?" + c.urlParams_.Encode()
13577 req, err := http.NewRequest("PATCH", urls, body)
13578 if err != nil {
13579 return nil, err
13580 }
13581 req.Header = reqHeaders
13582 googleapi.Expand(req.URL, map[string]string{
13583 "name": c.name,
13584 })
13585 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
13586 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13587 }
13588
13589 // Do executes the "gkehub.projects.locations.rolloutSequences.patch" call.
13590 // Any non-2xx status code is an error. Response headers are in either
13591 // *Operation.ServerResponse.Header or (if a response was returned at all) in
13592 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13593 // whether the returned error was because http.StatusNotModified was returned.
13594 func (c *ProjectsLocationsRolloutSequencesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13595 gensupport.SetOptions(c.urlParams_, opts...)
13596 res, err := c.doRequest("json")
13597 if res != nil && res.StatusCode == http.StatusNotModified {
13598 if res.Body != nil {
13599 res.Body.Close()
13600 }
13601 return nil, gensupport.WrapError(&googleapi.Error{
13602 Code: res.StatusCode,
13603 Header: res.Header,
13604 })
13605 }
13606 if err != nil {
13607 return nil, err
13608 }
13609 defer googleapi.CloseBody(res)
13610 if err := googleapi.CheckResponse(res); err != nil {
13611 return nil, gensupport.WrapError(err)
13612 }
13613 ret := &Operation{
13614 ServerResponse: googleapi.ServerResponse{
13615 Header: res.Header,
13616 HTTPStatusCode: res.StatusCode,
13617 },
13618 }
13619 target := &ret
13620 b, err := gensupport.DecodeResponseBytes(target, res)
13621 if err != nil {
13622 return nil, err
13623 }
13624 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rolloutSequences.patch", "response", internallog.HTTPResponse(res, b))
13625 return ret, nil
13626 }
13627
13628 type ProjectsLocationsRolloutsGetCall struct {
13629 s *Service
13630 name string
13631 urlParams_ gensupport.URLParams
13632 ifNoneMatch_ string
13633 ctx_ context.Context
13634 header_ http.Header
13635 }
13636
13637 // Get: Retrieve a single rollout.
13638 //
13639 // - name: The name of the rollout to retrieve.
13640 // projects/{project}/locations/{location}/rollouts/{rollout}.
13641 func (r *ProjectsLocationsRolloutsService) Get(name string) *ProjectsLocationsRolloutsGetCall {
13642 c := &ProjectsLocationsRolloutsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13643 c.name = name
13644 return c
13645 }
13646
13647 // Fields allows partial responses to be retrieved. See
13648 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13649 // details.
13650 func (c *ProjectsLocationsRolloutsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutsGetCall {
13651 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13652 return c
13653 }
13654
13655 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13656 // object's ETag matches the given value. This is useful for getting updates
13657 // only after the object has changed since the last request.
13658 func (c *ProjectsLocationsRolloutsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRolloutsGetCall {
13659 c.ifNoneMatch_ = entityTag
13660 return c
13661 }
13662
13663 // Context sets the context to be used in this call's Do method.
13664 func (c *ProjectsLocationsRolloutsGetCall) Context(ctx context.Context) *ProjectsLocationsRolloutsGetCall {
13665 c.ctx_ = ctx
13666 return c
13667 }
13668
13669 // Header returns a http.Header that can be modified by the caller to add
13670 // headers to the request.
13671 func (c *ProjectsLocationsRolloutsGetCall) Header() http.Header {
13672 if c.header_ == nil {
13673 c.header_ = make(http.Header)
13674 }
13675 return c.header_
13676 }
13677
13678 func (c *ProjectsLocationsRolloutsGetCall) doRequest(alt string) (*http.Response, error) {
13679 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13680 if c.ifNoneMatch_ != "" {
13681 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13682 }
13683 c.urlParams_.Set("alt", alt)
13684 c.urlParams_.Set("prettyPrint", "false")
13685 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
13686 urls += "?" + c.urlParams_.Encode()
13687 req, err := http.NewRequest("GET", urls, nil)
13688 if err != nil {
13689 return nil, err
13690 }
13691 req.Header = reqHeaders
13692 googleapi.Expand(req.URL, map[string]string{
13693 "name": c.name,
13694 })
13695 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rollouts.get", "request", internallog.HTTPRequest(req, nil))
13696 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13697 }
13698
13699 // Do executes the "gkehub.projects.locations.rollouts.get" call.
13700 // Any non-2xx status code is an error. Response headers are in either
13701 // *Rollout.ServerResponse.Header or (if a response was returned at all) in
13702 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13703 // whether the returned error was because http.StatusNotModified was returned.
13704 func (c *ProjectsLocationsRolloutsGetCall) Do(opts ...googleapi.CallOption) (*Rollout, error) {
13705 gensupport.SetOptions(c.urlParams_, opts...)
13706 res, err := c.doRequest("json")
13707 if res != nil && res.StatusCode == http.StatusNotModified {
13708 if res.Body != nil {
13709 res.Body.Close()
13710 }
13711 return nil, gensupport.WrapError(&googleapi.Error{
13712 Code: res.StatusCode,
13713 Header: res.Header,
13714 })
13715 }
13716 if err != nil {
13717 return nil, err
13718 }
13719 defer googleapi.CloseBody(res)
13720 if err := googleapi.CheckResponse(res); err != nil {
13721 return nil, gensupport.WrapError(err)
13722 }
13723 ret := &Rollout{
13724 ServerResponse: googleapi.ServerResponse{
13725 Header: res.Header,
13726 HTTPStatusCode: res.StatusCode,
13727 },
13728 }
13729 target := &ret
13730 b, err := gensupport.DecodeResponseBytes(target, res)
13731 if err != nil {
13732 return nil, err
13733 }
13734 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rollouts.get", "response", internallog.HTTPResponse(res, b))
13735 return ret, nil
13736 }
13737
13738 type ProjectsLocationsRolloutsListCall struct {
13739 s *Service
13740 parent string
13741 urlParams_ gensupport.URLParams
13742 ifNoneMatch_ string
13743 ctx_ context.Context
13744 header_ http.Header
13745 }
13746
13747 // List: Retrieve the list of all rollouts.
13748 //
13749 // - parent: The parent, which owns this collection of rollout. Format:
13750 // projects/{project}/locations/{location}.
13751 func (r *ProjectsLocationsRolloutsService) List(parent string) *ProjectsLocationsRolloutsListCall {
13752 c := &ProjectsLocationsRolloutsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13753 c.parent = parent
13754 return c
13755 }
13756
13757 // Filter sets the optional parameter "filter": Lists Rollouts that match the
13758 // filter expression, following the syntax outlined in
13759 // https://google.aip.dev/160.
13760 func (c *ProjectsLocationsRolloutsListCall) Filter(filter string) *ProjectsLocationsRolloutsListCall {
13761 c.urlParams_.Set("filter", filter)
13762 return c
13763 }
13764
13765 // PageSize sets the optional parameter "pageSize": The maximum number of
13766 // rollout to return. The service may return fewer than this value. If
13767 // unspecified, at most 50 rollouts will be returned. The maximum value is
13768 // 1000; values above 1000 will be coerced to 1000.
13769 func (c *ProjectsLocationsRolloutsListCall) PageSize(pageSize int64) *ProjectsLocationsRolloutsListCall {
13770 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13771 return c
13772 }
13773
13774 // PageToken sets the optional parameter "pageToken": A page token, received
13775 // from a previous `ListRollouts` call. Provide this to retrieve the subsequent
13776 // page. When paginating, all other parameters provided to `ListRollouts` must
13777 // match the call that provided the page token.
13778 func (c *ProjectsLocationsRolloutsListCall) PageToken(pageToken string) *ProjectsLocationsRolloutsListCall {
13779 c.urlParams_.Set("pageToken", pageToken)
13780 return c
13781 }
13782
13783 // Fields allows partial responses to be retrieved. See
13784 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13785 // details.
13786 func (c *ProjectsLocationsRolloutsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRolloutsListCall {
13787 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13788 return c
13789 }
13790
13791 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13792 // object's ETag matches the given value. This is useful for getting updates
13793 // only after the object has changed since the last request.
13794 func (c *ProjectsLocationsRolloutsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRolloutsListCall {
13795 c.ifNoneMatch_ = entityTag
13796 return c
13797 }
13798
13799 // Context sets the context to be used in this call's Do method.
13800 func (c *ProjectsLocationsRolloutsListCall) Context(ctx context.Context) *ProjectsLocationsRolloutsListCall {
13801 c.ctx_ = ctx
13802 return c
13803 }
13804
13805 // Header returns a http.Header that can be modified by the caller to add
13806 // headers to the request.
13807 func (c *ProjectsLocationsRolloutsListCall) Header() http.Header {
13808 if c.header_ == nil {
13809 c.header_ = make(http.Header)
13810 }
13811 return c.header_
13812 }
13813
13814 func (c *ProjectsLocationsRolloutsListCall) doRequest(alt string) (*http.Response, error) {
13815 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13816 if c.ifNoneMatch_ != "" {
13817 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13818 }
13819 c.urlParams_.Set("alt", alt)
13820 c.urlParams_.Set("prettyPrint", "false")
13821 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/rollouts")
13822 urls += "?" + c.urlParams_.Encode()
13823 req, err := http.NewRequest("GET", urls, nil)
13824 if err != nil {
13825 return nil, err
13826 }
13827 req.Header = reqHeaders
13828 googleapi.Expand(req.URL, map[string]string{
13829 "parent": c.parent,
13830 })
13831 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rollouts.list", "request", internallog.HTTPRequest(req, nil))
13832 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13833 }
13834
13835 // Do executes the "gkehub.projects.locations.rollouts.list" call.
13836 // Any non-2xx status code is an error. Response headers are in either
13837 // *ListRolloutsResponse.ServerResponse.Header or (if a response was returned
13838 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13839 // check whether the returned error was because http.StatusNotModified was
13840 // returned.
13841 func (c *ProjectsLocationsRolloutsListCall) Do(opts ...googleapi.CallOption) (*ListRolloutsResponse, error) {
13842 gensupport.SetOptions(c.urlParams_, opts...)
13843 res, err := c.doRequest("json")
13844 if res != nil && res.StatusCode == http.StatusNotModified {
13845 if res.Body != nil {
13846 res.Body.Close()
13847 }
13848 return nil, gensupport.WrapError(&googleapi.Error{
13849 Code: res.StatusCode,
13850 Header: res.Header,
13851 })
13852 }
13853 if err != nil {
13854 return nil, err
13855 }
13856 defer googleapi.CloseBody(res)
13857 if err := googleapi.CheckResponse(res); err != nil {
13858 return nil, gensupport.WrapError(err)
13859 }
13860 ret := &ListRolloutsResponse{
13861 ServerResponse: googleapi.ServerResponse{
13862 Header: res.Header,
13863 HTTPStatusCode: res.StatusCode,
13864 },
13865 }
13866 target := &ret
13867 b, err := gensupport.DecodeResponseBytes(target, res)
13868 if err != nil {
13869 return nil, err
13870 }
13871 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.rollouts.list", "response", internallog.HTTPResponse(res, b))
13872 return ret, nil
13873 }
13874
13875 // Pages invokes f for each page of results.
13876 // A non-nil error returned from f will halt the iteration.
13877 // The provided context supersedes any context provided to the Context method.
13878 func (c *ProjectsLocationsRolloutsListCall) Pages(ctx context.Context, f func(*ListRolloutsResponse) error) error {
13879 c.ctx_ = ctx
13880 defer c.PageToken(c.urlParams_.Get("pageToken"))
13881 for {
13882 x, err := c.Do()
13883 if err != nil {
13884 return err
13885 }
13886 if err := f(x); err != nil {
13887 return err
13888 }
13889 if x.NextPageToken == "" {
13890 return nil
13891 }
13892 c.PageToken(x.NextPageToken)
13893 }
13894 }
13895
13896 type ProjectsLocationsScopesCreateCall struct {
13897 s *Service
13898 parent string
13899 scope *Scope
13900 urlParams_ gensupport.URLParams
13901 ctx_ context.Context
13902 header_ http.Header
13903 }
13904
13905 // Create: Creates a Scope.
13906 //
13907 // - parent: The parent (project and location) where the Scope will be created.
13908 // Specified in the format `projects/*/locations/*`.
13909 func (r *ProjectsLocationsScopesService) Create(parent string, scope *Scope) *ProjectsLocationsScopesCreateCall {
13910 c := &ProjectsLocationsScopesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13911 c.parent = parent
13912 c.scope = scope
13913 return c
13914 }
13915
13916 // ScopeId sets the optional parameter "scopeId": Required. Client chosen ID
13917 // for the Scope. `scope_id` must be a ????
13918 func (c *ProjectsLocationsScopesCreateCall) ScopeId(scopeId string) *ProjectsLocationsScopesCreateCall {
13919 c.urlParams_.Set("scopeId", scopeId)
13920 return c
13921 }
13922
13923 // Fields allows partial responses to be retrieved. See
13924 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13925 // details.
13926 func (c *ProjectsLocationsScopesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesCreateCall {
13927 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13928 return c
13929 }
13930
13931 // Context sets the context to be used in this call's Do method.
13932 func (c *ProjectsLocationsScopesCreateCall) Context(ctx context.Context) *ProjectsLocationsScopesCreateCall {
13933 c.ctx_ = ctx
13934 return c
13935 }
13936
13937 // Header returns a http.Header that can be modified by the caller to add
13938 // headers to the request.
13939 func (c *ProjectsLocationsScopesCreateCall) Header() http.Header {
13940 if c.header_ == nil {
13941 c.header_ = make(http.Header)
13942 }
13943 return c.header_
13944 }
13945
13946 func (c *ProjectsLocationsScopesCreateCall) doRequest(alt string) (*http.Response, error) {
13947 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13948 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.scope)
13949 if err != nil {
13950 return nil, err
13951 }
13952 c.urlParams_.Set("alt", alt)
13953 c.urlParams_.Set("prettyPrint", "false")
13954 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/scopes")
13955 urls += "?" + c.urlParams_.Encode()
13956 req, err := http.NewRequest("POST", urls, body)
13957 if err != nil {
13958 return nil, err
13959 }
13960 req.Header = reqHeaders
13961 googleapi.Expand(req.URL, map[string]string{
13962 "parent": c.parent,
13963 })
13964 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.create", "request", internallog.HTTPRequest(req, body.Bytes()))
13965 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13966 }
13967
13968 // Do executes the "gkehub.projects.locations.scopes.create" call.
13969 // Any non-2xx status code is an error. Response headers are in either
13970 // *Operation.ServerResponse.Header or (if a response was returned at all) in
13971 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13972 // whether the returned error was because http.StatusNotModified was returned.
13973 func (c *ProjectsLocationsScopesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13974 gensupport.SetOptions(c.urlParams_, opts...)
13975 res, err := c.doRequest("json")
13976 if res != nil && res.StatusCode == http.StatusNotModified {
13977 if res.Body != nil {
13978 res.Body.Close()
13979 }
13980 return nil, gensupport.WrapError(&googleapi.Error{
13981 Code: res.StatusCode,
13982 Header: res.Header,
13983 })
13984 }
13985 if err != nil {
13986 return nil, err
13987 }
13988 defer googleapi.CloseBody(res)
13989 if err := googleapi.CheckResponse(res); err != nil {
13990 return nil, gensupport.WrapError(err)
13991 }
13992 ret := &Operation{
13993 ServerResponse: googleapi.ServerResponse{
13994 Header: res.Header,
13995 HTTPStatusCode: res.StatusCode,
13996 },
13997 }
13998 target := &ret
13999 b, err := gensupport.DecodeResponseBytes(target, res)
14000 if err != nil {
14001 return nil, err
14002 }
14003 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.create", "response", internallog.HTTPResponse(res, b))
14004 return ret, nil
14005 }
14006
14007 type ProjectsLocationsScopesDeleteCall struct {
14008 s *Service
14009 name string
14010 urlParams_ gensupport.URLParams
14011 ctx_ context.Context
14012 header_ http.Header
14013 }
14014
14015 // Delete: Deletes a Scope.
14016 //
14017 // - name: The Scope resource name in the format
14018 // `projects/*/locations/*/scopes/*`.
14019 func (r *ProjectsLocationsScopesService) Delete(name string) *ProjectsLocationsScopesDeleteCall {
14020 c := &ProjectsLocationsScopesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14021 c.name = name
14022 return c
14023 }
14024
14025 // Fields allows partial responses to be retrieved. See
14026 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14027 // details.
14028 func (c *ProjectsLocationsScopesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesDeleteCall {
14029 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14030 return c
14031 }
14032
14033 // Context sets the context to be used in this call's Do method.
14034 func (c *ProjectsLocationsScopesDeleteCall) Context(ctx context.Context) *ProjectsLocationsScopesDeleteCall {
14035 c.ctx_ = ctx
14036 return c
14037 }
14038
14039 // Header returns a http.Header that can be modified by the caller to add
14040 // headers to the request.
14041 func (c *ProjectsLocationsScopesDeleteCall) Header() http.Header {
14042 if c.header_ == nil {
14043 c.header_ = make(http.Header)
14044 }
14045 return c.header_
14046 }
14047
14048 func (c *ProjectsLocationsScopesDeleteCall) doRequest(alt string) (*http.Response, error) {
14049 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14050 c.urlParams_.Set("alt", alt)
14051 c.urlParams_.Set("prettyPrint", "false")
14052 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
14053 urls += "?" + c.urlParams_.Encode()
14054 req, err := http.NewRequest("DELETE", urls, nil)
14055 if err != nil {
14056 return nil, err
14057 }
14058 req.Header = reqHeaders
14059 googleapi.Expand(req.URL, map[string]string{
14060 "name": c.name,
14061 })
14062 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.delete", "request", internallog.HTTPRequest(req, nil))
14063 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14064 }
14065
14066 // Do executes the "gkehub.projects.locations.scopes.delete" call.
14067 // Any non-2xx status code is an error. Response headers are in either
14068 // *Operation.ServerResponse.Header or (if a response was returned at all) in
14069 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14070 // whether the returned error was because http.StatusNotModified was returned.
14071 func (c *ProjectsLocationsScopesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14072 gensupport.SetOptions(c.urlParams_, opts...)
14073 res, err := c.doRequest("json")
14074 if res != nil && res.StatusCode == http.StatusNotModified {
14075 if res.Body != nil {
14076 res.Body.Close()
14077 }
14078 return nil, gensupport.WrapError(&googleapi.Error{
14079 Code: res.StatusCode,
14080 Header: res.Header,
14081 })
14082 }
14083 if err != nil {
14084 return nil, err
14085 }
14086 defer googleapi.CloseBody(res)
14087 if err := googleapi.CheckResponse(res); err != nil {
14088 return nil, gensupport.WrapError(err)
14089 }
14090 ret := &Operation{
14091 ServerResponse: googleapi.ServerResponse{
14092 Header: res.Header,
14093 HTTPStatusCode: res.StatusCode,
14094 },
14095 }
14096 target := &ret
14097 b, err := gensupport.DecodeResponseBytes(target, res)
14098 if err != nil {
14099 return nil, err
14100 }
14101 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.delete", "response", internallog.HTTPResponse(res, b))
14102 return ret, nil
14103 }
14104
14105 type ProjectsLocationsScopesGetCall struct {
14106 s *Service
14107 name string
14108 urlParams_ gensupport.URLParams
14109 ifNoneMatch_ string
14110 ctx_ context.Context
14111 header_ http.Header
14112 }
14113
14114 // Get: Returns the details of a Scope.
14115 //
14116 // - name: The Scope resource name in the format
14117 // `projects/*/locations/*/scopes/*`.
14118 func (r *ProjectsLocationsScopesService) Get(name string) *ProjectsLocationsScopesGetCall {
14119 c := &ProjectsLocationsScopesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14120 c.name = name
14121 return c
14122 }
14123
14124 // Fields allows partial responses to be retrieved. See
14125 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14126 // details.
14127 func (c *ProjectsLocationsScopesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesGetCall {
14128 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14129 return c
14130 }
14131
14132 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14133 // object's ETag matches the given value. This is useful for getting updates
14134 // only after the object has changed since the last request.
14135 func (c *ProjectsLocationsScopesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesGetCall {
14136 c.ifNoneMatch_ = entityTag
14137 return c
14138 }
14139
14140 // Context sets the context to be used in this call's Do method.
14141 func (c *ProjectsLocationsScopesGetCall) Context(ctx context.Context) *ProjectsLocationsScopesGetCall {
14142 c.ctx_ = ctx
14143 return c
14144 }
14145
14146 // Header returns a http.Header that can be modified by the caller to add
14147 // headers to the request.
14148 func (c *ProjectsLocationsScopesGetCall) Header() http.Header {
14149 if c.header_ == nil {
14150 c.header_ = make(http.Header)
14151 }
14152 return c.header_
14153 }
14154
14155 func (c *ProjectsLocationsScopesGetCall) doRequest(alt string) (*http.Response, error) {
14156 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14157 if c.ifNoneMatch_ != "" {
14158 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14159 }
14160 c.urlParams_.Set("alt", alt)
14161 c.urlParams_.Set("prettyPrint", "false")
14162 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
14163 urls += "?" + c.urlParams_.Encode()
14164 req, err := http.NewRequest("GET", urls, nil)
14165 if err != nil {
14166 return nil, err
14167 }
14168 req.Header = reqHeaders
14169 googleapi.Expand(req.URL, map[string]string{
14170 "name": c.name,
14171 })
14172 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.get", "request", internallog.HTTPRequest(req, nil))
14173 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14174 }
14175
14176 // Do executes the "gkehub.projects.locations.scopes.get" call.
14177 // Any non-2xx status code is an error. Response headers are in either
14178 // *Scope.ServerResponse.Header or (if a response was returned at all) in
14179 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14180 // whether the returned error was because http.StatusNotModified was returned.
14181 func (c *ProjectsLocationsScopesGetCall) Do(opts ...googleapi.CallOption) (*Scope, error) {
14182 gensupport.SetOptions(c.urlParams_, opts...)
14183 res, err := c.doRequest("json")
14184 if res != nil && res.StatusCode == http.StatusNotModified {
14185 if res.Body != nil {
14186 res.Body.Close()
14187 }
14188 return nil, gensupport.WrapError(&googleapi.Error{
14189 Code: res.StatusCode,
14190 Header: res.Header,
14191 })
14192 }
14193 if err != nil {
14194 return nil, err
14195 }
14196 defer googleapi.CloseBody(res)
14197 if err := googleapi.CheckResponse(res); err != nil {
14198 return nil, gensupport.WrapError(err)
14199 }
14200 ret := &Scope{
14201 ServerResponse: googleapi.ServerResponse{
14202 Header: res.Header,
14203 HTTPStatusCode: res.StatusCode,
14204 },
14205 }
14206 target := &ret
14207 b, err := gensupport.DecodeResponseBytes(target, res)
14208 if err != nil {
14209 return nil, err
14210 }
14211 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.get", "response", internallog.HTTPResponse(res, b))
14212 return ret, nil
14213 }
14214
14215 type ProjectsLocationsScopesGetIamPolicyCall struct {
14216 s *Service
14217 resource string
14218 urlParams_ gensupport.URLParams
14219 ifNoneMatch_ string
14220 ctx_ context.Context
14221 header_ http.Header
14222 }
14223
14224 // GetIamPolicy: Gets the access control policy for a resource. Returns an
14225 // empty policy if the resource exists and does not have a policy set.
14226 //
14227 // - resource: REQUIRED: The resource for which the policy is being requested.
14228 // See Resource names (https://cloud.google.com/apis/design/resource_names)
14229 // for the appropriate value for this field.
14230 func (r *ProjectsLocationsScopesService) GetIamPolicy(resource string) *ProjectsLocationsScopesGetIamPolicyCall {
14231 c := &ProjectsLocationsScopesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14232 c.resource = resource
14233 return c
14234 }
14235
14236 // OptionsRequestedPolicyVersion sets the optional parameter
14237 // "options.requestedPolicyVersion": The maximum policy version that will be
14238 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
14239 // an invalid value will be rejected. Requests for policies with any
14240 // conditional role bindings must specify version 3. Policies with no
14241 // conditional role bindings may specify any valid value or leave the field
14242 // unset. The policy in the response might use the policy version that you
14243 // specified, or it might use a lower policy version. For example, if you
14244 // specify version 3, but the policy has no conditional role bindings, the
14245 // response uses version 1. To learn which resources support conditions in
14246 // their IAM policies, see the IAM documentation
14247 // (https://cloud.google.com/iam/help/conditions/resource-policies).
14248 func (c *ProjectsLocationsScopesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsScopesGetIamPolicyCall {
14249 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
14250 return c
14251 }
14252
14253 // Fields allows partial responses to be retrieved. See
14254 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14255 // details.
14256 func (c *ProjectsLocationsScopesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesGetIamPolicyCall {
14257 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14258 return c
14259 }
14260
14261 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14262 // object's ETag matches the given value. This is useful for getting updates
14263 // only after the object has changed since the last request.
14264 func (c *ProjectsLocationsScopesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesGetIamPolicyCall {
14265 c.ifNoneMatch_ = entityTag
14266 return c
14267 }
14268
14269 // Context sets the context to be used in this call's Do method.
14270 func (c *ProjectsLocationsScopesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsScopesGetIamPolicyCall {
14271 c.ctx_ = ctx
14272 return c
14273 }
14274
14275 // Header returns a http.Header that can be modified by the caller to add
14276 // headers to the request.
14277 func (c *ProjectsLocationsScopesGetIamPolicyCall) Header() http.Header {
14278 if c.header_ == nil {
14279 c.header_ = make(http.Header)
14280 }
14281 return c.header_
14282 }
14283
14284 func (c *ProjectsLocationsScopesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
14285 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14286 if c.ifNoneMatch_ != "" {
14287 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14288 }
14289 c.urlParams_.Set("alt", alt)
14290 c.urlParams_.Set("prettyPrint", "false")
14291 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy")
14292 urls += "?" + c.urlParams_.Encode()
14293 req, err := http.NewRequest("GET", urls, nil)
14294 if err != nil {
14295 return nil, err
14296 }
14297 req.Header = reqHeaders
14298 googleapi.Expand(req.URL, map[string]string{
14299 "resource": c.resource,
14300 })
14301 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
14302 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14303 }
14304
14305 // Do executes the "gkehub.projects.locations.scopes.getIamPolicy" call.
14306 // Any non-2xx status code is an error. Response headers are in either
14307 // *Policy.ServerResponse.Header or (if a response was returned at all) in
14308 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14309 // whether the returned error was because http.StatusNotModified was returned.
14310 func (c *ProjectsLocationsScopesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
14311 gensupport.SetOptions(c.urlParams_, opts...)
14312 res, err := c.doRequest("json")
14313 if res != nil && res.StatusCode == http.StatusNotModified {
14314 if res.Body != nil {
14315 res.Body.Close()
14316 }
14317 return nil, gensupport.WrapError(&googleapi.Error{
14318 Code: res.StatusCode,
14319 Header: res.Header,
14320 })
14321 }
14322 if err != nil {
14323 return nil, err
14324 }
14325 defer googleapi.CloseBody(res)
14326 if err := googleapi.CheckResponse(res); err != nil {
14327 return nil, gensupport.WrapError(err)
14328 }
14329 ret := &Policy{
14330 ServerResponse: googleapi.ServerResponse{
14331 Header: res.Header,
14332 HTTPStatusCode: res.StatusCode,
14333 },
14334 }
14335 target := &ret
14336 b, err := gensupport.DecodeResponseBytes(target, res)
14337 if err != nil {
14338 return nil, err
14339 }
14340 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.getIamPolicy", "response", internallog.HTTPResponse(res, b))
14341 return ret, nil
14342 }
14343
14344 type ProjectsLocationsScopesListCall struct {
14345 s *Service
14346 parent string
14347 urlParams_ gensupport.URLParams
14348 ifNoneMatch_ string
14349 ctx_ context.Context
14350 header_ http.Header
14351 }
14352
14353 // List: Lists Scopes.
14354 //
14355 // - parent: The parent (project and location) where the Scope will be listed.
14356 // Specified in the format `projects/*/locations/*`.
14357 func (r *ProjectsLocationsScopesService) List(parent string) *ProjectsLocationsScopesListCall {
14358 c := &ProjectsLocationsScopesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14359 c.parent = parent
14360 return c
14361 }
14362
14363 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
14364 // resources, `page_size` specifies number of resources to return. If
14365 // unspecified or set to 0, all resources will be returned.
14366 func (c *ProjectsLocationsScopesListCall) PageSize(pageSize int64) *ProjectsLocationsScopesListCall {
14367 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14368 return c
14369 }
14370
14371 // PageToken sets the optional parameter "pageToken": Token returned by
14372 // previous call to `ListScopes` which specifies the position in the list from
14373 // where to continue listing the resources.
14374 func (c *ProjectsLocationsScopesListCall) PageToken(pageToken string) *ProjectsLocationsScopesListCall {
14375 c.urlParams_.Set("pageToken", pageToken)
14376 return c
14377 }
14378
14379 // Fields allows partial responses to be retrieved. See
14380 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14381 // details.
14382 func (c *ProjectsLocationsScopesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesListCall {
14383 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14384 return c
14385 }
14386
14387 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14388 // object's ETag matches the given value. This is useful for getting updates
14389 // only after the object has changed since the last request.
14390 func (c *ProjectsLocationsScopesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesListCall {
14391 c.ifNoneMatch_ = entityTag
14392 return c
14393 }
14394
14395 // Context sets the context to be used in this call's Do method.
14396 func (c *ProjectsLocationsScopesListCall) Context(ctx context.Context) *ProjectsLocationsScopesListCall {
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 *ProjectsLocationsScopesListCall) Header() http.Header {
14404 if c.header_ == nil {
14405 c.header_ = make(http.Header)
14406 }
14407 return c.header_
14408 }
14409
14410 func (c *ProjectsLocationsScopesListCall) doRequest(alt string) (*http.Response, error) {
14411 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14412 if c.ifNoneMatch_ != "" {
14413 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14414 }
14415 c.urlParams_.Set("alt", alt)
14416 c.urlParams_.Set("prettyPrint", "false")
14417 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/scopes")
14418 urls += "?" + c.urlParams_.Encode()
14419 req, err := http.NewRequest("GET", urls, nil)
14420 if err != nil {
14421 return nil, err
14422 }
14423 req.Header = reqHeaders
14424 googleapi.Expand(req.URL, map[string]string{
14425 "parent": c.parent,
14426 })
14427 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.list", "request", internallog.HTTPRequest(req, nil))
14428 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14429 }
14430
14431 // Do executes the "gkehub.projects.locations.scopes.list" call.
14432 // Any non-2xx status code is an error. Response headers are in either
14433 // *ListScopesResponse.ServerResponse.Header or (if a response was returned at
14434 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14435 // check whether the returned error was because http.StatusNotModified was
14436 // returned.
14437 func (c *ProjectsLocationsScopesListCall) Do(opts ...googleapi.CallOption) (*ListScopesResponse, 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 := &ListScopesResponse{
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.list", "response", internallog.HTTPResponse(res, b))
14468 return ret, nil
14469 }
14470
14471 // Pages invokes f for each page of results.
14472 // A non-nil error returned from f will halt the iteration.
14473 // The provided context supersedes any context provided to the Context method.
14474 func (c *ProjectsLocationsScopesListCall) Pages(ctx context.Context, f func(*ListScopesResponse) error) error {
14475 c.ctx_ = ctx
14476 defer c.PageToken(c.urlParams_.Get("pageToken"))
14477 for {
14478 x, err := c.Do()
14479 if err != nil {
14480 return err
14481 }
14482 if err := f(x); err != nil {
14483 return err
14484 }
14485 if x.NextPageToken == "" {
14486 return nil
14487 }
14488 c.PageToken(x.NextPageToken)
14489 }
14490 }
14491
14492 type ProjectsLocationsScopesListMembershipsCall struct {
14493 s *Service
14494 scopeName string
14495 urlParams_ gensupport.URLParams
14496 ifNoneMatch_ string
14497 ctx_ context.Context
14498 header_ http.Header
14499 }
14500
14501 // ListMemberships: Lists Memberships bound to a Scope. The response includes
14502 // relevant Memberships from all regions.
14503 //
14504 // - scopeName: Name of the Scope, in the format
14505 // `projects/*/locations/global/scopes/*`, to which the Memberships are
14506 // bound.
14507 func (r *ProjectsLocationsScopesService) ListMemberships(scopeName string) *ProjectsLocationsScopesListMembershipsCall {
14508 c := &ProjectsLocationsScopesListMembershipsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14509 c.scopeName = scopeName
14510 return c
14511 }
14512
14513 // Filter sets the optional parameter "filter": Lists Memberships that match
14514 // the filter expression, following the syntax outlined in
14515 // https://google.aip.dev/160. Currently, filtering can be done only based on
14516 // Memberships's `name`, `labels`, `create_time`, `update_time`, and
14517 // `unique_id`.
14518 func (c *ProjectsLocationsScopesListMembershipsCall) Filter(filter string) *ProjectsLocationsScopesListMembershipsCall {
14519 c.urlParams_.Set("filter", filter)
14520 return c
14521 }
14522
14523 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
14524 // resources, `page_size` specifies number of resources to return. If
14525 // unspecified or set to 0, all resources will be returned. Pagination is
14526 // currently not supported; therefore, setting this field does not have any
14527 // impact for now.
14528 func (c *ProjectsLocationsScopesListMembershipsCall) PageSize(pageSize int64) *ProjectsLocationsScopesListMembershipsCall {
14529 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14530 return c
14531 }
14532
14533 // PageToken sets the optional parameter "pageToken": Token returned by
14534 // previous call to `ListBoundMemberships` which specifies the position in the
14535 // list from where to continue listing the resources.
14536 func (c *ProjectsLocationsScopesListMembershipsCall) PageToken(pageToken string) *ProjectsLocationsScopesListMembershipsCall {
14537 c.urlParams_.Set("pageToken", pageToken)
14538 return c
14539 }
14540
14541 // Fields allows partial responses to be retrieved. See
14542 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14543 // details.
14544 func (c *ProjectsLocationsScopesListMembershipsCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesListMembershipsCall {
14545 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14546 return c
14547 }
14548
14549 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14550 // object's ETag matches the given value. This is useful for getting updates
14551 // only after the object has changed since the last request.
14552 func (c *ProjectsLocationsScopesListMembershipsCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesListMembershipsCall {
14553 c.ifNoneMatch_ = entityTag
14554 return c
14555 }
14556
14557 // Context sets the context to be used in this call's Do method.
14558 func (c *ProjectsLocationsScopesListMembershipsCall) Context(ctx context.Context) *ProjectsLocationsScopesListMembershipsCall {
14559 c.ctx_ = ctx
14560 return c
14561 }
14562
14563 // Header returns a http.Header that can be modified by the caller to add
14564 // headers to the request.
14565 func (c *ProjectsLocationsScopesListMembershipsCall) Header() http.Header {
14566 if c.header_ == nil {
14567 c.header_ = make(http.Header)
14568 }
14569 return c.header_
14570 }
14571
14572 func (c *ProjectsLocationsScopesListMembershipsCall) doRequest(alt string) (*http.Response, error) {
14573 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14574 if c.ifNoneMatch_ != "" {
14575 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14576 }
14577 c.urlParams_.Set("alt", alt)
14578 c.urlParams_.Set("prettyPrint", "false")
14579 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+scopeName}:listMemberships")
14580 urls += "?" + c.urlParams_.Encode()
14581 req, err := http.NewRequest("GET", urls, nil)
14582 if err != nil {
14583 return nil, err
14584 }
14585 req.Header = reqHeaders
14586 googleapi.Expand(req.URL, map[string]string{
14587 "scopeName": c.scopeName,
14588 })
14589 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.listMemberships", "request", internallog.HTTPRequest(req, nil))
14590 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14591 }
14592
14593 // Do executes the "gkehub.projects.locations.scopes.listMemberships" call.
14594 // Any non-2xx status code is an error. Response headers are in either
14595 // *ListBoundMembershipsResponse.ServerResponse.Header or (if a response was
14596 // returned at all) in error.(*googleapi.Error).Header. Use
14597 // googleapi.IsNotModified to check whether the returned error was because
14598 // http.StatusNotModified was returned.
14599 func (c *ProjectsLocationsScopesListMembershipsCall) Do(opts ...googleapi.CallOption) (*ListBoundMembershipsResponse, error) {
14600 gensupport.SetOptions(c.urlParams_, opts...)
14601 res, err := c.doRequest("json")
14602 if res != nil && res.StatusCode == http.StatusNotModified {
14603 if res.Body != nil {
14604 res.Body.Close()
14605 }
14606 return nil, gensupport.WrapError(&googleapi.Error{
14607 Code: res.StatusCode,
14608 Header: res.Header,
14609 })
14610 }
14611 if err != nil {
14612 return nil, err
14613 }
14614 defer googleapi.CloseBody(res)
14615 if err := googleapi.CheckResponse(res); err != nil {
14616 return nil, gensupport.WrapError(err)
14617 }
14618 ret := &ListBoundMembershipsResponse{
14619 ServerResponse: googleapi.ServerResponse{
14620 Header: res.Header,
14621 HTTPStatusCode: res.StatusCode,
14622 },
14623 }
14624 target := &ret
14625 b, err := gensupport.DecodeResponseBytes(target, res)
14626 if err != nil {
14627 return nil, err
14628 }
14629 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.listMemberships", "response", internallog.HTTPResponse(res, b))
14630 return ret, nil
14631 }
14632
14633 // Pages invokes f for each page of results.
14634 // A non-nil error returned from f will halt the iteration.
14635 // The provided context supersedes any context provided to the Context method.
14636 func (c *ProjectsLocationsScopesListMembershipsCall) Pages(ctx context.Context, f func(*ListBoundMembershipsResponse) error) error {
14637 c.ctx_ = ctx
14638 defer c.PageToken(c.urlParams_.Get("pageToken"))
14639 for {
14640 x, err := c.Do()
14641 if err != nil {
14642 return err
14643 }
14644 if err := f(x); err != nil {
14645 return err
14646 }
14647 if x.NextPageToken == "" {
14648 return nil
14649 }
14650 c.PageToken(x.NextPageToken)
14651 }
14652 }
14653
14654 type ProjectsLocationsScopesListPermittedCall struct {
14655 s *Service
14656 parent string
14657 urlParams_ gensupport.URLParams
14658 ifNoneMatch_ string
14659 ctx_ context.Context
14660 header_ http.Header
14661 }
14662
14663 // ListPermitted: Lists permitted Scopes.
14664 //
14665 // - parent: The parent (project and location) where the Scope will be listed.
14666 // Specified in the format `projects/*/locations/*`.
14667 func (r *ProjectsLocationsScopesService) ListPermitted(parent string) *ProjectsLocationsScopesListPermittedCall {
14668 c := &ProjectsLocationsScopesListPermittedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14669 c.parent = parent
14670 return c
14671 }
14672
14673 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
14674 // resources, `page_size` specifies number of resources to return. If
14675 // unspecified or set to 0, all resources will be returned.
14676 func (c *ProjectsLocationsScopesListPermittedCall) PageSize(pageSize int64) *ProjectsLocationsScopesListPermittedCall {
14677 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14678 return c
14679 }
14680
14681 // PageToken sets the optional parameter "pageToken": Token returned by
14682 // previous call to `ListPermittedScopes` which specifies the position in the
14683 // list from where to continue listing the resources.
14684 func (c *ProjectsLocationsScopesListPermittedCall) PageToken(pageToken string) *ProjectsLocationsScopesListPermittedCall {
14685 c.urlParams_.Set("pageToken", pageToken)
14686 return c
14687 }
14688
14689 // Fields allows partial responses to be retrieved. See
14690 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14691 // details.
14692 func (c *ProjectsLocationsScopesListPermittedCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesListPermittedCall {
14693 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14694 return c
14695 }
14696
14697 // IfNoneMatch sets an optional parameter which makes the operation fail if the
14698 // object's ETag matches the given value. This is useful for getting updates
14699 // only after the object has changed since the last request.
14700 func (c *ProjectsLocationsScopesListPermittedCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesListPermittedCall {
14701 c.ifNoneMatch_ = entityTag
14702 return c
14703 }
14704
14705 // Context sets the context to be used in this call's Do method.
14706 func (c *ProjectsLocationsScopesListPermittedCall) Context(ctx context.Context) *ProjectsLocationsScopesListPermittedCall {
14707 c.ctx_ = ctx
14708 return c
14709 }
14710
14711 // Header returns a http.Header that can be modified by the caller to add
14712 // headers to the request.
14713 func (c *ProjectsLocationsScopesListPermittedCall) Header() http.Header {
14714 if c.header_ == nil {
14715 c.header_ = make(http.Header)
14716 }
14717 return c.header_
14718 }
14719
14720 func (c *ProjectsLocationsScopesListPermittedCall) doRequest(alt string) (*http.Response, error) {
14721 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14722 if c.ifNoneMatch_ != "" {
14723 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14724 }
14725 c.urlParams_.Set("alt", alt)
14726 c.urlParams_.Set("prettyPrint", "false")
14727 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/scopes:listPermitted")
14728 urls += "?" + c.urlParams_.Encode()
14729 req, err := http.NewRequest("GET", urls, nil)
14730 if err != nil {
14731 return nil, err
14732 }
14733 req.Header = reqHeaders
14734 googleapi.Expand(req.URL, map[string]string{
14735 "parent": c.parent,
14736 })
14737 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.listPermitted", "request", internallog.HTTPRequest(req, nil))
14738 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14739 }
14740
14741 // Do executes the "gkehub.projects.locations.scopes.listPermitted" call.
14742 // Any non-2xx status code is an error. Response headers are in either
14743 // *ListPermittedScopesResponse.ServerResponse.Header or (if a response was
14744 // returned at all) in error.(*googleapi.Error).Header. Use
14745 // googleapi.IsNotModified to check whether the returned error was because
14746 // http.StatusNotModified was returned.
14747 func (c *ProjectsLocationsScopesListPermittedCall) Do(opts ...googleapi.CallOption) (*ListPermittedScopesResponse, error) {
14748 gensupport.SetOptions(c.urlParams_, opts...)
14749 res, err := c.doRequest("json")
14750 if res != nil && res.StatusCode == http.StatusNotModified {
14751 if res.Body != nil {
14752 res.Body.Close()
14753 }
14754 return nil, gensupport.WrapError(&googleapi.Error{
14755 Code: res.StatusCode,
14756 Header: res.Header,
14757 })
14758 }
14759 if err != nil {
14760 return nil, err
14761 }
14762 defer googleapi.CloseBody(res)
14763 if err := googleapi.CheckResponse(res); err != nil {
14764 return nil, gensupport.WrapError(err)
14765 }
14766 ret := &ListPermittedScopesResponse{
14767 ServerResponse: googleapi.ServerResponse{
14768 Header: res.Header,
14769 HTTPStatusCode: res.StatusCode,
14770 },
14771 }
14772 target := &ret
14773 b, err := gensupport.DecodeResponseBytes(target, res)
14774 if err != nil {
14775 return nil, err
14776 }
14777 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.listPermitted", "response", internallog.HTTPResponse(res, b))
14778 return ret, nil
14779 }
14780
14781 // Pages invokes f for each page of results.
14782 // A non-nil error returned from f will halt the iteration.
14783 // The provided context supersedes any context provided to the Context method.
14784 func (c *ProjectsLocationsScopesListPermittedCall) Pages(ctx context.Context, f func(*ListPermittedScopesResponse) error) error {
14785 c.ctx_ = ctx
14786 defer c.PageToken(c.urlParams_.Get("pageToken"))
14787 for {
14788 x, err := c.Do()
14789 if err != nil {
14790 return err
14791 }
14792 if err := f(x); err != nil {
14793 return err
14794 }
14795 if x.NextPageToken == "" {
14796 return nil
14797 }
14798 c.PageToken(x.NextPageToken)
14799 }
14800 }
14801
14802 type ProjectsLocationsScopesPatchCall struct {
14803 s *Service
14804 name string
14805 scope *Scope
14806 urlParams_ gensupport.URLParams
14807 ctx_ context.Context
14808 header_ http.Header
14809 }
14810
14811 // Patch: Updates a scopes.
14812 //
14813 // - name: The resource name for the scope
14814 // `projects/{project}/locations/{location}/scopes/{scope}`.
14815 func (r *ProjectsLocationsScopesService) Patch(name string, scope *Scope) *ProjectsLocationsScopesPatchCall {
14816 c := &ProjectsLocationsScopesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14817 c.name = name
14818 c.scope = scope
14819 return c
14820 }
14821
14822 // UpdateMask sets the optional parameter "updateMask": Required. The fields to
14823 // be updated.
14824 func (c *ProjectsLocationsScopesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsScopesPatchCall {
14825 c.urlParams_.Set("updateMask", updateMask)
14826 return c
14827 }
14828
14829 // Fields allows partial responses to be retrieved. See
14830 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14831 // details.
14832 func (c *ProjectsLocationsScopesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesPatchCall {
14833 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14834 return c
14835 }
14836
14837 // Context sets the context to be used in this call's Do method.
14838 func (c *ProjectsLocationsScopesPatchCall) Context(ctx context.Context) *ProjectsLocationsScopesPatchCall {
14839 c.ctx_ = ctx
14840 return c
14841 }
14842
14843 // Header returns a http.Header that can be modified by the caller to add
14844 // headers to the request.
14845 func (c *ProjectsLocationsScopesPatchCall) Header() http.Header {
14846 if c.header_ == nil {
14847 c.header_ = make(http.Header)
14848 }
14849 return c.header_
14850 }
14851
14852 func (c *ProjectsLocationsScopesPatchCall) doRequest(alt string) (*http.Response, error) {
14853 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14854 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.scope)
14855 if err != nil {
14856 return nil, err
14857 }
14858 c.urlParams_.Set("alt", alt)
14859 c.urlParams_.Set("prettyPrint", "false")
14860 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
14861 urls += "?" + c.urlParams_.Encode()
14862 req, err := http.NewRequest("PATCH", urls, body)
14863 if err != nil {
14864 return nil, err
14865 }
14866 req.Header = reqHeaders
14867 googleapi.Expand(req.URL, map[string]string{
14868 "name": c.name,
14869 })
14870 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
14871 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14872 }
14873
14874 // Do executes the "gkehub.projects.locations.scopes.patch" call.
14875 // Any non-2xx status code is an error. Response headers are in either
14876 // *Operation.ServerResponse.Header or (if a response was returned at all) in
14877 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14878 // whether the returned error was because http.StatusNotModified was returned.
14879 func (c *ProjectsLocationsScopesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14880 gensupport.SetOptions(c.urlParams_, opts...)
14881 res, err := c.doRequest("json")
14882 if res != nil && res.StatusCode == http.StatusNotModified {
14883 if res.Body != nil {
14884 res.Body.Close()
14885 }
14886 return nil, gensupport.WrapError(&googleapi.Error{
14887 Code: res.StatusCode,
14888 Header: res.Header,
14889 })
14890 }
14891 if err != nil {
14892 return nil, err
14893 }
14894 defer googleapi.CloseBody(res)
14895 if err := googleapi.CheckResponse(res); err != nil {
14896 return nil, gensupport.WrapError(err)
14897 }
14898 ret := &Operation{
14899 ServerResponse: googleapi.ServerResponse{
14900 Header: res.Header,
14901 HTTPStatusCode: res.StatusCode,
14902 },
14903 }
14904 target := &ret
14905 b, err := gensupport.DecodeResponseBytes(target, res)
14906 if err != nil {
14907 return nil, err
14908 }
14909 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.patch", "response", internallog.HTTPResponse(res, b))
14910 return ret, nil
14911 }
14912
14913 type ProjectsLocationsScopesSetIamPolicyCall struct {
14914 s *Service
14915 resource string
14916 setiampolicyrequest *SetIamPolicyRequest
14917 urlParams_ gensupport.URLParams
14918 ctx_ context.Context
14919 header_ http.Header
14920 }
14921
14922 // SetIamPolicy: Sets the access control policy on the specified resource.
14923 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
14924 // and `PERMISSION_DENIED` errors.
14925 //
14926 // - resource: REQUIRED: The resource for which the policy is being specified.
14927 // See Resource names (https://cloud.google.com/apis/design/resource_names)
14928 // for the appropriate value for this field.
14929 func (r *ProjectsLocationsScopesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsScopesSetIamPolicyCall {
14930 c := &ProjectsLocationsScopesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14931 c.resource = resource
14932 c.setiampolicyrequest = setiampolicyrequest
14933 return c
14934 }
14935
14936 // Fields allows partial responses to be retrieved. See
14937 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
14938 // details.
14939 func (c *ProjectsLocationsScopesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesSetIamPolicyCall {
14940 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14941 return c
14942 }
14943
14944 // Context sets the context to be used in this call's Do method.
14945 func (c *ProjectsLocationsScopesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsScopesSetIamPolicyCall {
14946 c.ctx_ = ctx
14947 return c
14948 }
14949
14950 // Header returns a http.Header that can be modified by the caller to add
14951 // headers to the request.
14952 func (c *ProjectsLocationsScopesSetIamPolicyCall) Header() http.Header {
14953 if c.header_ == nil {
14954 c.header_ = make(http.Header)
14955 }
14956 return c.header_
14957 }
14958
14959 func (c *ProjectsLocationsScopesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
14960 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14961 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
14962 if err != nil {
14963 return nil, err
14964 }
14965 c.urlParams_.Set("alt", alt)
14966 c.urlParams_.Set("prettyPrint", "false")
14967 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy")
14968 urls += "?" + c.urlParams_.Encode()
14969 req, err := http.NewRequest("POST", urls, body)
14970 if err != nil {
14971 return nil, err
14972 }
14973 req.Header = reqHeaders
14974 googleapi.Expand(req.URL, map[string]string{
14975 "resource": c.resource,
14976 })
14977 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
14978 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14979 }
14980
14981 // Do executes the "gkehub.projects.locations.scopes.setIamPolicy" call.
14982 // Any non-2xx status code is an error. Response headers are in either
14983 // *Policy.ServerResponse.Header or (if a response was returned at all) in
14984 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14985 // whether the returned error was because http.StatusNotModified was returned.
14986 func (c *ProjectsLocationsScopesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
14987 gensupport.SetOptions(c.urlParams_, opts...)
14988 res, err := c.doRequest("json")
14989 if res != nil && res.StatusCode == http.StatusNotModified {
14990 if res.Body != nil {
14991 res.Body.Close()
14992 }
14993 return nil, gensupport.WrapError(&googleapi.Error{
14994 Code: res.StatusCode,
14995 Header: res.Header,
14996 })
14997 }
14998 if err != nil {
14999 return nil, err
15000 }
15001 defer googleapi.CloseBody(res)
15002 if err := googleapi.CheckResponse(res); err != nil {
15003 return nil, gensupport.WrapError(err)
15004 }
15005 ret := &Policy{
15006 ServerResponse: googleapi.ServerResponse{
15007 Header: res.Header,
15008 HTTPStatusCode: res.StatusCode,
15009 },
15010 }
15011 target := &ret
15012 b, err := gensupport.DecodeResponseBytes(target, res)
15013 if err != nil {
15014 return nil, err
15015 }
15016 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.setIamPolicy", "response", internallog.HTTPResponse(res, b))
15017 return ret, nil
15018 }
15019
15020 type ProjectsLocationsScopesTestIamPermissionsCall struct {
15021 s *Service
15022 resource string
15023 testiampermissionsrequest *TestIamPermissionsRequest
15024 urlParams_ gensupport.URLParams
15025 ctx_ context.Context
15026 header_ http.Header
15027 }
15028
15029 // TestIamPermissions: Returns permissions that a caller has on the specified
15030 // resource. If the resource does not exist, this will return an empty set of
15031 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
15032 // used for building permission-aware UIs and command-line tools, not for
15033 // authorization checking. This operation may "fail open" without warning.
15034 //
15035 // - resource: REQUIRED: The resource for which the policy detail is being
15036 // requested. See Resource names
15037 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
15038 // value for this field.
15039 func (r *ProjectsLocationsScopesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsScopesTestIamPermissionsCall {
15040 c := &ProjectsLocationsScopesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15041 c.resource = resource
15042 c.testiampermissionsrequest = testiampermissionsrequest
15043 return c
15044 }
15045
15046 // Fields allows partial responses to be retrieved. See
15047 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15048 // details.
15049 func (c *ProjectsLocationsScopesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesTestIamPermissionsCall {
15050 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15051 return c
15052 }
15053
15054 // Context sets the context to be used in this call's Do method.
15055 func (c *ProjectsLocationsScopesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsScopesTestIamPermissionsCall {
15056 c.ctx_ = ctx
15057 return c
15058 }
15059
15060 // Header returns a http.Header that can be modified by the caller to add
15061 // headers to the request.
15062 func (c *ProjectsLocationsScopesTestIamPermissionsCall) Header() http.Header {
15063 if c.header_ == nil {
15064 c.header_ = make(http.Header)
15065 }
15066 return c.header_
15067 }
15068
15069 func (c *ProjectsLocationsScopesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
15070 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15071 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
15072 if err != nil {
15073 return nil, err
15074 }
15075 c.urlParams_.Set("alt", alt)
15076 c.urlParams_.Set("prettyPrint", "false")
15077 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions")
15078 urls += "?" + c.urlParams_.Encode()
15079 req, err := http.NewRequest("POST", urls, body)
15080 if err != nil {
15081 return nil, err
15082 }
15083 req.Header = reqHeaders
15084 googleapi.Expand(req.URL, map[string]string{
15085 "resource": c.resource,
15086 })
15087 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
15088 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15089 }
15090
15091 // Do executes the "gkehub.projects.locations.scopes.testIamPermissions" call.
15092 // Any non-2xx status code is an error. Response headers are in either
15093 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
15094 // returned at all) in error.(*googleapi.Error).Header. Use
15095 // googleapi.IsNotModified to check whether the returned error was because
15096 // http.StatusNotModified was returned.
15097 func (c *ProjectsLocationsScopesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
15098 gensupport.SetOptions(c.urlParams_, opts...)
15099 res, err := c.doRequest("json")
15100 if res != nil && res.StatusCode == http.StatusNotModified {
15101 if res.Body != nil {
15102 res.Body.Close()
15103 }
15104 return nil, gensupport.WrapError(&googleapi.Error{
15105 Code: res.StatusCode,
15106 Header: res.Header,
15107 })
15108 }
15109 if err != nil {
15110 return nil, err
15111 }
15112 defer googleapi.CloseBody(res)
15113 if err := googleapi.CheckResponse(res); err != nil {
15114 return nil, gensupport.WrapError(err)
15115 }
15116 ret := &TestIamPermissionsResponse{
15117 ServerResponse: googleapi.ServerResponse{
15118 Header: res.Header,
15119 HTTPStatusCode: res.StatusCode,
15120 },
15121 }
15122 target := &ret
15123 b, err := gensupport.DecodeResponseBytes(target, res)
15124 if err != nil {
15125 return nil, err
15126 }
15127 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.testIamPermissions", "response", internallog.HTTPResponse(res, b))
15128 return ret, nil
15129 }
15130
15131 type ProjectsLocationsScopesNamespacesCreateCall struct {
15132 s *Service
15133 parent string
15134 namespace *Namespace
15135 urlParams_ gensupport.URLParams
15136 ctx_ context.Context
15137 header_ http.Header
15138 }
15139
15140 // Create: Creates a fleet namespace.
15141 //
15142 // - parent: The parent (project and location) where the Namespace will be
15143 // created. Specified in the format `projects/*/locations/*/scopes/*`.
15144 func (r *ProjectsLocationsScopesNamespacesService) Create(parent string, namespace *Namespace) *ProjectsLocationsScopesNamespacesCreateCall {
15145 c := &ProjectsLocationsScopesNamespacesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15146 c.parent = parent
15147 c.namespace = namespace
15148 return c
15149 }
15150
15151 // ScopeNamespaceId sets the optional parameter "scopeNamespaceId": Required.
15152 // Client chosen ID for the Namespace. `namespace_id` must be a valid RFC 1123
15153 // compliant DNS label: 1. At most 63 characters in length 2. It must consist
15154 // of lower case alphanumeric characters or `-` 3. It must start and end with
15155 // an alphanumeric character Which can be expressed as the regex:
15156 // `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
15157 func (c *ProjectsLocationsScopesNamespacesCreateCall) ScopeNamespaceId(scopeNamespaceId string) *ProjectsLocationsScopesNamespacesCreateCall {
15158 c.urlParams_.Set("scopeNamespaceId", scopeNamespaceId)
15159 return c
15160 }
15161
15162 // Fields allows partial responses to be retrieved. See
15163 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15164 // details.
15165 func (c *ProjectsLocationsScopesNamespacesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesCreateCall {
15166 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15167 return c
15168 }
15169
15170 // Context sets the context to be used in this call's Do method.
15171 func (c *ProjectsLocationsScopesNamespacesCreateCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesCreateCall {
15172 c.ctx_ = ctx
15173 return c
15174 }
15175
15176 // Header returns a http.Header that can be modified by the caller to add
15177 // headers to the request.
15178 func (c *ProjectsLocationsScopesNamespacesCreateCall) Header() http.Header {
15179 if c.header_ == nil {
15180 c.header_ = make(http.Header)
15181 }
15182 return c.header_
15183 }
15184
15185 func (c *ProjectsLocationsScopesNamespacesCreateCall) doRequest(alt string) (*http.Response, error) {
15186 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15187 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.namespace)
15188 if err != nil {
15189 return nil, err
15190 }
15191 c.urlParams_.Set("alt", alt)
15192 c.urlParams_.Set("prettyPrint", "false")
15193 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/namespaces")
15194 urls += "?" + c.urlParams_.Encode()
15195 req, err := http.NewRequest("POST", urls, body)
15196 if err != nil {
15197 return nil, err
15198 }
15199 req.Header = reqHeaders
15200 googleapi.Expand(req.URL, map[string]string{
15201 "parent": c.parent,
15202 })
15203 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.create", "request", internallog.HTTPRequest(req, body.Bytes()))
15204 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15205 }
15206
15207 // Do executes the "gkehub.projects.locations.scopes.namespaces.create" call.
15208 // Any non-2xx status code is an error. Response headers are in either
15209 // *Operation.ServerResponse.Header or (if a response was returned at all) in
15210 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15211 // whether the returned error was because http.StatusNotModified was returned.
15212 func (c *ProjectsLocationsScopesNamespacesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15213 gensupport.SetOptions(c.urlParams_, opts...)
15214 res, err := c.doRequest("json")
15215 if res != nil && res.StatusCode == http.StatusNotModified {
15216 if res.Body != nil {
15217 res.Body.Close()
15218 }
15219 return nil, gensupport.WrapError(&googleapi.Error{
15220 Code: res.StatusCode,
15221 Header: res.Header,
15222 })
15223 }
15224 if err != nil {
15225 return nil, err
15226 }
15227 defer googleapi.CloseBody(res)
15228 if err := googleapi.CheckResponse(res); err != nil {
15229 return nil, gensupport.WrapError(err)
15230 }
15231 ret := &Operation{
15232 ServerResponse: googleapi.ServerResponse{
15233 Header: res.Header,
15234 HTTPStatusCode: res.StatusCode,
15235 },
15236 }
15237 target := &ret
15238 b, err := gensupport.DecodeResponseBytes(target, res)
15239 if err != nil {
15240 return nil, err
15241 }
15242 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.create", "response", internallog.HTTPResponse(res, b))
15243 return ret, nil
15244 }
15245
15246 type ProjectsLocationsScopesNamespacesDeleteCall struct {
15247 s *Service
15248 name string
15249 urlParams_ gensupport.URLParams
15250 ctx_ context.Context
15251 header_ http.Header
15252 }
15253
15254 // Delete: Deletes a fleet namespace.
15255 //
15256 // - name: The Namespace resource name in the format
15257 // `projects/*/locations/*/scopes/*/namespaces/*`.
15258 func (r *ProjectsLocationsScopesNamespacesService) Delete(name string) *ProjectsLocationsScopesNamespacesDeleteCall {
15259 c := &ProjectsLocationsScopesNamespacesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15260 c.name = name
15261 return c
15262 }
15263
15264 // Fields allows partial responses to be retrieved. See
15265 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15266 // details.
15267 func (c *ProjectsLocationsScopesNamespacesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesDeleteCall {
15268 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15269 return c
15270 }
15271
15272 // Context sets the context to be used in this call's Do method.
15273 func (c *ProjectsLocationsScopesNamespacesDeleteCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesDeleteCall {
15274 c.ctx_ = ctx
15275 return c
15276 }
15277
15278 // Header returns a http.Header that can be modified by the caller to add
15279 // headers to the request.
15280 func (c *ProjectsLocationsScopesNamespacesDeleteCall) Header() http.Header {
15281 if c.header_ == nil {
15282 c.header_ = make(http.Header)
15283 }
15284 return c.header_
15285 }
15286
15287 func (c *ProjectsLocationsScopesNamespacesDeleteCall) doRequest(alt string) (*http.Response, error) {
15288 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15289 c.urlParams_.Set("alt", alt)
15290 c.urlParams_.Set("prettyPrint", "false")
15291 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
15292 urls += "?" + c.urlParams_.Encode()
15293 req, err := http.NewRequest("DELETE", urls, nil)
15294 if err != nil {
15295 return nil, err
15296 }
15297 req.Header = reqHeaders
15298 googleapi.Expand(req.URL, map[string]string{
15299 "name": c.name,
15300 })
15301 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.delete", "request", internallog.HTTPRequest(req, nil))
15302 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15303 }
15304
15305 // Do executes the "gkehub.projects.locations.scopes.namespaces.delete" call.
15306 // Any non-2xx status code is an error. Response headers are in either
15307 // *Operation.ServerResponse.Header or (if a response was returned at all) in
15308 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15309 // whether the returned error was because http.StatusNotModified was returned.
15310 func (c *ProjectsLocationsScopesNamespacesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15311 gensupport.SetOptions(c.urlParams_, opts...)
15312 res, err := c.doRequest("json")
15313 if res != nil && res.StatusCode == http.StatusNotModified {
15314 if res.Body != nil {
15315 res.Body.Close()
15316 }
15317 return nil, gensupport.WrapError(&googleapi.Error{
15318 Code: res.StatusCode,
15319 Header: res.Header,
15320 })
15321 }
15322 if err != nil {
15323 return nil, err
15324 }
15325 defer googleapi.CloseBody(res)
15326 if err := googleapi.CheckResponse(res); err != nil {
15327 return nil, gensupport.WrapError(err)
15328 }
15329 ret := &Operation{
15330 ServerResponse: googleapi.ServerResponse{
15331 Header: res.Header,
15332 HTTPStatusCode: res.StatusCode,
15333 },
15334 }
15335 target := &ret
15336 b, err := gensupport.DecodeResponseBytes(target, res)
15337 if err != nil {
15338 return nil, err
15339 }
15340 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.delete", "response", internallog.HTTPResponse(res, b))
15341 return ret, nil
15342 }
15343
15344 type ProjectsLocationsScopesNamespacesGetCall struct {
15345 s *Service
15346 name string
15347 urlParams_ gensupport.URLParams
15348 ifNoneMatch_ string
15349 ctx_ context.Context
15350 header_ http.Header
15351 }
15352
15353 // Get: Returns the details of a fleet namespace.
15354 //
15355 // - name: The Namespace resource name in the format
15356 // `projects/*/locations/*/scopes/*/namespaces/*`.
15357 func (r *ProjectsLocationsScopesNamespacesService) Get(name string) *ProjectsLocationsScopesNamespacesGetCall {
15358 c := &ProjectsLocationsScopesNamespacesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15359 c.name = name
15360 return c
15361 }
15362
15363 // Fields allows partial responses to be retrieved. See
15364 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15365 // details.
15366 func (c *ProjectsLocationsScopesNamespacesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesGetCall {
15367 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15368 return c
15369 }
15370
15371 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15372 // object's ETag matches the given value. This is useful for getting updates
15373 // only after the object has changed since the last request.
15374 func (c *ProjectsLocationsScopesNamespacesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesNamespacesGetCall {
15375 c.ifNoneMatch_ = entityTag
15376 return c
15377 }
15378
15379 // Context sets the context to be used in this call's Do method.
15380 func (c *ProjectsLocationsScopesNamespacesGetCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesGetCall {
15381 c.ctx_ = ctx
15382 return c
15383 }
15384
15385 // Header returns a http.Header that can be modified by the caller to add
15386 // headers to the request.
15387 func (c *ProjectsLocationsScopesNamespacesGetCall) Header() http.Header {
15388 if c.header_ == nil {
15389 c.header_ = make(http.Header)
15390 }
15391 return c.header_
15392 }
15393
15394 func (c *ProjectsLocationsScopesNamespacesGetCall) doRequest(alt string) (*http.Response, error) {
15395 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15396 if c.ifNoneMatch_ != "" {
15397 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15398 }
15399 c.urlParams_.Set("alt", alt)
15400 c.urlParams_.Set("prettyPrint", "false")
15401 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
15402 urls += "?" + c.urlParams_.Encode()
15403 req, err := http.NewRequest("GET", urls, nil)
15404 if err != nil {
15405 return nil, err
15406 }
15407 req.Header = reqHeaders
15408 googleapi.Expand(req.URL, map[string]string{
15409 "name": c.name,
15410 })
15411 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.get", "request", internallog.HTTPRequest(req, nil))
15412 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15413 }
15414
15415 // Do executes the "gkehub.projects.locations.scopes.namespaces.get" call.
15416 // Any non-2xx status code is an error. Response headers are in either
15417 // *Namespace.ServerResponse.Header or (if a response was returned at all) in
15418 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15419 // whether the returned error was because http.StatusNotModified was returned.
15420 func (c *ProjectsLocationsScopesNamespacesGetCall) Do(opts ...googleapi.CallOption) (*Namespace, error) {
15421 gensupport.SetOptions(c.urlParams_, opts...)
15422 res, err := c.doRequest("json")
15423 if res != nil && res.StatusCode == http.StatusNotModified {
15424 if res.Body != nil {
15425 res.Body.Close()
15426 }
15427 return nil, gensupport.WrapError(&googleapi.Error{
15428 Code: res.StatusCode,
15429 Header: res.Header,
15430 })
15431 }
15432 if err != nil {
15433 return nil, err
15434 }
15435 defer googleapi.CloseBody(res)
15436 if err := googleapi.CheckResponse(res); err != nil {
15437 return nil, gensupport.WrapError(err)
15438 }
15439 ret := &Namespace{
15440 ServerResponse: googleapi.ServerResponse{
15441 Header: res.Header,
15442 HTTPStatusCode: res.StatusCode,
15443 },
15444 }
15445 target := &ret
15446 b, err := gensupport.DecodeResponseBytes(target, res)
15447 if err != nil {
15448 return nil, err
15449 }
15450 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.get", "response", internallog.HTTPResponse(res, b))
15451 return ret, nil
15452 }
15453
15454 type ProjectsLocationsScopesNamespacesListCall struct {
15455 s *Service
15456 parent string
15457 urlParams_ gensupport.URLParams
15458 ifNoneMatch_ string
15459 ctx_ context.Context
15460 header_ http.Header
15461 }
15462
15463 // List: Lists fleet namespaces.
15464 //
15465 // - parent: The parent (project and location) where the Features will be
15466 // listed. Specified in the format `projects/*/locations/*/scopes/*`.
15467 func (r *ProjectsLocationsScopesNamespacesService) List(parent string) *ProjectsLocationsScopesNamespacesListCall {
15468 c := &ProjectsLocationsScopesNamespacesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15469 c.parent = parent
15470 return c
15471 }
15472
15473 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
15474 // resources, `page_size` specifies number of resources to return. If
15475 // unspecified or set to 0, all resources will be returned.
15476 func (c *ProjectsLocationsScopesNamespacesListCall) PageSize(pageSize int64) *ProjectsLocationsScopesNamespacesListCall {
15477 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15478 return c
15479 }
15480
15481 // PageToken sets the optional parameter "pageToken": Token returned by
15482 // previous call to `ListFeatures` which specifies the position in the list
15483 // from where to continue listing the resources.
15484 func (c *ProjectsLocationsScopesNamespacesListCall) PageToken(pageToken string) *ProjectsLocationsScopesNamespacesListCall {
15485 c.urlParams_.Set("pageToken", pageToken)
15486 return c
15487 }
15488
15489 // Fields allows partial responses to be retrieved. See
15490 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15491 // details.
15492 func (c *ProjectsLocationsScopesNamespacesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesListCall {
15493 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15494 return c
15495 }
15496
15497 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15498 // object's ETag matches the given value. This is useful for getting updates
15499 // only after the object has changed since the last request.
15500 func (c *ProjectsLocationsScopesNamespacesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesNamespacesListCall {
15501 c.ifNoneMatch_ = entityTag
15502 return c
15503 }
15504
15505 // Context sets the context to be used in this call's Do method.
15506 func (c *ProjectsLocationsScopesNamespacesListCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesListCall {
15507 c.ctx_ = ctx
15508 return c
15509 }
15510
15511 // Header returns a http.Header that can be modified by the caller to add
15512 // headers to the request.
15513 func (c *ProjectsLocationsScopesNamespacesListCall) Header() http.Header {
15514 if c.header_ == nil {
15515 c.header_ = make(http.Header)
15516 }
15517 return c.header_
15518 }
15519
15520 func (c *ProjectsLocationsScopesNamespacesListCall) doRequest(alt string) (*http.Response, error) {
15521 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15522 if c.ifNoneMatch_ != "" {
15523 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15524 }
15525 c.urlParams_.Set("alt", alt)
15526 c.urlParams_.Set("prettyPrint", "false")
15527 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/namespaces")
15528 urls += "?" + c.urlParams_.Encode()
15529 req, err := http.NewRequest("GET", urls, nil)
15530 if err != nil {
15531 return nil, err
15532 }
15533 req.Header = reqHeaders
15534 googleapi.Expand(req.URL, map[string]string{
15535 "parent": c.parent,
15536 })
15537 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.list", "request", internallog.HTTPRequest(req, nil))
15538 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15539 }
15540
15541 // Do executes the "gkehub.projects.locations.scopes.namespaces.list" call.
15542 // Any non-2xx status code is an error. Response headers are in either
15543 // *ListScopeNamespacesResponse.ServerResponse.Header or (if a response was
15544 // returned at all) in error.(*googleapi.Error).Header. Use
15545 // googleapi.IsNotModified to check whether the returned error was because
15546 // http.StatusNotModified was returned.
15547 func (c *ProjectsLocationsScopesNamespacesListCall) Do(opts ...googleapi.CallOption) (*ListScopeNamespacesResponse, error) {
15548 gensupport.SetOptions(c.urlParams_, opts...)
15549 res, err := c.doRequest("json")
15550 if res != nil && res.StatusCode == http.StatusNotModified {
15551 if res.Body != nil {
15552 res.Body.Close()
15553 }
15554 return nil, gensupport.WrapError(&googleapi.Error{
15555 Code: res.StatusCode,
15556 Header: res.Header,
15557 })
15558 }
15559 if err != nil {
15560 return nil, err
15561 }
15562 defer googleapi.CloseBody(res)
15563 if err := googleapi.CheckResponse(res); err != nil {
15564 return nil, gensupport.WrapError(err)
15565 }
15566 ret := &ListScopeNamespacesResponse{
15567 ServerResponse: googleapi.ServerResponse{
15568 Header: res.Header,
15569 HTTPStatusCode: res.StatusCode,
15570 },
15571 }
15572 target := &ret
15573 b, err := gensupport.DecodeResponseBytes(target, res)
15574 if err != nil {
15575 return nil, err
15576 }
15577 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.list", "response", internallog.HTTPResponse(res, b))
15578 return ret, nil
15579 }
15580
15581 // Pages invokes f for each page of results.
15582 // A non-nil error returned from f will halt the iteration.
15583 // The provided context supersedes any context provided to the Context method.
15584 func (c *ProjectsLocationsScopesNamespacesListCall) Pages(ctx context.Context, f func(*ListScopeNamespacesResponse) error) error {
15585 c.ctx_ = ctx
15586 defer c.PageToken(c.urlParams_.Get("pageToken"))
15587 for {
15588 x, err := c.Do()
15589 if err != nil {
15590 return err
15591 }
15592 if err := f(x); err != nil {
15593 return err
15594 }
15595 if x.NextPageToken == "" {
15596 return nil
15597 }
15598 c.PageToken(x.NextPageToken)
15599 }
15600 }
15601
15602 type ProjectsLocationsScopesNamespacesPatchCall struct {
15603 s *Service
15604 name string
15605 namespace *Namespace
15606 urlParams_ gensupport.URLParams
15607 ctx_ context.Context
15608 header_ http.Header
15609 }
15610
15611 // Patch: Updates a fleet namespace.
15612 //
15613 // - name: The resource name for the namespace
15614 // `projects/{project}/locations/{location}/namespaces/{namespace}`.
15615 func (r *ProjectsLocationsScopesNamespacesService) Patch(name string, namespace *Namespace) *ProjectsLocationsScopesNamespacesPatchCall {
15616 c := &ProjectsLocationsScopesNamespacesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15617 c.name = name
15618 c.namespace = namespace
15619 return c
15620 }
15621
15622 // UpdateMask sets the optional parameter "updateMask": Required. The fields to
15623 // be updated.
15624 func (c *ProjectsLocationsScopesNamespacesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsScopesNamespacesPatchCall {
15625 c.urlParams_.Set("updateMask", updateMask)
15626 return c
15627 }
15628
15629 // Fields allows partial responses to be retrieved. See
15630 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15631 // details.
15632 func (c *ProjectsLocationsScopesNamespacesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesPatchCall {
15633 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15634 return c
15635 }
15636
15637 // Context sets the context to be used in this call's Do method.
15638 func (c *ProjectsLocationsScopesNamespacesPatchCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesPatchCall {
15639 c.ctx_ = ctx
15640 return c
15641 }
15642
15643 // Header returns a http.Header that can be modified by the caller to add
15644 // headers to the request.
15645 func (c *ProjectsLocationsScopesNamespacesPatchCall) Header() http.Header {
15646 if c.header_ == nil {
15647 c.header_ = make(http.Header)
15648 }
15649 return c.header_
15650 }
15651
15652 func (c *ProjectsLocationsScopesNamespacesPatchCall) doRequest(alt string) (*http.Response, error) {
15653 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15654 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.namespace)
15655 if err != nil {
15656 return nil, err
15657 }
15658 c.urlParams_.Set("alt", alt)
15659 c.urlParams_.Set("prettyPrint", "false")
15660 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
15661 urls += "?" + c.urlParams_.Encode()
15662 req, err := http.NewRequest("PATCH", urls, body)
15663 if err != nil {
15664 return nil, err
15665 }
15666 req.Header = reqHeaders
15667 googleapi.Expand(req.URL, map[string]string{
15668 "name": c.name,
15669 })
15670 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
15671 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15672 }
15673
15674 // Do executes the "gkehub.projects.locations.scopes.namespaces.patch" call.
15675 // Any non-2xx status code is an error. Response headers are in either
15676 // *Operation.ServerResponse.Header or (if a response was returned at all) in
15677 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15678 // whether the returned error was because http.StatusNotModified was returned.
15679 func (c *ProjectsLocationsScopesNamespacesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15680 gensupport.SetOptions(c.urlParams_, opts...)
15681 res, err := c.doRequest("json")
15682 if res != nil && res.StatusCode == http.StatusNotModified {
15683 if res.Body != nil {
15684 res.Body.Close()
15685 }
15686 return nil, gensupport.WrapError(&googleapi.Error{
15687 Code: res.StatusCode,
15688 Header: res.Header,
15689 })
15690 }
15691 if err != nil {
15692 return nil, err
15693 }
15694 defer googleapi.CloseBody(res)
15695 if err := googleapi.CheckResponse(res); err != nil {
15696 return nil, gensupport.WrapError(err)
15697 }
15698 ret := &Operation{
15699 ServerResponse: googleapi.ServerResponse{
15700 Header: res.Header,
15701 HTTPStatusCode: res.StatusCode,
15702 },
15703 }
15704 target := &ret
15705 b, err := gensupport.DecodeResponseBytes(target, res)
15706 if err != nil {
15707 return nil, err
15708 }
15709 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.patch", "response", internallog.HTTPResponse(res, b))
15710 return ret, nil
15711 }
15712
15713 type ProjectsLocationsScopesRbacrolebindingsCreateCall struct {
15714 s *Service
15715 parent string
15716 rbacrolebinding *RBACRoleBinding
15717 urlParams_ gensupport.URLParams
15718 ctx_ context.Context
15719 header_ http.Header
15720 }
15721
15722 // Create: Creates a Scope RBACRoleBinding.
15723 //
15724 // - parent: The parent (project and location) where the RBACRoleBinding will
15725 // be created. Specified in the format `projects/*/locations/*/scopes/*`.
15726 func (r *ProjectsLocationsScopesRbacrolebindingsService) Create(parent string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsScopesRbacrolebindingsCreateCall {
15727 c := &ProjectsLocationsScopesRbacrolebindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15728 c.parent = parent
15729 c.rbacrolebinding = rbacrolebinding
15730 return c
15731 }
15732
15733 // RbacrolebindingId sets the optional parameter "rbacrolebindingId": Required.
15734 // Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a
15735 // valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It
15736 // must consist of lower case alphanumeric characters or `-` 3. It must start
15737 // and end with an alphanumeric character Which can be expressed as the regex:
15738 // `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
15739 func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) RbacrolebindingId(rbacrolebindingId string) *ProjectsLocationsScopesRbacrolebindingsCreateCall {
15740 c.urlParams_.Set("rbacrolebindingId", rbacrolebindingId)
15741 return c
15742 }
15743
15744 // Fields allows partial responses to be retrieved. See
15745 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15746 // details.
15747 func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsCreateCall {
15748 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15749 return c
15750 }
15751
15752 // Context sets the context to be used in this call's Do method.
15753 func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsCreateCall {
15754 c.ctx_ = ctx
15755 return c
15756 }
15757
15758 // Header returns a http.Header that can be modified by the caller to add
15759 // headers to the request.
15760 func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) Header() http.Header {
15761 if c.header_ == nil {
15762 c.header_ = make(http.Header)
15763 }
15764 return c.header_
15765 }
15766
15767 func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) doRequest(alt string) (*http.Response, error) {
15768 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15769 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rbacrolebinding)
15770 if err != nil {
15771 return nil, err
15772 }
15773 c.urlParams_.Set("alt", alt)
15774 c.urlParams_.Set("prettyPrint", "false")
15775 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/rbacrolebindings")
15776 urls += "?" + c.urlParams_.Encode()
15777 req, err := http.NewRequest("POST", urls, body)
15778 if err != nil {
15779 return nil, err
15780 }
15781 req.Header = reqHeaders
15782 googleapi.Expand(req.URL, map[string]string{
15783 "parent": c.parent,
15784 })
15785 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.create", "request", internallog.HTTPRequest(req, body.Bytes()))
15786 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15787 }
15788
15789 // Do executes the "gkehub.projects.locations.scopes.rbacrolebindings.create" call.
15790 // Any non-2xx status code is an error. Response headers are in either
15791 // *Operation.ServerResponse.Header or (if a response was returned at all) in
15792 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15793 // whether the returned error was because http.StatusNotModified was returned.
15794 func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15795 gensupport.SetOptions(c.urlParams_, opts...)
15796 res, err := c.doRequest("json")
15797 if res != nil && res.StatusCode == http.StatusNotModified {
15798 if res.Body != nil {
15799 res.Body.Close()
15800 }
15801 return nil, gensupport.WrapError(&googleapi.Error{
15802 Code: res.StatusCode,
15803 Header: res.Header,
15804 })
15805 }
15806 if err != nil {
15807 return nil, err
15808 }
15809 defer googleapi.CloseBody(res)
15810 if err := googleapi.CheckResponse(res); err != nil {
15811 return nil, gensupport.WrapError(err)
15812 }
15813 ret := &Operation{
15814 ServerResponse: googleapi.ServerResponse{
15815 Header: res.Header,
15816 HTTPStatusCode: res.StatusCode,
15817 },
15818 }
15819 target := &ret
15820 b, err := gensupport.DecodeResponseBytes(target, res)
15821 if err != nil {
15822 return nil, err
15823 }
15824 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.create", "response", internallog.HTTPResponse(res, b))
15825 return ret, nil
15826 }
15827
15828 type ProjectsLocationsScopesRbacrolebindingsDeleteCall struct {
15829 s *Service
15830 name string
15831 urlParams_ gensupport.URLParams
15832 ctx_ context.Context
15833 header_ http.Header
15834 }
15835
15836 // Delete: Deletes a Scope RBACRoleBinding.
15837 //
15838 // - name: The RBACRoleBinding resource name in the format
15839 // `projects/*/locations/*/scopes/*/rbacrolebindings/*`.
15840 func (r *ProjectsLocationsScopesRbacrolebindingsService) Delete(name string) *ProjectsLocationsScopesRbacrolebindingsDeleteCall {
15841 c := &ProjectsLocationsScopesRbacrolebindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15842 c.name = name
15843 return c
15844 }
15845
15846 // Fields allows partial responses to be retrieved. See
15847 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15848 // details.
15849 func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsDeleteCall {
15850 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15851 return c
15852 }
15853
15854 // Context sets the context to be used in this call's Do method.
15855 func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsDeleteCall {
15856 c.ctx_ = ctx
15857 return c
15858 }
15859
15860 // Header returns a http.Header that can be modified by the caller to add
15861 // headers to the request.
15862 func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Header() http.Header {
15863 if c.header_ == nil {
15864 c.header_ = make(http.Header)
15865 }
15866 return c.header_
15867 }
15868
15869 func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) doRequest(alt string) (*http.Response, error) {
15870 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15871 c.urlParams_.Set("alt", alt)
15872 c.urlParams_.Set("prettyPrint", "false")
15873 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
15874 urls += "?" + c.urlParams_.Encode()
15875 req, err := http.NewRequest("DELETE", urls, nil)
15876 if err != nil {
15877 return nil, err
15878 }
15879 req.Header = reqHeaders
15880 googleapi.Expand(req.URL, map[string]string{
15881 "name": c.name,
15882 })
15883 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.delete", "request", internallog.HTTPRequest(req, nil))
15884 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15885 }
15886
15887 // Do executes the "gkehub.projects.locations.scopes.rbacrolebindings.delete" call.
15888 // Any non-2xx status code is an error. Response headers are in either
15889 // *Operation.ServerResponse.Header or (if a response was returned at all) in
15890 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15891 // whether the returned error was because http.StatusNotModified was returned.
15892 func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15893 gensupport.SetOptions(c.urlParams_, opts...)
15894 res, err := c.doRequest("json")
15895 if res != nil && res.StatusCode == http.StatusNotModified {
15896 if res.Body != nil {
15897 res.Body.Close()
15898 }
15899 return nil, gensupport.WrapError(&googleapi.Error{
15900 Code: res.StatusCode,
15901 Header: res.Header,
15902 })
15903 }
15904 if err != nil {
15905 return nil, err
15906 }
15907 defer googleapi.CloseBody(res)
15908 if err := googleapi.CheckResponse(res); err != nil {
15909 return nil, gensupport.WrapError(err)
15910 }
15911 ret := &Operation{
15912 ServerResponse: googleapi.ServerResponse{
15913 Header: res.Header,
15914 HTTPStatusCode: res.StatusCode,
15915 },
15916 }
15917 target := &ret
15918 b, err := gensupport.DecodeResponseBytes(target, res)
15919 if err != nil {
15920 return nil, err
15921 }
15922 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.delete", "response", internallog.HTTPResponse(res, b))
15923 return ret, nil
15924 }
15925
15926 type ProjectsLocationsScopesRbacrolebindingsGetCall struct {
15927 s *Service
15928 name string
15929 urlParams_ gensupport.URLParams
15930 ifNoneMatch_ string
15931 ctx_ context.Context
15932 header_ http.Header
15933 }
15934
15935 // Get: Returns the details of a Scope RBACRoleBinding.
15936 //
15937 // - name: The RBACRoleBinding resource name in the format
15938 // `projects/*/locations/*/scopes/*/rbacrolebindings/*`.
15939 func (r *ProjectsLocationsScopesRbacrolebindingsService) Get(name string) *ProjectsLocationsScopesRbacrolebindingsGetCall {
15940 c := &ProjectsLocationsScopesRbacrolebindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15941 c.name = name
15942 return c
15943 }
15944
15945 // Fields allows partial responses to be retrieved. See
15946 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
15947 // details.
15948 func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsGetCall {
15949 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15950 return c
15951 }
15952
15953 // IfNoneMatch sets an optional parameter which makes the operation fail if the
15954 // object's ETag matches the given value. This is useful for getting updates
15955 // only after the object has changed since the last request.
15956 func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesRbacrolebindingsGetCall {
15957 c.ifNoneMatch_ = entityTag
15958 return c
15959 }
15960
15961 // Context sets the context to be used in this call's Do method.
15962 func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsGetCall {
15963 c.ctx_ = ctx
15964 return c
15965 }
15966
15967 // Header returns a http.Header that can be modified by the caller to add
15968 // headers to the request.
15969 func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Header() http.Header {
15970 if c.header_ == nil {
15971 c.header_ = make(http.Header)
15972 }
15973 return c.header_
15974 }
15975
15976 func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) doRequest(alt string) (*http.Response, error) {
15977 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15978 if c.ifNoneMatch_ != "" {
15979 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15980 }
15981 c.urlParams_.Set("alt", alt)
15982 c.urlParams_.Set("prettyPrint", "false")
15983 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
15984 urls += "?" + c.urlParams_.Encode()
15985 req, err := http.NewRequest("GET", urls, nil)
15986 if err != nil {
15987 return nil, err
15988 }
15989 req.Header = reqHeaders
15990 googleapi.Expand(req.URL, map[string]string{
15991 "name": c.name,
15992 })
15993 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.get", "request", internallog.HTTPRequest(req, nil))
15994 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15995 }
15996
15997 // Do executes the "gkehub.projects.locations.scopes.rbacrolebindings.get" call.
15998 // Any non-2xx status code is an error. Response headers are in either
15999 // *RBACRoleBinding.ServerResponse.Header or (if a response was returned at
16000 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16001 // check whether the returned error was because http.StatusNotModified was
16002 // returned.
16003 func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Do(opts ...googleapi.CallOption) (*RBACRoleBinding, error) {
16004 gensupport.SetOptions(c.urlParams_, opts...)
16005 res, err := c.doRequest("json")
16006 if res != nil && res.StatusCode == http.StatusNotModified {
16007 if res.Body != nil {
16008 res.Body.Close()
16009 }
16010 return nil, gensupport.WrapError(&googleapi.Error{
16011 Code: res.StatusCode,
16012 Header: res.Header,
16013 })
16014 }
16015 if err != nil {
16016 return nil, err
16017 }
16018 defer googleapi.CloseBody(res)
16019 if err := googleapi.CheckResponse(res); err != nil {
16020 return nil, gensupport.WrapError(err)
16021 }
16022 ret := &RBACRoleBinding{
16023 ServerResponse: googleapi.ServerResponse{
16024 Header: res.Header,
16025 HTTPStatusCode: res.StatusCode,
16026 },
16027 }
16028 target := &ret
16029 b, err := gensupport.DecodeResponseBytes(target, res)
16030 if err != nil {
16031 return nil, err
16032 }
16033 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.get", "response", internallog.HTTPResponse(res, b))
16034 return ret, nil
16035 }
16036
16037 type ProjectsLocationsScopesRbacrolebindingsListCall struct {
16038 s *Service
16039 parent string
16040 urlParams_ gensupport.URLParams
16041 ifNoneMatch_ string
16042 ctx_ context.Context
16043 header_ http.Header
16044 }
16045
16046 // List: Lists all Scope RBACRoleBindings.
16047 //
16048 // - parent: The parent (project and location) where the Features will be
16049 // listed. Specified in the format `projects/*/locations/*/scopes/*`.
16050 func (r *ProjectsLocationsScopesRbacrolebindingsService) List(parent string) *ProjectsLocationsScopesRbacrolebindingsListCall {
16051 c := &ProjectsLocationsScopesRbacrolebindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16052 c.parent = parent
16053 return c
16054 }
16055
16056 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
16057 // resources, `page_size` specifies number of resources to return. If
16058 // unspecified or set to 0, all resources will be returned.
16059 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) PageSize(pageSize int64) *ProjectsLocationsScopesRbacrolebindingsListCall {
16060 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16061 return c
16062 }
16063
16064 // PageToken sets the optional parameter "pageToken": Token returned by
16065 // previous call to `ListScopeRBACRoleBindings` which specifies the position in
16066 // the list from where to continue listing the resources.
16067 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) PageToken(pageToken string) *ProjectsLocationsScopesRbacrolebindingsListCall {
16068 c.urlParams_.Set("pageToken", pageToken)
16069 return c
16070 }
16071
16072 // Fields allows partial responses to be retrieved. See
16073 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16074 // details.
16075 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsListCall {
16076 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16077 return c
16078 }
16079
16080 // IfNoneMatch sets an optional parameter which makes the operation fail if the
16081 // object's ETag matches the given value. This is useful for getting updates
16082 // only after the object has changed since the last request.
16083 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesRbacrolebindingsListCall {
16084 c.ifNoneMatch_ = entityTag
16085 return c
16086 }
16087
16088 // Context sets the context to be used in this call's Do method.
16089 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsListCall {
16090 c.ctx_ = ctx
16091 return c
16092 }
16093
16094 // Header returns a http.Header that can be modified by the caller to add
16095 // headers to the request.
16096 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Header() http.Header {
16097 if c.header_ == nil {
16098 c.header_ = make(http.Header)
16099 }
16100 return c.header_
16101 }
16102
16103 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) doRequest(alt string) (*http.Response, error) {
16104 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16105 if c.ifNoneMatch_ != "" {
16106 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16107 }
16108 c.urlParams_.Set("alt", alt)
16109 c.urlParams_.Set("prettyPrint", "false")
16110 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/rbacrolebindings")
16111 urls += "?" + c.urlParams_.Encode()
16112 req, err := http.NewRequest("GET", urls, nil)
16113 if err != nil {
16114 return nil, err
16115 }
16116 req.Header = reqHeaders
16117 googleapi.Expand(req.URL, map[string]string{
16118 "parent": c.parent,
16119 })
16120 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.list", "request", internallog.HTTPRequest(req, nil))
16121 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16122 }
16123
16124 // Do executes the "gkehub.projects.locations.scopes.rbacrolebindings.list" call.
16125 // Any non-2xx status code is an error. Response headers are in either
16126 // *ListScopeRBACRoleBindingsResponse.ServerResponse.Header or (if a response
16127 // was returned at all) in error.(*googleapi.Error).Header. Use
16128 // googleapi.IsNotModified to check whether the returned error was because
16129 // http.StatusNotModified was returned.
16130 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Do(opts ...googleapi.CallOption) (*ListScopeRBACRoleBindingsResponse, error) {
16131 gensupport.SetOptions(c.urlParams_, opts...)
16132 res, err := c.doRequest("json")
16133 if res != nil && res.StatusCode == http.StatusNotModified {
16134 if res.Body != nil {
16135 res.Body.Close()
16136 }
16137 return nil, gensupport.WrapError(&googleapi.Error{
16138 Code: res.StatusCode,
16139 Header: res.Header,
16140 })
16141 }
16142 if err != nil {
16143 return nil, err
16144 }
16145 defer googleapi.CloseBody(res)
16146 if err := googleapi.CheckResponse(res); err != nil {
16147 return nil, gensupport.WrapError(err)
16148 }
16149 ret := &ListScopeRBACRoleBindingsResponse{
16150 ServerResponse: googleapi.ServerResponse{
16151 Header: res.Header,
16152 HTTPStatusCode: res.StatusCode,
16153 },
16154 }
16155 target := &ret
16156 b, err := gensupport.DecodeResponseBytes(target, res)
16157 if err != nil {
16158 return nil, err
16159 }
16160 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.list", "response", internallog.HTTPResponse(res, b))
16161 return ret, nil
16162 }
16163
16164 // Pages invokes f for each page of results.
16165 // A non-nil error returned from f will halt the iteration.
16166 // The provided context supersedes any context provided to the Context method.
16167 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Pages(ctx context.Context, f func(*ListScopeRBACRoleBindingsResponse) error) error {
16168 c.ctx_ = ctx
16169 defer c.PageToken(c.urlParams_.Get("pageToken"))
16170 for {
16171 x, err := c.Do()
16172 if err != nil {
16173 return err
16174 }
16175 if err := f(x); err != nil {
16176 return err
16177 }
16178 if x.NextPageToken == "" {
16179 return nil
16180 }
16181 c.PageToken(x.NextPageToken)
16182 }
16183 }
16184
16185 type ProjectsLocationsScopesRbacrolebindingsPatchCall struct {
16186 s *Service
16187 name string
16188 rbacrolebinding *RBACRoleBinding
16189 urlParams_ gensupport.URLParams
16190 ctx_ context.Context
16191 header_ http.Header
16192 }
16193
16194 // Patch: Updates a Scope RBACRoleBinding.
16195 //
16196 // - name: The resource name for the rbacrolebinding
16197 // `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{r
16198 // bacrolebinding}` or
16199 // `projects/{project}/locations/{location}/memberships/{membership}/rbacroleb
16200 // indings/{rbacrolebinding}`.
16201 func (r *ProjectsLocationsScopesRbacrolebindingsService) Patch(name string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsScopesRbacrolebindingsPatchCall {
16202 c := &ProjectsLocationsScopesRbacrolebindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16203 c.name = name
16204 c.rbacrolebinding = rbacrolebinding
16205 return c
16206 }
16207
16208 // UpdateMask sets the optional parameter "updateMask": Required. The fields to
16209 // be updated.
16210 func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsScopesRbacrolebindingsPatchCall {
16211 c.urlParams_.Set("updateMask", updateMask)
16212 return c
16213 }
16214
16215 // Fields allows partial responses to be retrieved. See
16216 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
16217 // details.
16218 func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsPatchCall {
16219 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16220 return c
16221 }
16222
16223 // Context sets the context to be used in this call's Do method.
16224 func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsPatchCall {
16225 c.ctx_ = ctx
16226 return c
16227 }
16228
16229 // Header returns a http.Header that can be modified by the caller to add
16230 // headers to the request.
16231 func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) Header() http.Header {
16232 if c.header_ == nil {
16233 c.header_ = make(http.Header)
16234 }
16235 return c.header_
16236 }
16237
16238 func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) doRequest(alt string) (*http.Response, error) {
16239 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16240 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rbacrolebinding)
16241 if err != nil {
16242 return nil, err
16243 }
16244 c.urlParams_.Set("alt", alt)
16245 c.urlParams_.Set("prettyPrint", "false")
16246 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
16247 urls += "?" + c.urlParams_.Encode()
16248 req, err := http.NewRequest("PATCH", urls, body)
16249 if err != nil {
16250 return nil, err
16251 }
16252 req.Header = reqHeaders
16253 googleapi.Expand(req.URL, map[string]string{
16254 "name": c.name,
16255 })
16256 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
16257 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16258 }
16259
16260 // Do executes the "gkehub.projects.locations.scopes.rbacrolebindings.patch" call.
16261 // Any non-2xx status code is an error. Response headers are in either
16262 // *Operation.ServerResponse.Header or (if a response was returned at all) in
16263 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16264 // whether the returned error was because http.StatusNotModified was returned.
16265 func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
16266 gensupport.SetOptions(c.urlParams_, opts...)
16267 res, err := c.doRequest("json")
16268 if res != nil && res.StatusCode == http.StatusNotModified {
16269 if res.Body != nil {
16270 res.Body.Close()
16271 }
16272 return nil, gensupport.WrapError(&googleapi.Error{
16273 Code: res.StatusCode,
16274 Header: res.Header,
16275 })
16276 }
16277 if err != nil {
16278 return nil, err
16279 }
16280 defer googleapi.CloseBody(res)
16281 if err := googleapi.CheckResponse(res); err != nil {
16282 return nil, gensupport.WrapError(err)
16283 }
16284 ret := &Operation{
16285 ServerResponse: googleapi.ServerResponse{
16286 Header: res.Header,
16287 HTTPStatusCode: res.StatusCode,
16288 },
16289 }
16290 target := &ret
16291 b, err := gensupport.DecodeResponseBytes(target, res)
16292 if err != nil {
16293 return nil, err
16294 }
16295 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.patch", "response", internallog.HTTPResponse(res, b))
16296 return ret, nil
16297 }