Debian Codegraph @

gkehub/v1/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/v1"
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/v1"
52
53 import (
54 "bytes"
55 "context"
56 "encoding/json"
57 "errors"
58 "fmt"
59 "io"
60 "log/slog"
61 "net/http"
62 "net/url"
63 "strconv"
64 "strings"
65
66 "github.com/googleapis/gax-go/v2/internallog"
67 googleapi "google.golang.org/api/googleapi"
68 internal "google.golang.org/api/internal"
69 gensupport "google.golang.org/api/internal/gensupport"
70 option "google.golang.org/api/option"
71 internaloption "google.golang.org/api/option/internaloption"
72 htransport "google.golang.org/api/transport/http"
73 )
74
75 // Always reference these packages, just in case the auto-generated code
76 // below doesn't.
77 var _ = bytes.NewBuffer
78 var _ = strconv.Itoa
79 var _ = fmt.Sprintf
80 var _ = json.NewDecoder
81 var _ = io.Copy
82 var _ = url.Parse
83 var _ = gensupport.MarshalJSON
84 var _ = googleapi.Version
85 var _ = errors.New
86 var _ = strings.Replace
87 var _ = context.Canceled
88 var _ = internaloption.WithDefaultEndpoint
89 var _ = internal.Version
90 var _ = internallog.New
91
92 const apiId = "gkehub:v1"
93 const apiName = "gkehub"
94 const apiVersion = "v1"
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.Scopes = NewProjectsLocationsScopesService(s)
212 return rs
213 }
214
215 type ProjectsLocationsService struct {
216 s *Service
217
218 Features *ProjectsLocationsFeaturesService
219
220 Fleets *ProjectsLocationsFleetsService
221
222 Memberships *ProjectsLocationsMembershipsService
223
224 Operations *ProjectsLocationsOperationsService
225
226 Scopes *ProjectsLocationsScopesService
227 }
228
229 func NewProjectsLocationsFeaturesService(s *Service) *ProjectsLocationsFeaturesService {
230 rs := &ProjectsLocationsFeaturesService{s: s}
231 return rs
232 }
233
234 type ProjectsLocationsFeaturesService struct {
235 s *Service
236 }
237
238 func NewProjectsLocationsFleetsService(s *Service) *ProjectsLocationsFleetsService {
239 rs := &ProjectsLocationsFleetsService{s: s}
240 return rs
241 }
242
243 type ProjectsLocationsFleetsService struct {
244 s *Service
245 }
246
247 func NewProjectsLocationsMembershipsService(s *Service) *ProjectsLocationsMembershipsService {
248 rs := &ProjectsLocationsMembershipsService{s: s}
249 rs.Bindings = NewProjectsLocationsMembershipsBindingsService(s)
250 rs.Rbacrolebindings = NewProjectsLocationsMembershipsRbacrolebindingsService(s)
251 return rs
252 }
253
254 type ProjectsLocationsMembershipsService struct {
255 s *Service
256
257 Bindings *ProjectsLocationsMembershipsBindingsService
258
259 Rbacrolebindings *ProjectsLocationsMembershipsRbacrolebindingsService
260 }
261
262 func NewProjectsLocationsMembershipsBindingsService(s *Service) *ProjectsLocationsMembershipsBindingsService {
263 rs := &ProjectsLocationsMembershipsBindingsService{s: s}
264 return rs
265 }
266
267 type ProjectsLocationsMembershipsBindingsService struct {
268 s *Service
269 }
270
271 func NewProjectsLocationsMembershipsRbacrolebindingsService(s *Service) *ProjectsLocationsMembershipsRbacrolebindingsService {
272 rs := &ProjectsLocationsMembershipsRbacrolebindingsService{s: s}
273 return rs
274 }
275
276 type ProjectsLocationsMembershipsRbacrolebindingsService struct {
277 s *Service
278 }
279
280 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
281 rs := &ProjectsLocationsOperationsService{s: s}
282 return rs
283 }
284
285 type ProjectsLocationsOperationsService struct {
286 s *Service
287 }
288
289 func NewProjectsLocationsScopesService(s *Service) *ProjectsLocationsScopesService {
290 rs := &ProjectsLocationsScopesService{s: s}
291 rs.Namespaces = NewProjectsLocationsScopesNamespacesService(s)
292 rs.Rbacrolebindings = NewProjectsLocationsScopesRbacrolebindingsService(s)
293 return rs
294 }
295
296 type ProjectsLocationsScopesService struct {
297 s *Service
298
299 Namespaces *ProjectsLocationsScopesNamespacesService
300
301 Rbacrolebindings *ProjectsLocationsScopesRbacrolebindingsService
302 }
303
304 func NewProjectsLocationsScopesNamespacesService(s *Service) *ProjectsLocationsScopesNamespacesService {
305 rs := &ProjectsLocationsScopesNamespacesService{s: s}
306 return rs
307 }
308
309 type ProjectsLocationsScopesNamespacesService struct {
310 s *Service
311 }
312
313 func NewProjectsLocationsScopesRbacrolebindingsService(s *Service) *ProjectsLocationsScopesRbacrolebindingsService {
314 rs := &ProjectsLocationsScopesRbacrolebindingsService{s: s}
315 return rs
316 }
317
318 type ProjectsLocationsScopesRbacrolebindingsService struct {
319 s *Service
320 }
321
322 // AppDevExperienceFeatureSpec: Spec for App Dev Experience Feature.
323 type AppDevExperienceFeatureSpec struct {
324 }
325
326 // AppDevExperienceFeatureState: State for App Dev Exp Feature.
327 type AppDevExperienceFeatureState struct {
328 // NetworkingInstallSucceeded: Status of subcomponent that detects configured
329 // Service Mesh resources.
330 NetworkingInstallSucceeded *Status `json:"networkingInstallSucceeded,omitempty"`
331 // ForceSendFields is a list of field names (e.g. "NetworkingInstallSucceeded")
332 // to unconditionally include in API requests. By default, fields with empty or
333 // default values are omitted from API requests. See
334 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
335 // details.
336 ForceSendFields []string `json:"-"`
337 // NullFields is a list of field names (e.g. "NetworkingInstallSucceeded") to
338 // include in API requests with the JSON null value. By default, fields with
339 // empty values are omitted from API requests. See
340 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
341 NullFields []string `json:"-"`
342 }
343
344 func (s AppDevExperienceFeatureState) MarshalJSON() ([]byte, error) {
345 type NoMethod AppDevExperienceFeatureState
346 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
347 }
348
349 // ApplianceCluster: ApplianceCluster contains information specific to GDC Edge
350 // Appliance Clusters.
351 type ApplianceCluster struct {
352 // ResourceLink: Immutable. Self-link of the Google Cloud resource for the
353 // Appliance Cluster. For example:
354 // //transferappliance.googleapis.com/projects/my-project/locations/us-west1-a/a
355 // ppliances/my-appliance
356 ResourceLink string `json:"resourceLink,omitempty"`
357 // ForceSendFields is a list of field names (e.g. "ResourceLink") to
358 // unconditionally include in API requests. By default, fields with empty or
359 // default values are omitted from API requests. See
360 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
361 // details.
362 ForceSendFields []string `json:"-"`
363 // NullFields is a list of field names (e.g. "ResourceLink") to include in API
364 // requests with the JSON null value. By default, fields with empty values are
365 // omitted from API requests. See
366 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
367 NullFields []string `json:"-"`
368 }
369
370 func (s ApplianceCluster) MarshalJSON() ([]byte, error) {
371 type NoMethod ApplianceCluster
372 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
373 }
374
375 // AuditConfig: Specifies the audit configuration for a service. The
376 // configuration determines which permission types are logged, and what
377 // identities, if any, are exempted from logging. An AuditConfig must have one
378 // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
379 // and a specific service, the union of the two AuditConfigs is used for that
380 // service: the log_types specified in each AuditConfig are enabled, and the
381 // exempted_members in each AuditLogConfig are exempted. Example Policy with
382 // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
383 // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
384 // "user:[email protected]" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
385 // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
386 // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
387 // "DATA_WRITE", "exempted_members": [ "user:[email protected]" ] } ] } ] } For
388 // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
389 // logging. It also exempts `[email protected]` from DATA_READ logging, and
390 // `[email protected]` from DATA_WRITE logging.
391 type AuditConfig struct {
392 // AuditLogConfigs: The configuration for logging of each type of permission.
393 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
394 // Service: Specifies a service that will be enabled for audit logging. For
395 // example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
396 // is a special value that covers all services.
397 Service string `json:"service,omitempty"`
398 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
399 // unconditionally include in API requests. By default, fields with empty or
400 // default values are omitted from API requests. See
401 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
402 // details.
403 ForceSendFields []string `json:"-"`
404 // NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
405 // API requests with the JSON null value. By default, fields with empty values
406 // are omitted from API requests. See
407 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
408 NullFields []string `json:"-"`
409 }
410
411 func (s AuditConfig) MarshalJSON() ([]byte, error) {
412 type NoMethod AuditConfig
413 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
414 }
415
416 // AuditLogConfig: Provides the configuration for logging a type of
417 // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
418 // "exempted_members": [ "user:[email protected]" ] }, { "log_type":
419 // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
420 // exempting [email protected] from DATA_READ logging.
421 type AuditLogConfig struct {
422 // ExemptedMembers: Specifies the identities that do not cause logging for this
423 // type of permission. Follows the same format of Binding.members.
424 ExemptedMembers []string `json:"exemptedMembers,omitempty"`
425 // LogType: The log type that this config enables.
426 //
427 // Possible values:
428 // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
429 // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
430 // "DATA_WRITE" - Data writes. Example: CloudSQL Users create
431 // "DATA_READ" - Data reads. Example: CloudSQL Users list
432 LogType string `json:"logType,omitempty"`
433 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
434 // unconditionally include in API requests. By default, fields with empty or
435 // default values are omitted from API requests. See
436 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
437 // details.
438 ForceSendFields []string `json:"-"`
439 // NullFields is a list of field names (e.g. "ExemptedMembers") to include in
440 // API requests with the JSON null value. By default, fields with empty values
441 // are omitted from API requests. See
442 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
443 NullFields []string `json:"-"`
444 }
445
446 func (s AuditLogConfig) MarshalJSON() ([]byte, error) {
447 type NoMethod AuditLogConfig
448 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
449 }
450
451 // Authority: Authority encodes how Google will recognize identities from this
452 // Membership. See the workload identity documentation for more details:
453 // https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity
454 type Authority struct {
455 // IdentityProvider: Output only. An identity provider that reflects the
456 // `issuer` in the workload identity pool.
457 IdentityProvider string `json:"identityProvider,omitempty"`
458 // Issuer: Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start
459 // with `https://` and be a valid URL with length <2000 characters, it must use
460 // `location` rather than `zone` for GKE clusters. If set, then Google will
461 // allow valid OIDC tokens from this issuer to authenticate within the
462 // workload_identity_pool. OIDC discovery will be performed on this URI to
463 // validate tokens from the issuer. Clearing `issuer` disables Workload
464 // Identity. `issuer` cannot be directly modified; it must be cleared (and
465 // Workload Identity disabled) before using a new issuer (and re-enabling
466 // Workload Identity).
467 Issuer string `json:"issuer,omitempty"`
468 // OidcJwks: Optional. OIDC verification keys for this Membership in JWKS
469 // format (RFC 7517). When this field is set, OIDC discovery will NOT be
470 // performed on `issuer`, and instead OIDC tokens will be validated using this
471 // field.
472 OidcJwks string `json:"oidcJwks,omitempty"`
473 // ScopeTenancyIdentityProvider: Optional. Output only. The identity provider
474 // for the scope-tenancy workload identity pool.
475 ScopeTenancyIdentityProvider string `json:"scopeTenancyIdentityProvider,omitempty"`
476 // ScopeTenancyWorkloadIdentityPool: Optional. Output only. The name of the
477 // scope-tenancy workload identity pool. This pool is set in the fleet-level
478 // feature.
479 ScopeTenancyWorkloadIdentityPool string `json:"scopeTenancyWorkloadIdentityPool,omitempty"`
480 // WorkloadIdentityPool: Output only. The name of the workload identity pool in
481 // which `issuer` will be recognized. There is a single Workload Identity Pool
482 // per Hub that is shared between all Memberships that belong to that Hub. For
483 // a Hub hosted in {PROJECT_ID}, the workload pool format is
484 // `{PROJECT_ID}.hub.id.goog`, although this is subject to change in newer
485 // versions of this API.
486 WorkloadIdentityPool string `json:"workloadIdentityPool,omitempty"`
487 // ForceSendFields is a list of field names (e.g. "IdentityProvider") to
488 // unconditionally include in API requests. By default, fields with empty or
489 // default values are omitted from API requests. See
490 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
491 // details.
492 ForceSendFields []string `json:"-"`
493 // NullFields is a list of field names (e.g. "IdentityProvider") to include in
494 // API requests with the JSON null value. By default, fields with empty values
495 // are omitted from API requests. See
496 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
497 NullFields []string `json:"-"`
498 }
499
500 func (s Authority) MarshalJSON() ([]byte, error) {
501 type NoMethod Authority
502 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
503 }
504
505 // BinaryAuthorizationConfig: BinaryAuthorizationConfig defines the fleet level
506 // configuration of binary authorization feature.
507 type BinaryAuthorizationConfig struct {
508 // EvaluationMode: Optional. Mode of operation for binauthz policy evaluation.
509 //
510 // Possible values:
511 // "EVALUATION_MODE_UNSPECIFIED" - Default value
512 // "DISABLED" - Disable BinaryAuthorization
513 // "POLICY_BINDINGS" - Use Binary Authorization with the policies specified
514 // in policy_bindings.
515 EvaluationMode string `json:"evaluationMode,omitempty"`
516 // PolicyBindings: Optional. Binauthz policies that apply to this cluster.
517 PolicyBindings []*PolicyBinding `json:"policyBindings,omitempty"`
518 // ForceSendFields is a list of field names (e.g. "EvaluationMode") to
519 // unconditionally include in API requests. By default, fields with empty or
520 // default values are omitted from API requests. See
521 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
522 // details.
523 ForceSendFields []string `json:"-"`
524 // NullFields is a list of field names (e.g. "EvaluationMode") to include in
525 // API requests with the JSON null value. By default, fields with empty values
526 // are omitted from API requests. See
527 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
528 NullFields []string `json:"-"`
529 }
530
531 func (s BinaryAuthorizationConfig) MarshalJSON() ([]byte, error) {
532 type NoMethod BinaryAuthorizationConfig
533 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
534 }
535
536 // Binding: Associates `members`, or principals, with a `role`.
537 type Binding struct {
538 // Condition: The condition that is associated with this binding. If the
539 // condition evaluates to `true`, then this binding applies to the current
540 // request. If the condition evaluates to `false`, then this binding does not
541 // apply to the current request. However, a different role binding might grant
542 // the same role to one or more of the principals in this binding. To learn
543 // which resources support conditions in their IAM policies, see the IAM
544 // documentation
545 // (https://cloud.google.com/iam/help/conditions/resource-policies).
546 Condition *Expr `json:"condition,omitempty"`
547 // Members: Specifies the principals requesting access for a Google Cloud
548 // resource. `members` can have the following values: * `allUsers`: A special
549 // identifier that represents anyone who is on the internet; with or without a
550 // Google account. * `allAuthenticatedUsers`: A special identifier that
551 // represents anyone who is authenticated with a Google account or a service
552 // account. Does not include identities that come from external identity
553 // providers (IdPs) through identity federation. * `user:{emailid}`: An email
554 // address that represents a specific Google account. For example,
555 // `[email protected]` . * `serviceAccount:{emailid}`: An email address that
556 // represents a Google service account. For example,
557 // `[email protected]`. *
558 // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
559 // identifier for a Kubernetes service account
560 // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
561 // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
562 // `group:{emailid}`: An email address that represents a Google group. For
563 // example, `[email protected]`. * `domain:{domain}`: The G Suite domain
564 // (primary) that represents all the users of that domain. For example,
565 // `google.com` or `example.com`. *
566 // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
567 // ject/{subject_attribute_value}`: A single identity in a workforce identity
568 // pool. *
569 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
570 // group/{group_id}`: All workforce identities in a group. *
571 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
572 // attribute.{attribute_name}/{attribute_value}`: All workforce identities with
573 // a specific attribute value. *
574 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
575 // *`: All identities in a workforce identity pool. *
576 // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
577 // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
578 // identity in a workload identity pool. *
579 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
580 // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
581 // group. *
582 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
583 // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
584 // `: All identities in a workload identity pool with a certain attribute. *
585 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
586 // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
587 // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
588 // unique identifier) representing a user that has been recently deleted. For
589 // example, `[email protected]?uid=123456789012345678901`. If the user is
590 // recovered, this value reverts to `user:{emailid}` and the recovered user
591 // retains the role in the binding. *
592 // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
593 // unique identifier) representing a service account that has been recently
594 // deleted. For example,
595 // `[email protected]?uid=123456789012345678901`. If the
596 // service account is undeleted, this value reverts to
597 // `serviceAccount:{emailid}` and the undeleted service account retains the
598 // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
599 // address (plus unique identifier) representing a Google group that has been
600 // recently deleted. For example,
601 // `[email protected]?uid=123456789012345678901`. If the group is recovered,
602 // this value reverts to `group:{emailid}` and the recovered group retains the
603 // role in the binding. *
604 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
605 // _id}/subject/{subject_attribute_value}`: Deleted single identity in a
606 // workforce identity pool. For example,
607 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
608 // ol-id/subject/my-subject-attribute-value`.
609 Members []string `json:"members,omitempty"`
610 // Role: Role that is assigned to the list of `members`, or principals. For
611 // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
612 // of the IAM roles and permissions, see the IAM documentation
613 // (https://cloud.google.com/iam/docs/roles-overview). For a list of the
614 // available pre-defined roles, see here
615 // (https://cloud.google.com/iam/docs/understanding-roles).
616 Role string `json:"role,omitempty"`
617 // ForceSendFields is a list of field names (e.g. "Condition") to
618 // unconditionally include in API requests. By default, fields with empty or
619 // default values are omitted from API requests. See
620 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
621 // details.
622 ForceSendFields []string `json:"-"`
623 // NullFields is a list of field names (e.g. "Condition") to include in API
624 // requests with the JSON null value. By default, fields with empty values are
625 // omitted from API requests. See
626 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
627 NullFields []string `json:"-"`
628 }
629
630 func (s Binding) MarshalJSON() ([]byte, error) {
631 type NoMethod Binding
632 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
633 }
634
635 // CancelOperationRequest: The request message for Operations.CancelOperation.
636 type CancelOperationRequest struct {
637 }
638
639 // ClusterUpgradeFleetSpec: **ClusterUpgrade**: The configuration for the
640 // fleet-level ClusterUpgrade feature.
641 type ClusterUpgradeFleetSpec struct {
642 // GkeUpgradeOverrides: Allow users to override some properties of each GKE
643 // upgrade.
644 GkeUpgradeOverrides []*ClusterUpgradeGKEUpgradeOverride `json:"gkeUpgradeOverrides,omitempty"`
645 // PostConditions: Required. Post conditions to evaluate to mark an upgrade
646 // COMPLETE. Required.
647 PostConditions *ClusterUpgradePostConditions `json:"postConditions,omitempty"`
648 // UpstreamFleets: This fleet consumes upgrades that have COMPLETE status code
649 // in the upstream fleets. See UpgradeStatus.Code for code definitions. The
650 // fleet name should be either fleet project number or id. This is defined as
651 // repeated for future proof reasons. Initial implementation will enforce at
652 // most one upstream fleet.
653 UpstreamFleets []string `json:"upstreamFleets,omitempty"`
654 // ForceSendFields is a list of field names (e.g. "GkeUpgradeOverrides") to
655 // unconditionally include in API requests. By default, fields with empty or
656 // default values are omitted from API requests. See
657 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
658 // details.
659 ForceSendFields []string `json:"-"`
660 // NullFields is a list of field names (e.g. "GkeUpgradeOverrides") to include
661 // in API requests with the JSON null value. By default, fields with empty
662 // values are omitted from API requests. See
663 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
664 NullFields []string `json:"-"`
665 }
666
667 func (s ClusterUpgradeFleetSpec) MarshalJSON() ([]byte, error) {
668 type NoMethod ClusterUpgradeFleetSpec
669 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
670 }
671
672 // ClusterUpgradeFleetState: **ClusterUpgrade**: The state for the fleet-level
673 // ClusterUpgrade feature.
674 type ClusterUpgradeFleetState struct {
675 // DownstreamFleets: This fleets whose upstream_fleets contain the current
676 // fleet. The fleet name should be either fleet project number or id.
677 DownstreamFleets []string `json:"downstreamFleets,omitempty"`
678 // GkeState: Feature state for GKE clusters.
679 GkeState *ClusterUpgradeGKEUpgradeFeatureState `json:"gkeState,omitempty"`
680 // Ignored: A list of memberships ignored by the feature. For example, manually
681 // upgraded clusters can be ignored if they are newer than the default versions
682 // of its release channel. The membership resource is in the format:
683 // `projects/{p}/locations/{l}/membership/{m}`.
684 Ignored map[string]ClusterUpgradeIgnoredMembership `json:"ignored,omitempty"`
685 // ForceSendFields is a list of field names (e.g. "DownstreamFleets") to
686 // unconditionally include in API requests. By default, fields with empty or
687 // default values are omitted from API requests. See
688 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
689 // details.
690 ForceSendFields []string `json:"-"`
691 // NullFields is a list of field names (e.g. "DownstreamFleets") to include in
692 // API requests with the JSON null value. By default, fields with empty values
693 // are omitted from API requests. See
694 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
695 NullFields []string `json:"-"`
696 }
697
698 func (s ClusterUpgradeFleetState) MarshalJSON() ([]byte, error) {
699 type NoMethod ClusterUpgradeFleetState
700 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
701 }
702
703 // ClusterUpgradeGKEUpgrade: GKEUpgrade represents a GKE provided upgrade,
704 // e.g., control plane upgrade.
705 type ClusterUpgradeGKEUpgrade struct {
706 // Name: Name of the upgrade, e.g., "k8s_control_plane". It should be a valid
707 // upgrade name. It must not exceet 99 characters.
708 Name string `json:"name,omitempty"`
709 // Version: Version of the upgrade, e.g., "1.22.1-gke.100". It should be a
710 // valid version. It must not exceet 99 characters.
711 Version string `json:"version,omitempty"`
712 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
713 // include in API requests. By default, fields with empty or default values are
714 // omitted from API requests. See
715 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
716 // details.
717 ForceSendFields []string `json:"-"`
718 // NullFields is a list of field names (e.g. "Name") to include in API requests
719 // with the JSON null value. By default, fields with empty values are omitted
720 // from API requests. See
721 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
722 NullFields []string `json:"-"`
723 }
724
725 func (s ClusterUpgradeGKEUpgrade) MarshalJSON() ([]byte, error) {
726 type NoMethod ClusterUpgradeGKEUpgrade
727 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
728 }
729
730 // ClusterUpgradeGKEUpgradeFeatureCondition: GKEUpgradeFeatureCondition
731 // describes the condition of the feature for GKE clusters at a certain point
732 // of time.
733 type ClusterUpgradeGKEUpgradeFeatureCondition struct {
734 // Reason: Reason why the feature is in this status.
735 Reason string `json:"reason,omitempty"`
736 // Status: Status of the condition, one of True, False, Unknown.
737 Status string `json:"status,omitempty"`
738 // Type: Type of the condition, for example, "ready".
739 Type string `json:"type,omitempty"`
740 // UpdateTime: Last timestamp the condition was updated.
741 UpdateTime string `json:"updateTime,omitempty"`
742 // ForceSendFields is a list of field names (e.g. "Reason") to unconditionally
743 // include in API requests. By default, fields with empty or default values are
744 // omitted from API requests. See
745 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
746 // details.
747 ForceSendFields []string `json:"-"`
748 // NullFields is a list of field names (e.g. "Reason") to include in API
749 // requests with the JSON null value. By default, fields with empty values are
750 // omitted from API requests. See
751 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
752 NullFields []string `json:"-"`
753 }
754
755 func (s ClusterUpgradeGKEUpgradeFeatureCondition) MarshalJSON() ([]byte, error) {
756 type NoMethod ClusterUpgradeGKEUpgradeFeatureCondition
757 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
758 }
759
760 // ClusterUpgradeGKEUpgradeFeatureState: GKEUpgradeFeatureState contains
761 // feature states for GKE clusters in the scope.
762 type ClusterUpgradeGKEUpgradeFeatureState struct {
763 // Conditions: Current conditions of the feature.
764 Conditions []*ClusterUpgradeGKEUpgradeFeatureCondition `json:"conditions,omitempty"`
765 // UpgradeState: Upgrade state. It will eventually replace `state`.
766 UpgradeState []*ClusterUpgradeGKEUpgradeState `json:"upgradeState,omitempty"`
767 // ForceSendFields is a list of field names (e.g. "Conditions") to
768 // unconditionally include in API requests. By default, fields with empty or
769 // default values are omitted from API requests. See
770 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
771 // details.
772 ForceSendFields []string `json:"-"`
773 // NullFields is a list of field names (e.g. "Conditions") to include in API
774 // requests with the JSON null value. By default, fields with empty values are
775 // omitted from API requests. See
776 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
777 NullFields []string `json:"-"`
778 }
779
780 func (s ClusterUpgradeGKEUpgradeFeatureState) MarshalJSON() ([]byte, error) {
781 type NoMethod ClusterUpgradeGKEUpgradeFeatureState
782 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
783 }
784
785 // ClusterUpgradeGKEUpgradeOverride: Properties of a GKE upgrade that can be
786 // overridden by the user. For example, a user can skip soaking by overriding
787 // the soaking to 0.
788 type ClusterUpgradeGKEUpgradeOverride struct {
789 // PostConditions: Required. Post conditions to override for the specified
790 // upgrade (name + version). Required.
791 PostConditions *ClusterUpgradePostConditions `json:"postConditions,omitempty"`
792 // Upgrade: Required. Which upgrade to override. Required.
793 Upgrade *ClusterUpgradeGKEUpgrade `json:"upgrade,omitempty"`
794 // ForceSendFields is a list of field names (e.g. "PostConditions") to
795 // unconditionally include in API requests. By default, fields with empty or
796 // default values are omitted from API requests. See
797 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
798 // details.
799 ForceSendFields []string `json:"-"`
800 // NullFields is a list of field names (e.g. "PostConditions") to include in
801 // API requests with the JSON null value. By default, fields with empty values
802 // are omitted from API requests. See
803 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
804 NullFields []string `json:"-"`
805 }
806
807 func (s ClusterUpgradeGKEUpgradeOverride) MarshalJSON() ([]byte, error) {
808 type NoMethod ClusterUpgradeGKEUpgradeOverride
809 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
810 }
811
812 // ClusterUpgradeGKEUpgradeState: GKEUpgradeState is a GKEUpgrade and its state
813 // at the scope and fleet level.
814 type ClusterUpgradeGKEUpgradeState struct {
815 // Stats: Number of GKE clusters in each status code.
816 Stats map[string]string `json:"stats,omitempty"`
817 // Status: Status of the upgrade.
818 Status *ClusterUpgradeUpgradeStatus `json:"status,omitempty"`
819 // Upgrade: Which upgrade to track the state.
820 Upgrade *ClusterUpgradeGKEUpgrade `json:"upgrade,omitempty"`
821 // ForceSendFields is a list of field names (e.g. "Stats") to unconditionally
822 // include in API requests. By default, fields with empty or default values are
823 // omitted from API requests. See
824 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
825 // details.
826 ForceSendFields []string `json:"-"`
827 // NullFields is a list of field names (e.g. "Stats") to include in API
828 // requests with the JSON null value. By default, fields with empty values are
829 // omitted from API requests. See
830 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
831 NullFields []string `json:"-"`
832 }
833
834 func (s ClusterUpgradeGKEUpgradeState) MarshalJSON() ([]byte, error) {
835 type NoMethod ClusterUpgradeGKEUpgradeState
836 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
837 }
838
839 // ClusterUpgradeIgnoredMembership: IgnoredMembership represents a membership
840 // ignored by the feature. A membership can be ignored because it was manually
841 // upgraded to a newer version than RC default.
842 type ClusterUpgradeIgnoredMembership struct {
843 // IgnoredTime: Time when the membership was first set to ignored.
844 IgnoredTime string `json:"ignoredTime,omitempty"`
845 // Reason: Reason why the membership is ignored.
846 Reason string `json:"reason,omitempty"`
847 // ForceSendFields is a list of field names (e.g. "IgnoredTime") to
848 // unconditionally include in API requests. By default, fields with empty or
849 // default values are omitted from API requests. See
850 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
851 // details.
852 ForceSendFields []string `json:"-"`
853 // NullFields is a list of field names (e.g. "IgnoredTime") to include in API
854 // requests with the JSON null value. By default, fields with empty values are
855 // omitted from API requests. See
856 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
857 NullFields []string `json:"-"`
858 }
859
860 func (s ClusterUpgradeIgnoredMembership) MarshalJSON() ([]byte, error) {
861 type NoMethod ClusterUpgradeIgnoredMembership
862 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
863 }
864
865 // ClusterUpgradeMembershipGKEUpgradeState: ScopeGKEUpgradeState is a
866 // GKEUpgrade and its state per-membership.
867 type ClusterUpgradeMembershipGKEUpgradeState struct {
868 // Status: Status of the upgrade.
869 Status *ClusterUpgradeUpgradeStatus `json:"status,omitempty"`
870 // Upgrade: Which upgrade to track the state.
871 Upgrade *ClusterUpgradeGKEUpgrade `json:"upgrade,omitempty"`
872 // ForceSendFields is a list of field names (e.g. "Status") to unconditionally
873 // include in API requests. By default, fields with empty or default values are
874 // omitted from API requests. See
875 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
876 // details.
877 ForceSendFields []string `json:"-"`
878 // NullFields is a list of field names (e.g. "Status") to include in API
879 // requests with the JSON null value. By default, fields with empty values are
880 // omitted from API requests. See
881 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
882 NullFields []string `json:"-"`
883 }
884
885 func (s ClusterUpgradeMembershipGKEUpgradeState) MarshalJSON() ([]byte, error) {
886 type NoMethod ClusterUpgradeMembershipGKEUpgradeState
887 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
888 }
889
890 // ClusterUpgradeMembershipState: Per-membership state for this feature.
891 type ClusterUpgradeMembershipState struct {
892 // Ignored: Whether this membership is ignored by the feature. For example,
893 // manually upgraded clusters can be ignored if they are newer than the default
894 // versions of its release channel.
895 Ignored *ClusterUpgradeIgnoredMembership `json:"ignored,omitempty"`
896 // Upgrades: Actual upgrade state against desired.
897 Upgrades []*ClusterUpgradeMembershipGKEUpgradeState `json:"upgrades,omitempty"`
898 // ForceSendFields is a list of field names (e.g. "Ignored") to unconditionally
899 // include in API requests. By default, fields with empty or default values are
900 // omitted from API requests. See
901 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
902 // details.
903 ForceSendFields []string `json:"-"`
904 // NullFields is a list of field names (e.g. "Ignored") to include in API
905 // requests with the JSON null value. By default, fields with empty values are
906 // omitted from API requests. See
907 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
908 NullFields []string `json:"-"`
909 }
910
911 func (s ClusterUpgradeMembershipState) MarshalJSON() ([]byte, error) {
912 type NoMethod ClusterUpgradeMembershipState
913 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
914 }
915
916 // ClusterUpgradePostConditions: Post conditional checks after an upgrade has
917 // been applied on all eligible clusters.
918 type ClusterUpgradePostConditions struct {
919 // Soaking: Required. Amount of time to "soak" after a rollout has been
920 // finished before marking it COMPLETE. Cannot exceed 30 days. Required.
921 Soaking string `json:"soaking,omitempty"`
922 // ForceSendFields is a list of field names (e.g. "Soaking") to unconditionally
923 // include in API requests. By default, fields with empty or default values are
924 // omitted from API requests. See
925 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
926 // details.
927 ForceSendFields []string `json:"-"`
928 // NullFields is a list of field names (e.g. "Soaking") to include in API
929 // requests with the JSON null value. By default, fields with empty values are
930 // omitted from API requests. See
931 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
932 NullFields []string `json:"-"`
933 }
934
935 func (s ClusterUpgradePostConditions) MarshalJSON() ([]byte, error) {
936 type NoMethod ClusterUpgradePostConditions
937 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
938 }
939
940 // ClusterUpgradeUpgradeStatus: UpgradeStatus provides status information for
941 // each upgrade.
942 type ClusterUpgradeUpgradeStatus struct {
943 // Code: Status code of the upgrade.
944 //
945 // Possible values:
946 // "CODE_UNSPECIFIED" - Required by https://linter.aip.dev/126/unspecified.
947 // "INELIGIBLE" - The upgrade is ineligible. At the scope level, this means
948 // the upgrade is ineligible for all the clusters in the scope.
949 // "PENDING" - The upgrade is pending. At the scope level, this means the
950 // upgrade is pending for all the clusters in the scope.
951 // "IN_PROGRESS" - The upgrade is in progress. At the scope level, this means
952 // the upgrade is in progress for at least one cluster in the scope.
953 // "SOAKING" - The upgrade has finished and is soaking until the soaking time
954 // is up. At the scope level, this means at least one cluster is in soaking
955 // while the rest are either soaking or complete.
956 // "FORCED_SOAKING" - A cluster will be forced to enter soaking if an upgrade
957 // doesn't finish within a certain limit, despite it's actual status.
958 // "COMPLETE" - The upgrade has passed all post conditions (soaking). At the
959 // scope level, this means all eligible clusters are in COMPLETE status.
960 Code string `json:"code,omitempty"`
961 // Reason: Reason for this status.
962 Reason string `json:"reason,omitempty"`
963 // UpdateTime: Last timestamp the status was updated.
964 UpdateTime string `json:"updateTime,omitempty"`
965 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
966 // include in API requests. By default, fields with empty or default values are
967 // omitted from API requests. See
968 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
969 // details.
970 ForceSendFields []string `json:"-"`
971 // NullFields is a list of field names (e.g. "Code") to include in API requests
972 // with the JSON null value. By default, fields with empty values are omitted
973 // from API requests. See
974 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
975 NullFields []string `json:"-"`
976 }
977
978 func (s ClusterUpgradeUpgradeStatus) MarshalJSON() ([]byte, error) {
979 type NoMethod ClusterUpgradeUpgradeStatus
980 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
981 }
982
983 // CommonFeatureSpec: CommonFeatureSpec contains Fleet-wide configuration
984 // information
985 type CommonFeatureSpec struct {
986 // Appdevexperience: Appdevexperience specific spec.
987 Appdevexperience *AppDevExperienceFeatureSpec `json:"appdevexperience,omitempty"`
988 // Clusterupgrade: ClusterUpgrade (fleet-based) feature spec.
989 Clusterupgrade *ClusterUpgradeFleetSpec `json:"clusterupgrade,omitempty"`
990 // Dataplanev2: DataplaneV2 feature spec.
991 Dataplanev2 *DataplaneV2FeatureSpec `json:"dataplanev2,omitempty"`
992 // Fleetobservability: FleetObservability feature spec.
993 Fleetobservability *FleetObservabilityFeatureSpec `json:"fleetobservability,omitempty"`
994 // Multiclusteringress: Multicluster Ingress-specific spec.
995 Multiclusteringress *MultiClusterIngressFeatureSpec `json:"multiclusteringress,omitempty"`
996 // Rbacrolebindingactuation: RBAC Role Binding Actuation feature spec
997 Rbacrolebindingactuation *RBACRoleBindingActuationFeatureSpec `json:"rbacrolebindingactuation,omitempty"`
998 // Workloadidentity: Workload Identity feature spec.
999 Workloadidentity *WorkloadIdentityFeatureSpec `json:"workloadidentity,omitempty"`
1000 // ForceSendFields is a list of field names (e.g. "Appdevexperience") to
1001 // unconditionally include in API requests. By default, fields with empty or
1002 // default values are omitted from API requests. See
1003 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1004 // details.
1005 ForceSendFields []string `json:"-"`
1006 // NullFields is a list of field names (e.g. "Appdevexperience") to include in
1007 // API requests with the JSON null value. By default, fields with empty values
1008 // are omitted from API requests. See
1009 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1010 NullFields []string `json:"-"`
1011 }
1012
1013 func (s CommonFeatureSpec) MarshalJSON() ([]byte, error) {
1014 type NoMethod CommonFeatureSpec
1015 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1016 }
1017
1018 // CommonFeatureState: CommonFeatureState contains Fleet-wide Feature status
1019 // information.
1020 type CommonFeatureState struct {
1021 // Appdevexperience: Appdevexperience specific state.
1022 Appdevexperience *AppDevExperienceFeatureState `json:"appdevexperience,omitempty"`
1023 // Clusterupgrade: ClusterUpgrade fleet-level state.
1024 Clusterupgrade *ClusterUpgradeFleetState `json:"clusterupgrade,omitempty"`
1025 // Fleetobservability: FleetObservability feature state.
1026 Fleetobservability *FleetObservabilityFeatureState `json:"fleetobservability,omitempty"`
1027 // Rbacrolebindingactuation: RBAC Role Binding Actuation feature state
1028 Rbacrolebindingactuation *RBACRoleBindingActuationFeatureState `json:"rbacrolebindingactuation,omitempty"`
1029 // State: Output only. The "running state" of the Feature in this Fleet.
1030 State *FeatureState `json:"state,omitempty"`
1031 // Workloadidentity: WorkloadIdentity fleet-level state.
1032 Workloadidentity *WorkloadIdentityFeatureState `json:"workloadidentity,omitempty"`
1033 // ForceSendFields is a list of field names (e.g. "Appdevexperience") to
1034 // unconditionally include in API requests. By default, fields with empty or
1035 // default values are omitted from API requests. See
1036 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1037 // details.
1038 ForceSendFields []string `json:"-"`
1039 // NullFields is a list of field names (e.g. "Appdevexperience") to include in
1040 // API requests with the JSON null value. By default, fields with empty values
1041 // are omitted from API requests. See
1042 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1043 NullFields []string `json:"-"`
1044 }
1045
1046 func (s CommonFeatureState) MarshalJSON() ([]byte, error) {
1047 type NoMethod CommonFeatureState
1048 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1049 }
1050
1051 // CommonFleetDefaultMemberConfigSpec: CommonFleetDefaultMemberConfigSpec
1052 // contains default configuration information for memberships of a fleet
1053 type CommonFleetDefaultMemberConfigSpec struct {
1054 // Configmanagement: Config Management-specific spec.
1055 Configmanagement *ConfigManagementMembershipSpec `json:"configmanagement,omitempty"`
1056 // Identityservice: Identity Service-specific spec.
1057 Identityservice *IdentityServiceMembershipSpec `json:"identityservice,omitempty"`
1058 // Mesh: Anthos Service Mesh-specific spec
1059 Mesh *ServiceMeshMembershipSpec `json:"mesh,omitempty"`
1060 // Policycontroller: Policy Controller spec.
1061 Policycontroller *PolicyControllerMembershipSpec `json:"policycontroller,omitempty"`
1062 // ForceSendFields is a list of field names (e.g. "Configmanagement") to
1063 // unconditionally include in API requests. By default, fields with empty or
1064 // default values are omitted from API requests. See
1065 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1066 // details.
1067 ForceSendFields []string `json:"-"`
1068 // NullFields is a list of field names (e.g. "Configmanagement") to include in
1069 // API requests with the JSON null value. By default, fields with empty values
1070 // are omitted from API requests. See
1071 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1072 NullFields []string `json:"-"`
1073 }
1074
1075 func (s CommonFleetDefaultMemberConfigSpec) MarshalJSON() ([]byte, error) {
1076 type NoMethod CommonFleetDefaultMemberConfigSpec
1077 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1078 }
1079
1080 // CompliancePostureConfig: Deprecated: Compliance Posture is no longer
1081 // supported. For more details, see
1082 // https://cloud.google.com/kubernetes-engine/docs/deprecations/posture-management-deprecation.
1083 // CompliancePostureConfig defines the settings needed to enable/disable
1084 // features for the Compliance Posture.
1085 type CompliancePostureConfig struct {
1086 // ComplianceStandards: List of enabled compliance standards.
1087 ComplianceStandards []*ComplianceStandard `json:"complianceStandards,omitempty"`
1088 // Mode: Defines the enablement mode for Compliance Posture.
1089 //
1090 // Possible values:
1091 // "MODE_UNSPECIFIED" - Default value not specified.
1092 // "DISABLED" - Disables Compliance Posture features on the cluster.
1093 // "ENABLED" - Enables Compliance Posture features on the cluster.
1094 Mode string `json:"mode,omitempty"`
1095 // ForceSendFields is a list of field names (e.g. "ComplianceStandards") to
1096 // unconditionally include in API requests. By default, fields with empty or
1097 // default values are omitted from API requests. See
1098 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1099 // details.
1100 ForceSendFields []string `json:"-"`
1101 // NullFields is a list of field names (e.g. "ComplianceStandards") to include
1102 // in API requests with the JSON null value. By default, fields with empty
1103 // values are omitted from API requests. See
1104 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1105 NullFields []string `json:"-"`
1106 }
1107
1108 func (s CompliancePostureConfig) MarshalJSON() ([]byte, error) {
1109 type NoMethod CompliancePostureConfig
1110 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1111 }
1112
1113 type ComplianceStandard struct {
1114 // Standard: Name of the compliance standard.
1115 Standard string `json:"standard,omitempty"`
1116 // ForceSendFields is a list of field names (e.g. "Standard") to
1117 // unconditionally include in API requests. By default, fields with empty or
1118 // default values are omitted from API requests. See
1119 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1120 // details.
1121 ForceSendFields []string `json:"-"`
1122 // NullFields is a list of field names (e.g. "Standard") to include in API
1123 // requests with the JSON null value. By default, fields with empty values are
1124 // omitted from API requests. See
1125 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1126 NullFields []string `json:"-"`
1127 }
1128
1129 func (s ComplianceStandard) MarshalJSON() ([]byte, error) {
1130 type NoMethod ComplianceStandard
1131 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1132 }
1133
1134 // ConfigManagementConfigSync: Configuration for Config Sync
1135 type ConfigManagementConfigSync struct {
1136 // DeploymentOverrides: Optional. Configuration for deployment overrides.
1137 // Applies only to Config Sync deployments with containers that are not a root
1138 // or namespace reconciler: `reconciler-manager`, `otel-collector`,
1139 // `resource-group-controller-manager`, `admission-webhook`. To override a root
1140 // or namespace reconciler, use the rootsync or reposync fields at
1141 // https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rootsync-reposync-fields#override-resources
1142 // instead.
1143 DeploymentOverrides []*ConfigManagementDeploymentOverride `json:"deploymentOverrides,omitempty"`
1144 // Enabled: Optional. Enables the installation of Config Sync. If set to true,
1145 // the Feature will manage Config Sync resources, and apply the other
1146 // ConfigSync fields if they exist. If set to false, the Feature will ignore
1147 // all other ConfigSync fields and delete the Config Sync resources. If
1148 // omitted, ConfigSync is considered enabled if the git or oci field is
1149 // present.
1150 Enabled bool `json:"enabled,omitempty"`
1151 // Git: Optional. Git repo configuration for the cluster.
1152 Git *ConfigManagementGitConfig `json:"git,omitempty"`
1153 // MetricsGcpServiceAccountEmail: Optional. The Email of the Google Cloud
1154 // Service Account (GSA) used for exporting Config Sync metrics to Cloud
1155 // Monitoring and Cloud Monarch when Workload Identity is enabled. The GSA
1156 // should have the Monitoring Metric Writer (roles/monitoring.metricWriter) IAM
1157 // role. The Kubernetes ServiceAccount `default` in the namespace
1158 // `config-management-monitoring` should be bound to the GSA. Deprecated: If
1159 // Workload Identity Federation for GKE is enabled, Google Cloud Service
1160 // Account is no longer needed for exporting Config Sync metrics:
1161 // https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/how-to/monitor-config-sync-cloud-monitoring#custom-monitoring.
1162 MetricsGcpServiceAccountEmail string `json:"metricsGcpServiceAccountEmail,omitempty"`
1163 // Oci: Optional. OCI repo configuration for the cluster
1164 Oci *ConfigManagementOciConfig `json:"oci,omitempty"`
1165 // PreventDrift: Optional. Set to true to enable the Config Sync admission
1166 // webhook to prevent drifts. If set to false, disables the Config Sync
1167 // admission webhook and does not prevent drifts. Defaults to false. See
1168 // https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/how-to/prevent-config-drift
1169 // for details.
1170 PreventDrift bool `json:"preventDrift,omitempty"`
1171 // SourceFormat: Optional. Specifies whether the Config Sync repo is in
1172 // `hierarchical` or `unstructured` mode. Defaults to `hierarchical`. See
1173 // https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/concepts/configs#organize-configs
1174 // for an explanation.
1175 SourceFormat string `json:"sourceFormat,omitempty"`
1176 // StopSyncing: Optional. Set to true to stop syncing configs for a single
1177 // cluster. Default to false.
1178 StopSyncing bool `json:"stopSyncing,omitempty"`
1179 // ForceSendFields is a list of field names (e.g. "DeploymentOverrides") to
1180 // unconditionally include in API requests. By default, fields with empty or
1181 // default values are omitted from API requests. See
1182 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1183 // details.
1184 ForceSendFields []string `json:"-"`
1185 // NullFields is a list of field names (e.g. "DeploymentOverrides") to include
1186 // in API requests with the JSON null value. By default, fields with empty
1187 // values are omitted from API requests. See
1188 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1189 NullFields []string `json:"-"`
1190 }
1191
1192 func (s ConfigManagementConfigSync) MarshalJSON() ([]byte, error) {
1193 type NoMethod ConfigManagementConfigSync
1194 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1195 }
1196
1197 // ConfigManagementConfigSyncDeploymentState: The state of ConfigSync's
1198 // deployment on a cluster
1199 type ConfigManagementConfigSyncDeploymentState struct {
1200 // AdmissionWebhook: Deployment state of admission-webhook
1201 //
1202 // Possible values:
1203 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1204 // "NOT_INSTALLED" - Deployment is not installed
1205 // "INSTALLED" - Deployment is installed
1206 // "ERROR" - Deployment was attempted to be installed, but has errors
1207 // "PENDING" - Deployment is installing or terminating
1208 AdmissionWebhook string `json:"admissionWebhook,omitempty"`
1209 // GitSync: Deployment state of the git-sync pod
1210 //
1211 // Possible values:
1212 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1213 // "NOT_INSTALLED" - Deployment is not installed
1214 // "INSTALLED" - Deployment is installed
1215 // "ERROR" - Deployment was attempted to be installed, but has errors
1216 // "PENDING" - Deployment is installing or terminating
1217 GitSync string `json:"gitSync,omitempty"`
1218 // Importer: Deployment state of the importer pod
1219 //
1220 // Possible values:
1221 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1222 // "NOT_INSTALLED" - Deployment is not installed
1223 // "INSTALLED" - Deployment is installed
1224 // "ERROR" - Deployment was attempted to be installed, but has errors
1225 // "PENDING" - Deployment is installing or terminating
1226 Importer string `json:"importer,omitempty"`
1227 // Monitor: Deployment state of the monitor pod
1228 //
1229 // Possible values:
1230 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1231 // "NOT_INSTALLED" - Deployment is not installed
1232 // "INSTALLED" - Deployment is installed
1233 // "ERROR" - Deployment was attempted to be installed, but has errors
1234 // "PENDING" - Deployment is installing or terminating
1235 Monitor string `json:"monitor,omitempty"`
1236 // OtelCollector: Deployment state of otel-collector
1237 //
1238 // Possible values:
1239 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1240 // "NOT_INSTALLED" - Deployment is not installed
1241 // "INSTALLED" - Deployment is installed
1242 // "ERROR" - Deployment was attempted to be installed, but has errors
1243 // "PENDING" - Deployment is installing or terminating
1244 OtelCollector string `json:"otelCollector,omitempty"`
1245 // ReconcilerManager: Deployment state of reconciler-manager pod
1246 //
1247 // Possible values:
1248 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1249 // "NOT_INSTALLED" - Deployment is not installed
1250 // "INSTALLED" - Deployment is installed
1251 // "ERROR" - Deployment was attempted to be installed, but has errors
1252 // "PENDING" - Deployment is installing or terminating
1253 ReconcilerManager string `json:"reconcilerManager,omitempty"`
1254 // ResourceGroupControllerManager: Deployment state of
1255 // resource-group-controller-manager
1256 //
1257 // Possible values:
1258 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1259 // "NOT_INSTALLED" - Deployment is not installed
1260 // "INSTALLED" - Deployment is installed
1261 // "ERROR" - Deployment was attempted to be installed, but has errors
1262 // "PENDING" - Deployment is installing or terminating
1263 ResourceGroupControllerManager string `json:"resourceGroupControllerManager,omitempty"`
1264 // RootReconciler: Deployment state of root-reconciler
1265 //
1266 // Possible values:
1267 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1268 // "NOT_INSTALLED" - Deployment is not installed
1269 // "INSTALLED" - Deployment is installed
1270 // "ERROR" - Deployment was attempted to be installed, but has errors
1271 // "PENDING" - Deployment is installing or terminating
1272 RootReconciler string `json:"rootReconciler,omitempty"`
1273 // Syncer: Deployment state of the syncer pod
1274 //
1275 // Possible values:
1276 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1277 // "NOT_INSTALLED" - Deployment is not installed
1278 // "INSTALLED" - Deployment is installed
1279 // "ERROR" - Deployment was attempted to be installed, but has errors
1280 // "PENDING" - Deployment is installing or terminating
1281 Syncer string `json:"syncer,omitempty"`
1282 // ForceSendFields is a list of field names (e.g. "AdmissionWebhook") to
1283 // unconditionally include in API requests. By default, fields with empty or
1284 // default values are omitted from API requests. See
1285 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1286 // details.
1287 ForceSendFields []string `json:"-"`
1288 // NullFields is a list of field names (e.g. "AdmissionWebhook") to include in
1289 // API requests with the JSON null value. By default, fields with empty values
1290 // are omitted from API requests. See
1291 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1292 NullFields []string `json:"-"`
1293 }
1294
1295 func (s ConfigManagementConfigSyncDeploymentState) MarshalJSON() ([]byte, error) {
1296 type NoMethod ConfigManagementConfigSyncDeploymentState
1297 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1298 }
1299
1300 // ConfigManagementConfigSyncError: Errors pertaining to the installation of
1301 // Config Sync
1302 type ConfigManagementConfigSyncError struct {
1303 // ErrorMessage: A string representing the user facing error message
1304 ErrorMessage string `json:"errorMessage,omitempty"`
1305 // ForceSendFields is a list of field names (e.g. "ErrorMessage") to
1306 // unconditionally include in API requests. By default, fields with empty or
1307 // default values are omitted from API requests. See
1308 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1309 // details.
1310 ForceSendFields []string `json:"-"`
1311 // NullFields is a list of field names (e.g. "ErrorMessage") to include in API
1312 // requests with the JSON null value. By default, fields with empty values are
1313 // omitted from API requests. See
1314 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1315 NullFields []string `json:"-"`
1316 }
1317
1318 func (s ConfigManagementConfigSyncError) MarshalJSON() ([]byte, error) {
1319 type NoMethod ConfigManagementConfigSyncError
1320 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1321 }
1322
1323 // ConfigManagementConfigSyncState: State information for ConfigSync
1324 type ConfigManagementConfigSyncState struct {
1325 // ClusterLevelStopSyncingState: Output only. Whether syncing resources to the
1326 // cluster is stopped at the cluster level.
1327 //
1328 // Possible values:
1329 // "STOP_SYNCING_STATE_UNSPECIFIED" - State cannot be determined
1330 // "NOT_STOPPED" - Syncing resources to the cluster is not stopped at the
1331 // cluster level.
1332 // "PENDING" - Some reconcilers stop syncing resources to the cluster, while
1333 // others are still syncing.
1334 // "STOPPED" - Syncing resources to the cluster is stopped at the cluster
1335 // level.
1336 ClusterLevelStopSyncingState string `json:"clusterLevelStopSyncingState,omitempty"`
1337 // CrCount: Output only. The number of RootSync and RepoSync CRs in the
1338 // cluster.
1339 CrCount int64 `json:"crCount,omitempty"`
1340 // DeploymentState: Output only. Information about the deployment of
1341 // ConfigSync, including the version of the various Pods deployed
1342 DeploymentState *ConfigManagementConfigSyncDeploymentState `json:"deploymentState,omitempty"`
1343 // Errors: Output only. Errors pertaining to the installation of Config Sync.
1344 Errors []*ConfigManagementConfigSyncError `json:"errors,omitempty"`
1345 // ReposyncCrd: Output only. The state of the Reposync CRD
1346 //
1347 // Possible values:
1348 // "CRD_STATE_UNSPECIFIED" - CRD's state cannot be determined
1349 // "NOT_INSTALLED" - CRD is not installed
1350 // "INSTALLED" - CRD is installed
1351 // "TERMINATING" - CRD is terminating (i.e., it has been deleted and is
1352 // cleaning up)
1353 // "INSTALLING" - CRD is installing
1354 ReposyncCrd string `json:"reposyncCrd,omitempty"`
1355 // RootsyncCrd: Output only. The state of the RootSync CRD
1356 //
1357 // Possible values:
1358 // "CRD_STATE_UNSPECIFIED" - CRD's state cannot be determined
1359 // "NOT_INSTALLED" - CRD is not installed
1360 // "INSTALLED" - CRD is installed
1361 // "TERMINATING" - CRD is terminating (i.e., it has been deleted and is
1362 // cleaning up)
1363 // "INSTALLING" - CRD is installing
1364 RootsyncCrd string `json:"rootsyncCrd,omitempty"`
1365 // State: Output only. The state of CS This field summarizes the other fields
1366 // in this message.
1367 //
1368 // Possible values:
1369 // "STATE_UNSPECIFIED" - CS's state cannot be determined.
1370 // "CONFIG_SYNC_NOT_INSTALLED" - CS is not installed.
1371 // "CONFIG_SYNC_INSTALLED" - The expected CS version is installed
1372 // successfully.
1373 // "CONFIG_SYNC_ERROR" - CS encounters errors.
1374 // "CONFIG_SYNC_PENDING" - CS is installing or terminating.
1375 State string `json:"state,omitempty"`
1376 // SyncState: Output only. The state of ConfigSync's process to sync configs to
1377 // a cluster
1378 SyncState *ConfigManagementSyncState `json:"syncState,omitempty"`
1379 // Version: Output only. The version of ConfigSync deployed
1380 Version *ConfigManagementConfigSyncVersion `json:"version,omitempty"`
1381 // ForceSendFields is a list of field names (e.g.
1382 // "ClusterLevelStopSyncingState") to unconditionally include in API requests.
1383 // By default, fields with empty or default values are omitted from API
1384 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
1385 // for more details.
1386 ForceSendFields []string `json:"-"`
1387 // NullFields is a list of field names (e.g. "ClusterLevelStopSyncingState") to
1388 // include in API requests with the JSON null value. By default, fields with
1389 // empty values are omitted from API requests. See
1390 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1391 NullFields []string `json:"-"`
1392 }
1393
1394 func (s ConfigManagementConfigSyncState) MarshalJSON() ([]byte, error) {
1395 type NoMethod ConfigManagementConfigSyncState
1396 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1397 }
1398
1399 // ConfigManagementConfigSyncVersion: Specific versioning information
1400 // pertaining to ConfigSync's Pods
1401 type ConfigManagementConfigSyncVersion struct {
1402 // AdmissionWebhook: Version of the deployed admission-webhook pod
1403 AdmissionWebhook string `json:"admissionWebhook,omitempty"`
1404 // GitSync: Version of the deployed git-sync pod
1405 GitSync string `json:"gitSync,omitempty"`
1406 // Importer: Version of the deployed importer pod
1407 Importer string `json:"importer,omitempty"`
1408 // Monitor: Version of the deployed monitor pod
1409 Monitor string `json:"monitor,omitempty"`
1410 // OtelCollector: Version of the deployed otel-collector pod
1411 OtelCollector string `json:"otelCollector,omitempty"`
1412 // ReconcilerManager: Version of the deployed reconciler-manager pod
1413 ReconcilerManager string `json:"reconcilerManager,omitempty"`
1414 // ResourceGroupControllerManager: Version of the deployed
1415 // resource-group-controller-manager pod
1416 ResourceGroupControllerManager string `json:"resourceGroupControllerManager,omitempty"`
1417 // RootReconciler: Version of the deployed reconciler container in
1418 // root-reconciler pod
1419 RootReconciler string `json:"rootReconciler,omitempty"`
1420 // Syncer: Version of the deployed syncer pod
1421 Syncer string `json:"syncer,omitempty"`
1422 // ForceSendFields is a list of field names (e.g. "AdmissionWebhook") to
1423 // unconditionally include in API requests. By default, fields with empty or
1424 // default values are omitted from API requests. See
1425 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1426 // details.
1427 ForceSendFields []string `json:"-"`
1428 // NullFields is a list of field names (e.g. "AdmissionWebhook") to include in
1429 // API requests with the JSON null value. By default, fields with empty values
1430 // are omitted from API requests. See
1431 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1432 NullFields []string `json:"-"`
1433 }
1434
1435 func (s ConfigManagementConfigSyncVersion) MarshalJSON() ([]byte, error) {
1436 type NoMethod ConfigManagementConfigSyncVersion
1437 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1438 }
1439
1440 // ConfigManagementContainerOverride: Configuration for a container override.
1441 type ConfigManagementContainerOverride struct {
1442 // ContainerName: Required. The name of the container.
1443 ContainerName string `json:"containerName,omitempty"`
1444 // CpuLimit: Optional. The cpu limit of the container. Use the following CPU
1445 // resource units:
1446 // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.
1447 CpuLimit string `json:"cpuLimit,omitempty"`
1448 // CpuRequest: Optional. The cpu request of the container. Use the following
1449 // CPU resource units:
1450 // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.
1451 CpuRequest string `json:"cpuRequest,omitempty"`
1452 // MemoryLimit: Optional. The memory limit of the container. Use the following
1453 // memory resource units:
1454 // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory.
1455 MemoryLimit string `json:"memoryLimit,omitempty"`
1456 // MemoryRequest: Optional. The memory request of the container. Use the
1457 // following memory resource units:
1458 // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory.
1459 MemoryRequest string `json:"memoryRequest,omitempty"`
1460 // ForceSendFields is a list of field names (e.g. "ContainerName") to
1461 // unconditionally include in API requests. By default, fields with empty or
1462 // default values are omitted from API requests. See
1463 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1464 // details.
1465 ForceSendFields []string `json:"-"`
1466 // NullFields is a list of field names (e.g. "ContainerName") to include in API
1467 // requests with the JSON null value. By default, fields with empty values are
1468 // omitted from API requests. See
1469 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1470 NullFields []string `json:"-"`
1471 }
1472
1473 func (s ConfigManagementContainerOverride) MarshalJSON() ([]byte, error) {
1474 type NoMethod ConfigManagementContainerOverride
1475 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1476 }
1477
1478 // ConfigManagementDeploymentOverride: Configuration for a deployment override.
1479 type ConfigManagementDeploymentOverride struct {
1480 // Containers: Optional. The containers of the deployment resource to be
1481 // overridden.
1482 Containers []*ConfigManagementContainerOverride `json:"containers,omitempty"`
1483 // DeploymentName: Required. The name of the deployment resource to be
1484 // overridden.
1485 DeploymentName string `json:"deploymentName,omitempty"`
1486 // DeploymentNamespace: Required. The namespace of the deployment resource to
1487 // be overridden.
1488 DeploymentNamespace string `json:"deploymentNamespace,omitempty"`
1489 // ForceSendFields is a list of field names (e.g. "Containers") to
1490 // unconditionally include in API requests. By default, fields with empty or
1491 // default values are omitted from API requests. See
1492 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1493 // details.
1494 ForceSendFields []string `json:"-"`
1495 // NullFields is a list of field names (e.g. "Containers") to include in API
1496 // requests with the JSON null value. By default, fields with empty values are
1497 // omitted from API requests. See
1498 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1499 NullFields []string `json:"-"`
1500 }
1501
1502 func (s ConfigManagementDeploymentOverride) MarshalJSON() ([]byte, error) {
1503 type NoMethod ConfigManagementDeploymentOverride
1504 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1505 }
1506
1507 // ConfigManagementErrorResource: Model for a config file in the git repo with
1508 // an associated Sync error
1509 type ConfigManagementErrorResource struct {
1510 // ResourceGvk: Group/version/kind of the resource that is causing an error
1511 ResourceGvk *ConfigManagementGroupVersionKind `json:"resourceGvk,omitempty"`
1512 // ResourceName: Metadata name of the resource that is causing an error
1513 ResourceName string `json:"resourceName,omitempty"`
1514 // ResourceNamespace: Namespace of the resource that is causing an error
1515 ResourceNamespace string `json:"resourceNamespace,omitempty"`
1516 // SourcePath: Path in the git repo of the erroneous config
1517 SourcePath string `json:"sourcePath,omitempty"`
1518 // ForceSendFields is a list of field names (e.g. "ResourceGvk") to
1519 // unconditionally include in API requests. By default, fields with empty or
1520 // default values are omitted from API requests. See
1521 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1522 // details.
1523 ForceSendFields []string `json:"-"`
1524 // NullFields is a list of field names (e.g. "ResourceGvk") to include in API
1525 // requests with the JSON null value. By default, fields with empty values are
1526 // omitted from API requests. See
1527 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1528 NullFields []string `json:"-"`
1529 }
1530
1531 func (s ConfigManagementErrorResource) MarshalJSON() ([]byte, error) {
1532 type NoMethod ConfigManagementErrorResource
1533 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1534 }
1535
1536 // ConfigManagementGatekeeperDeploymentState: State of Policy Controller
1537 // installation.
1538 type ConfigManagementGatekeeperDeploymentState struct {
1539 // GatekeeperAudit: Status of gatekeeper-audit deployment.
1540 //
1541 // Possible values:
1542 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1543 // "NOT_INSTALLED" - Deployment is not installed
1544 // "INSTALLED" - Deployment is installed
1545 // "ERROR" - Deployment was attempted to be installed, but has errors
1546 // "PENDING" - Deployment is installing or terminating
1547 GatekeeperAudit string `json:"gatekeeperAudit,omitempty"`
1548 // GatekeeperControllerManagerState: Status of gatekeeper-controller-manager
1549 // pod.
1550 //
1551 // Possible values:
1552 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1553 // "NOT_INSTALLED" - Deployment is not installed
1554 // "INSTALLED" - Deployment is installed
1555 // "ERROR" - Deployment was attempted to be installed, but has errors
1556 // "PENDING" - Deployment is installing or terminating
1557 GatekeeperControllerManagerState string `json:"gatekeeperControllerManagerState,omitempty"`
1558 // GatekeeperMutation: Status of the pod serving the mutation webhook.
1559 //
1560 // Possible values:
1561 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1562 // "NOT_INSTALLED" - Deployment is not installed
1563 // "INSTALLED" - Deployment is installed
1564 // "ERROR" - Deployment was attempted to be installed, but has errors
1565 // "PENDING" - Deployment is installing or terminating
1566 GatekeeperMutation string `json:"gatekeeperMutation,omitempty"`
1567 // ForceSendFields is a list of field names (e.g. "GatekeeperAudit") to
1568 // unconditionally include in API requests. By default, fields with empty or
1569 // default values are omitted from API requests. See
1570 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1571 // details.
1572 ForceSendFields []string `json:"-"`
1573 // NullFields is a list of field names (e.g. "GatekeeperAudit") to include in
1574 // API requests with the JSON null value. By default, fields with empty values
1575 // are omitted from API requests. See
1576 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1577 NullFields []string `json:"-"`
1578 }
1579
1580 func (s ConfigManagementGatekeeperDeploymentState) MarshalJSON() ([]byte, error) {
1581 type NoMethod ConfigManagementGatekeeperDeploymentState
1582 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1583 }
1584
1585 // ConfigManagementGitConfig: Git repo configuration for a single cluster.
1586 type ConfigManagementGitConfig struct {
1587 // GcpServiceAccountEmail: Optional. The Google Cloud Service Account Email
1588 // used for auth when secret_type is `gcpserviceaccount`.
1589 GcpServiceAccountEmail string `json:"gcpServiceAccountEmail,omitempty"`
1590 // HttpsProxy: Optional. URL for the HTTPS proxy to be used when communicating
1591 // with the Git repo. Only specify when secret_type is `cookiefile`, `token`,
1592 // or `none`.
1593 HttpsProxy string `json:"httpsProxy,omitempty"`
1594 // PolicyDir: Optional. The path within the Git repository that represents the
1595 // top level of the repo to sync. Default: the root directory of the
1596 // repository.
1597 PolicyDir string `json:"policyDir,omitempty"`
1598 // SecretType: Required. Type of secret configured for access to the Git repo.
1599 // Must be one of `ssh`, `cookiefile`, `gcenode`, `token`, `gcpserviceaccount`,
1600 // `githubapp` or `none`. The validation of this is case-sensitive.
1601 SecretType string `json:"secretType,omitempty"`
1602 // SyncBranch: Optional. The branch of the repository to sync from. Default:
1603 // master.
1604 SyncBranch string `json:"syncBranch,omitempty"`
1605 // SyncRepo: Required. The URL of the Git repository to use as the source of
1606 // truth.
1607 SyncRepo string `json:"syncRepo,omitempty"`
1608 // SyncRev: Optional. Git revision (tag or hash) to check out. Default HEAD.
1609 SyncRev string `json:"syncRev,omitempty"`
1610 // SyncWaitSecs: Optional. Period in seconds between consecutive syncs.
1611 // Default: 15.
1612 SyncWaitSecs int64 `json:"syncWaitSecs,omitempty,string"`
1613 // ForceSendFields is a list of field names (e.g. "GcpServiceAccountEmail") to
1614 // unconditionally include in API requests. By default, fields with empty or
1615 // default values are omitted from API requests. See
1616 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1617 // details.
1618 ForceSendFields []string `json:"-"`
1619 // NullFields is a list of field names (e.g. "GcpServiceAccountEmail") to
1620 // include in API requests with the JSON null value. By default, fields with
1621 // empty values are omitted from API requests. See
1622 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1623 NullFields []string `json:"-"`
1624 }
1625
1626 func (s ConfigManagementGitConfig) MarshalJSON() ([]byte, error) {
1627 type NoMethod ConfigManagementGitConfig
1628 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1629 }
1630
1631 // ConfigManagementGroupVersionKind: A Kubernetes object's GVK
1632 type ConfigManagementGroupVersionKind struct {
1633 // Group: Kubernetes Group
1634 Group string `json:"group,omitempty"`
1635 // Kind: Kubernetes Kind
1636 Kind string `json:"kind,omitempty"`
1637 // Version: Kubernetes Version
1638 Version string `json:"version,omitempty"`
1639 // ForceSendFields is a list of field names (e.g. "Group") to unconditionally
1640 // include in API requests. By default, fields with empty or default values are
1641 // omitted from API requests. See
1642 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1643 // details.
1644 ForceSendFields []string `json:"-"`
1645 // NullFields is a list of field names (e.g. "Group") to include in API
1646 // requests with the JSON null value. By default, fields with empty values are
1647 // omitted from API requests. See
1648 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1649 NullFields []string `json:"-"`
1650 }
1651
1652 func (s ConfigManagementGroupVersionKind) MarshalJSON() ([]byte, error) {
1653 type NoMethod ConfigManagementGroupVersionKind
1654 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1655 }
1656
1657 // ConfigManagementHierarchyControllerConfig: Configuration for Hierarchy
1658 // Controller
1659 type ConfigManagementHierarchyControllerConfig struct {
1660 // EnableHierarchicalResourceQuota: Whether hierarchical resource quota is
1661 // enabled in this cluster.
1662 EnableHierarchicalResourceQuota bool `json:"enableHierarchicalResourceQuota,omitempty"`
1663 // EnablePodTreeLabels: Whether pod tree labels are enabled in this cluster.
1664 EnablePodTreeLabels bool `json:"enablePodTreeLabels,omitempty"`
1665 // Enabled: Whether Hierarchy Controller is enabled in this cluster.
1666 Enabled bool `json:"enabled,omitempty"`
1667 // ForceSendFields is a list of field names (e.g.
1668 // "EnableHierarchicalResourceQuota") to unconditionally include in API
1669 // requests. By default, fields with empty or default values are omitted from
1670 // API requests. See
1671 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1672 // details.
1673 ForceSendFields []string `json:"-"`
1674 // NullFields is a list of field names (e.g. "EnableHierarchicalResourceQuota")
1675 // to include in API requests with the JSON null value. By default, fields with
1676 // empty values are omitted from API requests. See
1677 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1678 NullFields []string `json:"-"`
1679 }
1680
1681 func (s ConfigManagementHierarchyControllerConfig) MarshalJSON() ([]byte, error) {
1682 type NoMethod ConfigManagementHierarchyControllerConfig
1683 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1684 }
1685
1686 // ConfigManagementHierarchyControllerDeploymentState: Deployment state for
1687 // Hierarchy Controller
1688 type ConfigManagementHierarchyControllerDeploymentState struct {
1689 // Extension: The deployment state for Hierarchy Controller extension (e.g.
1690 // v0.7.0-hc.1)
1691 //
1692 // Possible values:
1693 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1694 // "NOT_INSTALLED" - Deployment is not installed
1695 // "INSTALLED" - Deployment is installed
1696 // "ERROR" - Deployment was attempted to be installed, but has errors
1697 // "PENDING" - Deployment is installing or terminating
1698 Extension string `json:"extension,omitempty"`
1699 // Hnc: The deployment state for open source HNC (e.g. v0.7.0-hc.0)
1700 //
1701 // Possible values:
1702 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1703 // "NOT_INSTALLED" - Deployment is not installed
1704 // "INSTALLED" - Deployment is installed
1705 // "ERROR" - Deployment was attempted to be installed, but has errors
1706 // "PENDING" - Deployment is installing or terminating
1707 Hnc string `json:"hnc,omitempty"`
1708 // ForceSendFields is a list of field names (e.g. "Extension") to
1709 // unconditionally include in API requests. By default, fields with empty or
1710 // default values are omitted from API requests. See
1711 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1712 // details.
1713 ForceSendFields []string `json:"-"`
1714 // NullFields is a list of field names (e.g. "Extension") to include in API
1715 // requests with the JSON null value. By default, fields with empty values are
1716 // omitted from API requests. See
1717 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1718 NullFields []string `json:"-"`
1719 }
1720
1721 func (s ConfigManagementHierarchyControllerDeploymentState) MarshalJSON() ([]byte, error) {
1722 type NoMethod ConfigManagementHierarchyControllerDeploymentState
1723 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1724 }
1725
1726 // ConfigManagementHierarchyControllerState: State for Hierarchy Controller
1727 type ConfigManagementHierarchyControllerState struct {
1728 // State: The deployment state for Hierarchy Controller
1729 State *ConfigManagementHierarchyControllerDeploymentState `json:"state,omitempty"`
1730 // Version: The version for Hierarchy Controller
1731 Version *ConfigManagementHierarchyControllerVersion `json:"version,omitempty"`
1732 // ForceSendFields is a list of field names (e.g. "State") to unconditionally
1733 // include in API requests. By default, fields with empty or default values are
1734 // omitted from API requests. See
1735 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1736 // details.
1737 ForceSendFields []string `json:"-"`
1738 // NullFields is a list of field names (e.g. "State") to include in API
1739 // requests with the JSON null value. By default, fields with empty values are
1740 // omitted from API requests. See
1741 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1742 NullFields []string `json:"-"`
1743 }
1744
1745 func (s ConfigManagementHierarchyControllerState) MarshalJSON() ([]byte, error) {
1746 type NoMethod ConfigManagementHierarchyControllerState
1747 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1748 }
1749
1750 // ConfigManagementHierarchyControllerVersion: Version for Hierarchy Controller
1751 type ConfigManagementHierarchyControllerVersion struct {
1752 // Extension: Version for Hierarchy Controller extension
1753 Extension string `json:"extension,omitempty"`
1754 // Hnc: Version for open source HNC
1755 Hnc string `json:"hnc,omitempty"`
1756 // ForceSendFields is a list of field names (e.g. "Extension") to
1757 // unconditionally include in API requests. By default, fields with empty or
1758 // default values are omitted from API requests. See
1759 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1760 // details.
1761 ForceSendFields []string `json:"-"`
1762 // NullFields is a list of field names (e.g. "Extension") to include in API
1763 // requests with the JSON null value. By default, fields with empty values are
1764 // omitted from API requests. See
1765 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1766 NullFields []string `json:"-"`
1767 }
1768
1769 func (s ConfigManagementHierarchyControllerVersion) MarshalJSON() ([]byte, error) {
1770 type NoMethod ConfigManagementHierarchyControllerVersion
1771 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1772 }
1773
1774 // ConfigManagementInstallError: Errors pertaining to the installation of ACM
1775 type ConfigManagementInstallError struct {
1776 // ErrorMessage: A string representing the user facing error message
1777 ErrorMessage string `json:"errorMessage,omitempty"`
1778 // ForceSendFields is a list of field names (e.g. "ErrorMessage") to
1779 // unconditionally include in API requests. By default, fields with empty or
1780 // default values are omitted from API requests. See
1781 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1782 // details.
1783 ForceSendFields []string `json:"-"`
1784 // NullFields is a list of field names (e.g. "ErrorMessage") to include in API
1785 // requests with the JSON null value. By default, fields with empty values are
1786 // omitted from API requests. See
1787 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1788 NullFields []string `json:"-"`
1789 }
1790
1791 func (s ConfigManagementInstallError) MarshalJSON() ([]byte, error) {
1792 type NoMethod ConfigManagementInstallError
1793 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1794 }
1795
1796 // ConfigManagementMembershipSpec: **Anthos Config Management**: Configuration
1797 // for a single cluster. Intended to parallel the ConfigManagement CR.
1798 type ConfigManagementMembershipSpec struct {
1799 // Cluster: Optional. User-specified cluster name used by the Config Sync
1800 // cluster-name-selector annotation or ClusterSelector object, for applying
1801 // configs to only a subset of clusters. Read more about the
1802 // cluster-name-selector annotation and ClusterSelector object at
1803 // https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/how-to/cluster-scoped-objects#limiting-configs.
1804 // Only set this field if a name different from the cluster's fleet membership
1805 // name is used by the Config Sync cluster-name-selector annotation or
1806 // ClusterSelector.
1807 Cluster string `json:"cluster,omitempty"`
1808 // ConfigSync: Optional. Config Sync configuration for the cluster.
1809 ConfigSync *ConfigManagementConfigSync `json:"configSync,omitempty"`
1810 // HierarchyController: Optional. Hierarchy Controller configuration for the
1811 // cluster. Deprecated: Configuring Hierarchy Controller through the
1812 // configmanagement feature is no longer recommended. Use
1813 // https://github.com/kubernetes-sigs/hierarchical-namespaces instead.
1814 HierarchyController *ConfigManagementHierarchyControllerConfig `json:"hierarchyController,omitempty"`
1815 // Management: Optional. Deprecated: From version 1.21.0, automatic Feature
1816 // management is unavailable, and Config Sync only supports manual upgrades.
1817 //
1818 // Possible values:
1819 // "MANAGEMENT_UNSPECIFIED" - Unspecified
1820 // "MANAGEMENT_AUTOMATIC" - Google will manage the Feature for the cluster.
1821 // "MANAGEMENT_MANUAL" - User will manually manage the Feature for the
1822 // cluster.
1823 Management string `json:"management,omitempty"`
1824 // PolicyController: Optional. Policy Controller configuration for the cluster.
1825 // Deprecated: Configuring Policy Controller through the configmanagement
1826 // feature is no longer recommended. Use the policycontroller feature instead.
1827 PolicyController *ConfigManagementPolicyController `json:"policyController,omitempty"`
1828 // Version: Optional. Version of Config Sync to install. Defaults to the latest
1829 // supported Config Sync version if the config_sync field is enabled. See
1830 // supported versions at
1831 // https://cloud.google.com/kubernetes-engine/config-sync/docs/get-support-config-sync#version_support_policy.
1832 Version string `json:"version,omitempty"`
1833 // ForceSendFields is a list of field names (e.g. "Cluster") to unconditionally
1834 // include in API requests. By default, fields with empty or default values are
1835 // omitted from API requests. See
1836 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1837 // details.
1838 ForceSendFields []string `json:"-"`
1839 // NullFields is a list of field names (e.g. "Cluster") to include in API
1840 // requests with the JSON null value. By default, fields with empty values are
1841 // omitted from API requests. See
1842 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1843 NullFields []string `json:"-"`
1844 }
1845
1846 func (s ConfigManagementMembershipSpec) MarshalJSON() ([]byte, error) {
1847 type NoMethod ConfigManagementMembershipSpec
1848 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1849 }
1850
1851 // ConfigManagementMembershipState: **Anthos Config Management**: State for a
1852 // single cluster.
1853 type ConfigManagementMembershipState struct {
1854 // ClusterName: Output only. This field is set to the `cluster_name` field of
1855 // the Membership Spec if it is not empty. Otherwise, it is set to the
1856 // cluster's fleet membership name.
1857 ClusterName string `json:"clusterName,omitempty"`
1858 // ConfigSyncState: Output only. Current sync status
1859 ConfigSyncState *ConfigManagementConfigSyncState `json:"configSyncState,omitempty"`
1860 // HierarchyControllerState: Output only. Hierarchy Controller status
1861 HierarchyControllerState *ConfigManagementHierarchyControllerState `json:"hierarchyControllerState,omitempty"`
1862 // KubernetesApiServerVersion: Output only. The Kubernetes API server version
1863 // of the cluster.
1864 KubernetesApiServerVersion string `json:"kubernetesApiServerVersion,omitempty"`
1865 // MembershipSpec: Output only. Membership configuration in the cluster. This
1866 // represents the actual state in the cluster, while the MembershipSpec in the
1867 // FeatureSpec represents the intended state
1868 MembershipSpec *ConfigManagementMembershipSpec `json:"membershipSpec,omitempty"`
1869 // OperatorState: Output only. Current install status of ACM's Operator
1870 OperatorState *ConfigManagementOperatorState `json:"operatorState,omitempty"`
1871 // PolicyControllerState: Output only. PolicyController status
1872 PolicyControllerState *ConfigManagementPolicyControllerState `json:"policyControllerState,omitempty"`
1873 // ForceSendFields is a list of field names (e.g. "ClusterName") to
1874 // unconditionally include in API requests. By default, fields with empty or
1875 // default values are omitted from API requests. See
1876 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1877 // details.
1878 ForceSendFields []string `json:"-"`
1879 // NullFields is a list of field names (e.g. "ClusterName") to include in API
1880 // requests with the JSON null value. By default, fields with empty values are
1881 // omitted from API requests. See
1882 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1883 NullFields []string `json:"-"`
1884 }
1885
1886 func (s ConfigManagementMembershipState) MarshalJSON() ([]byte, error) {
1887 type NoMethod ConfigManagementMembershipState
1888 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1889 }
1890
1891 // ConfigManagementOciConfig: OCI repo configuration for a single cluster
1892 type ConfigManagementOciConfig struct {
1893 // GcpServiceAccountEmail: Optional. The Google Cloud Service Account Email
1894 // used for auth when secret_type is `gcpserviceaccount`.
1895 GcpServiceAccountEmail string `json:"gcpServiceAccountEmail,omitempty"`
1896 // PolicyDir: Optional. The absolute path of the directory that contains the
1897 // local resources. Default: the root directory of the image.
1898 PolicyDir string `json:"policyDir,omitempty"`
1899 // SecretType: Required. Type of secret configured for access to the OCI repo.
1900 // Must be one of `gcenode`, `gcpserviceaccount`, `k8sserviceaccount` or
1901 // `none`. The validation of this is case-sensitive.
1902 SecretType string `json:"secretType,omitempty"`
1903 // SyncRepo: Required. The OCI image repository URL for the package to sync
1904 // from. e.g.
1905 // `LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME`.
1906 SyncRepo string `json:"syncRepo,omitempty"`
1907 // SyncWaitSecs: Optional. Period in seconds between consecutive syncs.
1908 // Default: 15.
1909 SyncWaitSecs int64 `json:"syncWaitSecs,omitempty,string"`
1910 // ForceSendFields is a list of field names (e.g. "GcpServiceAccountEmail") to
1911 // unconditionally include in API requests. By default, fields with empty or
1912 // default values are omitted from API requests. See
1913 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1914 // details.
1915 ForceSendFields []string `json:"-"`
1916 // NullFields is a list of field names (e.g. "GcpServiceAccountEmail") to
1917 // include in API requests with the JSON null value. By default, fields with
1918 // empty values are omitted from API requests. See
1919 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1920 NullFields []string `json:"-"`
1921 }
1922
1923 func (s ConfigManagementOciConfig) MarshalJSON() ([]byte, error) {
1924 type NoMethod ConfigManagementOciConfig
1925 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1926 }
1927
1928 // ConfigManagementOperatorState: State information for an ACM's Operator
1929 type ConfigManagementOperatorState struct {
1930 // DeploymentState: The state of the Operator's deployment
1931 //
1932 // Possible values:
1933 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined
1934 // "NOT_INSTALLED" - Deployment is not installed
1935 // "INSTALLED" - Deployment is installed
1936 // "ERROR" - Deployment was attempted to be installed, but has errors
1937 // "PENDING" - Deployment is installing or terminating
1938 DeploymentState string `json:"deploymentState,omitempty"`
1939 // Errors: Install errors.
1940 Errors []*ConfigManagementInstallError `json:"errors,omitempty"`
1941 // Version: The semenatic version number of the operator
1942 Version string `json:"version,omitempty"`
1943 // ForceSendFields is a list of field names (e.g. "DeploymentState") to
1944 // unconditionally include in API requests. By default, fields with empty or
1945 // default values are omitted from API requests. See
1946 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1947 // details.
1948 ForceSendFields []string `json:"-"`
1949 // NullFields is a list of field names (e.g. "DeploymentState") to include in
1950 // API requests with the JSON null value. By default, fields with empty values
1951 // are omitted from API requests. See
1952 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1953 NullFields []string `json:"-"`
1954 }
1955
1956 func (s ConfigManagementOperatorState) MarshalJSON() ([]byte, error) {
1957 type NoMethod ConfigManagementOperatorState
1958 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1959 }
1960
1961 // ConfigManagementPolicyController: Configuration for Policy Controller
1962 type ConfigManagementPolicyController struct {
1963 // AuditIntervalSeconds: Sets the interval for Policy Controller Audit Scans
1964 // (in seconds). When set to 0, this disables audit functionality altogether.
1965 AuditIntervalSeconds int64 `json:"auditIntervalSeconds,omitempty,string"`
1966 // Enabled: Enables the installation of Policy Controller. If false, the rest
1967 // of PolicyController fields take no effect.
1968 Enabled bool `json:"enabled,omitempty"`
1969 // ExemptableNamespaces: The set of namespaces that are excluded from Policy
1970 // Controller checks. Namespaces do not need to currently exist on the cluster.
1971 ExemptableNamespaces []string `json:"exemptableNamespaces,omitempty"`
1972 // LogDeniesEnabled: Logs all denies and dry run failures.
1973 LogDeniesEnabled bool `json:"logDeniesEnabled,omitempty"`
1974 // Monitoring: Monitoring specifies the configuration of monitoring.
1975 Monitoring *ConfigManagementPolicyControllerMonitoring `json:"monitoring,omitempty"`
1976 // MutationEnabled: Enable or disable mutation in policy controller. If true,
1977 // mutation CRDs, webhook and controller deployment will be deployed to the
1978 // cluster.
1979 MutationEnabled bool `json:"mutationEnabled,omitempty"`
1980 // ReferentialRulesEnabled: Enables the ability to use Constraint Templates
1981 // that reference to objects other than the object currently being evaluated.
1982 ReferentialRulesEnabled bool `json:"referentialRulesEnabled,omitempty"`
1983 // TemplateLibraryInstalled: Installs the default template library along with
1984 // Policy Controller.
1985 TemplateLibraryInstalled bool `json:"templateLibraryInstalled,omitempty"`
1986 // UpdateTime: Output only. Last time this membership spec was updated.
1987 UpdateTime string `json:"updateTime,omitempty"`
1988 // ForceSendFields is a list of field names (e.g. "AuditIntervalSeconds") to
1989 // unconditionally include in API requests. By default, fields with empty or
1990 // default values are omitted from API requests. See
1991 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1992 // details.
1993 ForceSendFields []string `json:"-"`
1994 // NullFields is a list of field names (e.g. "AuditIntervalSeconds") to include
1995 // in API requests with the JSON null value. By default, fields with empty
1996 // values are omitted from API requests. See
1997 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1998 NullFields []string `json:"-"`
1999 }
2000
2001 func (s ConfigManagementPolicyController) MarshalJSON() ([]byte, error) {
2002 type NoMethod ConfigManagementPolicyController
2003 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2004 }
2005
2006 // ConfigManagementPolicyControllerMigration: State for the migration of
2007 // PolicyController from ACM -> PoCo Hub.
2008 type ConfigManagementPolicyControllerMigration struct {
2009 // CopyTime: Last time this membership spec was copied to PoCo feature.
2010 CopyTime string `json:"copyTime,omitempty"`
2011 // Stage: Stage of the migration.
2012 //
2013 // Possible values:
2014 // "STAGE_UNSPECIFIED" - Unknown state of migration.
2015 // "ACM_MANAGED" - ACM Hub/Operator manages policycontroller. No migration
2016 // yet completed.
2017 // "POCO_MANAGED" - All migrations steps complete; Poco Hub now manages
2018 // policycontroller.
2019 Stage string `json:"stage,omitempty"`
2020 // ForceSendFields is a list of field names (e.g. "CopyTime") to
2021 // unconditionally include in API requests. By default, fields with empty or
2022 // default values are omitted from API requests. See
2023 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2024 // details.
2025 ForceSendFields []string `json:"-"`
2026 // NullFields is a list of field names (e.g. "CopyTime") to include in API
2027 // requests with the JSON null value. By default, fields with empty values are
2028 // omitted from API requests. See
2029 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2030 NullFields []string `json:"-"`
2031 }
2032
2033 func (s ConfigManagementPolicyControllerMigration) MarshalJSON() ([]byte, error) {
2034 type NoMethod ConfigManagementPolicyControllerMigration
2035 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2036 }
2037
2038 // ConfigManagementPolicyControllerMonitoring: PolicyControllerMonitoring
2039 // specifies the backends Policy Controller should export metrics to. For
2040 // example, to specify metrics should be exported to Cloud Monitoring and
2041 // Prometheus, specify backends: ["cloudmonitoring", "prometheus"]
2042 type ConfigManagementPolicyControllerMonitoring struct {
2043 // Backends: Specifies the list of backends Policy Controller will export to.
2044 // An empty list would effectively disable metrics export.
2045 //
2046 // Possible values:
2047 // "MONITORING_BACKEND_UNSPECIFIED" - Backend cannot be determined
2048 // "PROMETHEUS" - Prometheus backend for monitoring
2049 // "CLOUD_MONITORING" - Stackdriver/Cloud Monitoring backend for monitoring
2050 Backends []string `json:"backends,omitempty"`
2051 // ForceSendFields is a list of field names (e.g. "Backends") to
2052 // unconditionally include in API requests. By default, fields with empty or
2053 // default values are omitted from API requests. See
2054 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2055 // details.
2056 ForceSendFields []string `json:"-"`
2057 // NullFields is a list of field names (e.g. "Backends") to include in API
2058 // requests with the JSON null value. By default, fields with empty values are
2059 // omitted from API requests. See
2060 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2061 NullFields []string `json:"-"`
2062 }
2063
2064 func (s ConfigManagementPolicyControllerMonitoring) MarshalJSON() ([]byte, error) {
2065 type NoMethod ConfigManagementPolicyControllerMonitoring
2066 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2067 }
2068
2069 // ConfigManagementPolicyControllerState: State for PolicyControllerState.
2070 type ConfigManagementPolicyControllerState struct {
2071 // DeploymentState: The state about the policy controller installation.
2072 DeploymentState *ConfigManagementGatekeeperDeploymentState `json:"deploymentState,omitempty"`
2073 // Migration: Record state of ACM -> PoCo Hub migration for this feature.
2074 Migration *ConfigManagementPolicyControllerMigration `json:"migration,omitempty"`
2075 // Version: The version of Gatekeeper Policy Controller deployed.
2076 Version *ConfigManagementPolicyControllerVersion `json:"version,omitempty"`
2077 // ForceSendFields is a list of field names (e.g. "DeploymentState") to
2078 // unconditionally include in API requests. By default, fields with empty or
2079 // default values are omitted from API requests. See
2080 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2081 // details.
2082 ForceSendFields []string `json:"-"`
2083 // NullFields is a list of field names (e.g. "DeploymentState") to include in
2084 // API requests with the JSON null value. By default, fields with empty values
2085 // are omitted from API requests. See
2086 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2087 NullFields []string `json:"-"`
2088 }
2089
2090 func (s ConfigManagementPolicyControllerState) MarshalJSON() ([]byte, error) {
2091 type NoMethod ConfigManagementPolicyControllerState
2092 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2093 }
2094
2095 // ConfigManagementPolicyControllerVersion: The build version of Gatekeeper
2096 // Policy Controller is using.
2097 type ConfigManagementPolicyControllerVersion struct {
2098 // Version: The gatekeeper image tag that is composed of ACM version, git tag,
2099 // build number.
2100 Version string `json:"version,omitempty"`
2101 // ForceSendFields is a list of field names (e.g. "Version") to unconditionally
2102 // include in API requests. By default, fields with empty or default values are
2103 // omitted from API requests. See
2104 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2105 // details.
2106 ForceSendFields []string `json:"-"`
2107 // NullFields is a list of field names (e.g. "Version") to include in API
2108 // requests with the JSON null value. By default, fields with empty values are
2109 // omitted from API requests. See
2110 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2111 NullFields []string `json:"-"`
2112 }
2113
2114 func (s ConfigManagementPolicyControllerVersion) MarshalJSON() ([]byte, error) {
2115 type NoMethod ConfigManagementPolicyControllerVersion
2116 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2117 }
2118
2119 // ConfigManagementSyncError: An ACM created error representing a problem
2120 // syncing configurations
2121 type ConfigManagementSyncError struct {
2122 // Code: An ACM defined error code
2123 Code string `json:"code,omitempty"`
2124 // ErrorMessage: A description of the error
2125 ErrorMessage string `json:"errorMessage,omitempty"`
2126 // ErrorResources: A list of config(s) associated with the error, if any
2127 ErrorResources []*ConfigManagementErrorResource `json:"errorResources,omitempty"`
2128 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2129 // include in API requests. By default, fields with empty or default values are
2130 // omitted from API requests. See
2131 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2132 // details.
2133 ForceSendFields []string `json:"-"`
2134 // NullFields is a list of field names (e.g. "Code") to include in API requests
2135 // with the JSON null value. By default, fields with empty values are omitted
2136 // from API requests. See
2137 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2138 NullFields []string `json:"-"`
2139 }
2140
2141 func (s ConfigManagementSyncError) MarshalJSON() ([]byte, error) {
2142 type NoMethod ConfigManagementSyncError
2143 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2144 }
2145
2146 // ConfigManagementSyncState: State indicating an ACM's progress syncing
2147 // configurations to a cluster
2148 type ConfigManagementSyncState struct {
2149 // Code: Sync status code
2150 //
2151 // Possible values:
2152 // "SYNC_CODE_UNSPECIFIED" - Config Sync cannot determine a sync code
2153 // "SYNCED" - Config Sync successfully synced the git Repo with the cluster
2154 // "PENDING" - Config Sync is in the progress of syncing a new change
2155 // "ERROR" - Indicates an error configuring Config Sync, and user action is
2156 // required
2157 // "NOT_CONFIGURED" - Config Sync has been installed but not configured
2158 // "NOT_INSTALLED" - Config Sync has not been installed
2159 // "UNAUTHORIZED" - Error authorizing with the cluster
2160 // "UNREACHABLE" - Cluster could not be reached
2161 Code string `json:"code,omitempty"`
2162 // Errors: A list of errors resulting from problematic configs. This list will
2163 // be truncated after 100 errors, although it is unlikely for that many errors
2164 // to simultaneously exist.
2165 Errors []*ConfigManagementSyncError `json:"errors,omitempty"`
2166 // ImportToken: Token indicating the state of the importer.
2167 ImportToken string `json:"importToken,omitempty"`
2168 // LastSync: Deprecated: use last_sync_time instead. Timestamp of when ACM last
2169 // successfully synced the repo The time format is specified in
2170 // https://golang.org/pkg/time/#Time.String
2171 LastSync string `json:"lastSync,omitempty"`
2172 // LastSyncTime: Timestamp type of when ACM last successfully synced the repo
2173 LastSyncTime string `json:"lastSyncTime,omitempty"`
2174 // SourceToken: Token indicating the state of the repo.
2175 SourceToken string `json:"sourceToken,omitempty"`
2176 // SyncToken: Token indicating the state of the syncer.
2177 SyncToken string `json:"syncToken,omitempty"`
2178 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2179 // include in API requests. By default, fields with empty or default values are
2180 // omitted from API requests. See
2181 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2182 // details.
2183 ForceSendFields []string `json:"-"`
2184 // NullFields is a list of field names (e.g. "Code") to include in API requests
2185 // with the JSON null value. By default, fields with empty values are omitted
2186 // from API requests. See
2187 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2188 NullFields []string `json:"-"`
2189 }
2190
2191 func (s ConfigManagementSyncState) MarshalJSON() ([]byte, error) {
2192 type NoMethod ConfigManagementSyncState
2193 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2194 }
2195
2196 // ConnectAgentResource: ConnectAgentResource represents a Kubernetes resource
2197 // manifest for Connect Agent deployment.
2198 type ConnectAgentResource struct {
2199 // Manifest: YAML manifest of the resource.
2200 Manifest string `json:"manifest,omitempty"`
2201 // Type: Kubernetes type of the resource.
2202 Type *TypeMeta `json:"type,omitempty"`
2203 // ForceSendFields is a list of field names (e.g. "Manifest") to
2204 // unconditionally include in API requests. By default, fields with empty or
2205 // default values are omitted from API requests. See
2206 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2207 // details.
2208 ForceSendFields []string `json:"-"`
2209 // NullFields is a list of field names (e.g. "Manifest") to include in API
2210 // requests with the JSON null value. By default, fields with empty values are
2211 // omitted from API requests. See
2212 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2213 NullFields []string `json:"-"`
2214 }
2215
2216 func (s ConnectAgentResource) MarshalJSON() ([]byte, error) {
2217 type NoMethod ConnectAgentResource
2218 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2219 }
2220
2221 // DataplaneV2FeatureSpec: **Dataplane V2**: Spec
2222 type DataplaneV2FeatureSpec struct {
2223 // EnableEncryption: Enable dataplane-v2 based encryption for multiple
2224 // clusters.
2225 EnableEncryption bool `json:"enableEncryption,omitempty"`
2226 // ForceSendFields is a list of field names (e.g. "EnableEncryption") to
2227 // unconditionally include in API requests. By default, fields with empty or
2228 // default values are omitted from API requests. See
2229 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2230 // details.
2231 ForceSendFields []string `json:"-"`
2232 // NullFields is a list of field names (e.g. "EnableEncryption") to include in
2233 // API requests with the JSON null value. By default, fields with empty values
2234 // are omitted from API requests. See
2235 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2236 NullFields []string `json:"-"`
2237 }
2238
2239 func (s DataplaneV2FeatureSpec) MarshalJSON() ([]byte, error) {
2240 type NoMethod DataplaneV2FeatureSpec
2241 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2242 }
2243
2244 // DefaultClusterConfig: DefaultClusterConfig describes the default cluster
2245 // configurations to be applied to all clusters born-in-fleet.
2246 type DefaultClusterConfig struct {
2247 // BinaryAuthorizationConfig: Optional. Enable/Disable binary authorization
2248 // features for the cluster.
2249 BinaryAuthorizationConfig *BinaryAuthorizationConfig `json:"binaryAuthorizationConfig,omitempty"`
2250 // CompliancePostureConfig: Optional. Deprecated: Compliance Posture is no
2251 // longer supported. For more details, see
2252 // https://cloud.google.com/kubernetes-engine/docs/deprecations/posture-management-deprecation.
2253 // Enable/Disable Compliance Posture features for the cluster. Note that on
2254 // UpdateFleet, only full replacement of this field is allowed. Users are not
2255 // allowed for partial updates through field mask.
2256 CompliancePostureConfig *CompliancePostureConfig `json:"compliancePostureConfig,omitempty"`
2257 // SecurityPostureConfig: Optional. Enable/Disable Security Posture features
2258 // for the cluster.
2259 SecurityPostureConfig *SecurityPostureConfig `json:"securityPostureConfig,omitempty"`
2260 // ForceSendFields is a list of field names (e.g. "BinaryAuthorizationConfig")
2261 // to unconditionally include in API requests. By default, fields with empty or
2262 // default values are omitted from API requests. See
2263 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2264 // details.
2265 ForceSendFields []string `json:"-"`
2266 // NullFields is a list of field names (e.g. "BinaryAuthorizationConfig") to
2267 // include in API requests with the JSON null value. By default, fields with
2268 // empty values are omitted from API requests. See
2269 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2270 NullFields []string `json:"-"`
2271 }
2272
2273 func (s DefaultClusterConfig) MarshalJSON() ([]byte, error) {
2274 type NoMethod DefaultClusterConfig
2275 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2276 }
2277
2278 // EdgeCluster: EdgeCluster contains information specific to Google Edge
2279 // Clusters.
2280 type EdgeCluster struct {
2281 // ResourceLink: Immutable. Self-link of the Google Cloud resource for the Edge
2282 // Cluster. For example:
2283 // //edgecontainer.googleapis.com/projects/my-project/locations/us-west1-a/clust
2284 // ers/my-cluster
2285 ResourceLink string `json:"resourceLink,omitempty"`
2286 // ForceSendFields is a list of field names (e.g. "ResourceLink") to
2287 // unconditionally include in API requests. By default, fields with empty or
2288 // default values are omitted from API requests. See
2289 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2290 // details.
2291 ForceSendFields []string `json:"-"`
2292 // NullFields is a list of field names (e.g. "ResourceLink") to include in API
2293 // requests with the JSON null value. By default, fields with empty values are
2294 // omitted from API requests. See
2295 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2296 NullFields []string `json:"-"`
2297 }
2298
2299 func (s EdgeCluster) MarshalJSON() ([]byte, error) {
2300 type NoMethod EdgeCluster
2301 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2302 }
2303
2304 // Empty: A generic empty message that you can re-use to avoid defining
2305 // duplicated empty messages in your APIs. A typical example is to use it as
2306 // the request or the response type of an API method. For instance: service Foo
2307 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
2308 type Empty struct {
2309 // ServerResponse contains the HTTP response code and headers from the server.
2310 googleapi.ServerResponse `json:"-"`
2311 }
2312
2313 // Expr: Represents a textual expression in the Common Expression Language
2314 // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
2315 // of CEL are documented at https://github.com/google/cel-spec. Example
2316 // (Comparison): title: "Summary size limit" description: "Determines if a
2317 // summary is less than 100 chars" expression: "document.summary.size() < 100"
2318 // Example (Equality): title: "Requestor is owner" description: "Determines if
2319 // requestor is the document owner" expression: "document.owner ==
2320 // request.auth.claims.email" Example (Logic): title: "Public documents"
2321 // description: "Determine whether the document should be publicly visible"
2322 // expression: "document.type != 'private' && document.type != 'internal'"
2323 // Example (Data Manipulation): title: "Notification string" description:
2324 // "Create a notification string with a timestamp." expression: "'New message
2325 // received at ' + string(document.create_time)" The exact variables and
2326 // functions that may be referenced within an expression are determined by the
2327 // service that evaluates it. See the service documentation for additional
2328 // information.
2329 type Expr struct {
2330 // Description: Optional. Description of the expression. This is a longer text
2331 // which describes the expression, e.g. when hovered over it in a UI.
2332 Description string `json:"description,omitempty"`
2333 // Expression: Textual representation of an expression in Common Expression
2334 // Language syntax.
2335 Expression string `json:"expression,omitempty"`
2336 // Location: Optional. String indicating the location of the expression for
2337 // error reporting, e.g. a file name and a position in the file.
2338 Location string `json:"location,omitempty"`
2339 // Title: Optional. Title for the expression, i.e. a short string describing
2340 // its purpose. This can be used e.g. in UIs which allow to enter the
2341 // expression.
2342 Title string `json:"title,omitempty"`
2343 // ForceSendFields is a list of field names (e.g. "Description") to
2344 // unconditionally include in API requests. By default, fields with empty or
2345 // default values are omitted from API requests. See
2346 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2347 // details.
2348 ForceSendFields []string `json:"-"`
2349 // NullFields is a list of field names (e.g. "Description") to include in API
2350 // requests with the JSON null value. By default, fields with empty values are
2351 // omitted from API requests. See
2352 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2353 NullFields []string `json:"-"`
2354 }
2355
2356 func (s Expr) MarshalJSON() ([]byte, error) {
2357 type NoMethod Expr
2358 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2359 }
2360
2361 // Feature: Feature represents the settings and status of any Fleet Feature.
2362 type Feature struct {
2363 // CreateTime: Output only. When the Feature resource was created.
2364 CreateTime string `json:"createTime,omitempty"`
2365 // DeleteTime: Output only. When the Feature resource was deleted.
2366 DeleteTime string `json:"deleteTime,omitempty"`
2367 // FleetDefaultMemberConfig: Optional. Feature configuration applicable to all
2368 // memberships of the fleet.
2369 FleetDefaultMemberConfig *CommonFleetDefaultMemberConfigSpec `json:"fleetDefaultMemberConfig,omitempty"`
2370 // Labels: Labels for this Feature.
2371 Labels map[string]string `json:"labels,omitempty"`
2372 // MembershipSpecs: Optional. Membership-specific configuration for this
2373 // Feature. If this Feature does not support any per-Membership configuration,
2374 // this field may be unused. The keys indicate which Membership the
2375 // configuration is for, in the form:
2376 // `projects/{p}/locations/{l}/memberships/{m}` Where {p} is the project, {l}
2377 // is a valid location and {m} is a valid Membership in this project at that
2378 // location. {p} WILL match the Feature's project. {p} will always be returned
2379 // as the project number, but the project ID is also accepted during input. If
2380 // the same Membership is specified in the map twice (using the project ID
2381 // form, and the project number form), exactly ONE of the entries will be
2382 // saved, with no guarantees as to which. For this reason, it is recommended
2383 // the same format be used for all entries when mutating a Feature.
2384 MembershipSpecs map[string]MembershipFeatureSpec `json:"membershipSpecs,omitempty"`
2385 // MembershipStates: Output only. Membership-specific Feature status. If this
2386 // Feature does report any per-Membership status, this field may be unused. The
2387 // keys indicate which Membership the state is for, in the form:
2388 // `projects/{p}/locations/{l}/memberships/{m}` Where {p} is the project
2389 // number, {l} is a valid location and {m} is a valid Membership in this
2390 // project at that location. {p} MUST match the Feature's project number.
2391 MembershipStates map[string]MembershipFeatureState `json:"membershipStates,omitempty"`
2392 // Name: Output only. The full, unique name of this Feature resource in the
2393 // format `projects/*/locations/*/features/*`.
2394 Name string `json:"name,omitempty"`
2395 // ResourceState: Output only. State of the Feature resource itself.
2396 ResourceState *FeatureResourceState `json:"resourceState,omitempty"`
2397 // ScopeSpecs: Optional. Scope-specific configuration for this Feature. If this
2398 // Feature does not support any per-Scope configuration, this field may be
2399 // unused. The keys indicate which Scope the configuration is for, in the form:
2400 // `projects/{p}/locations/global/scopes/{s}` Where {p} is the project, {s} is
2401 // a valid Scope in this project. {p} WILL match the Feature's project. {p}
2402 // will always be returned as the project number, but the project ID is also
2403 // accepted during input. If the same Scope is specified in the map twice
2404 // (using the project ID form, and the project number form), exactly ONE of the
2405 // entries will be saved, with no guarantees as to which. For this reason, it
2406 // is recommended the same format be used for all entries when mutating a
2407 // Feature.
2408 ScopeSpecs map[string]ScopeFeatureSpec `json:"scopeSpecs,omitempty"`
2409 // ScopeStates: Output only. Scope-specific Feature status. If this Feature
2410 // does report any per-Scope status, this field may be unused. The keys
2411 // indicate which Scope the state is for, in the form:
2412 // `projects/{p}/locations/global/scopes/{s}` Where {p} is the project, {s} is
2413 // a valid Scope in this project. {p} WILL match the Feature's project.
2414 ScopeStates map[string]ScopeFeatureState `json:"scopeStates,omitempty"`
2415 // Spec: Optional. Fleet-wide Feature configuration. If this Feature does not
2416 // support any Fleet-wide configuration, this field may be unused.
2417 Spec *CommonFeatureSpec `json:"spec,omitempty"`
2418 // State: Output only. The Fleet-wide Feature state.
2419 State *CommonFeatureState `json:"state,omitempty"`
2420 // Unreachable: Output only. List of locations that could not be reached while
2421 // fetching this feature.
2422 Unreachable []string `json:"unreachable,omitempty"`
2423 // UpdateTime: Output only. When the Feature resource was last updated.
2424 UpdateTime string `json:"updateTime,omitempty"`
2425
2426 // ServerResponse contains the HTTP response code and headers from the server.
2427 googleapi.ServerResponse `json:"-"`
2428 // ForceSendFields is a list of field names (e.g. "CreateTime") to
2429 // unconditionally include in API requests. By default, fields with empty or
2430 // default values are omitted from API requests. See
2431 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2432 // details.
2433 ForceSendFields []string `json:"-"`
2434 // NullFields is a list of field names (e.g. "CreateTime") to include in API
2435 // requests with the JSON null value. By default, fields with empty values are
2436 // omitted from API requests. See
2437 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2438 NullFields []string `json:"-"`
2439 }
2440
2441 func (s Feature) MarshalJSON() ([]byte, error) {
2442 type NoMethod Feature
2443 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2444 }
2445
2446 // FeatureResourceState: FeatureResourceState describes the state of a Feature
2447 // *resource* in the GkeHub API. See `FeatureState` for the "running state" of
2448 // the Feature in the Fleet and across Memberships.
2449 type FeatureResourceState struct {
2450 // State: The current state of the Feature resource in the Hub API.
2451 //
2452 // Possible values:
2453 // "STATE_UNSPECIFIED" - State is unknown or not set.
2454 // "ENABLING" - The Feature is being enabled, and the Feature resource is
2455 // being created. Once complete, the corresponding Feature will be enabled in
2456 // this Fleet.
2457 // "ACTIVE" - The Feature is enabled in this Fleet, and the Feature resource
2458 // is fully available.
2459 // "DISABLING" - The Feature is being disabled in this Fleet, and the Feature
2460 // resource is being deleted.
2461 // "UPDATING" - The Feature resource is being updated.
2462 // "SERVICE_UPDATING" - The Feature resource is being updated by the Hub
2463 // Service.
2464 State string `json:"state,omitempty"`
2465 // ForceSendFields is a list of field names (e.g. "State") to unconditionally
2466 // include in API requests. By default, fields with empty or default values are
2467 // omitted from API requests. See
2468 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2469 // details.
2470 ForceSendFields []string `json:"-"`
2471 // NullFields is a list of field names (e.g. "State") to include in API
2472 // requests with the JSON null value. By default, fields with empty values are
2473 // omitted from API requests. See
2474 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2475 NullFields []string `json:"-"`
2476 }
2477
2478 func (s FeatureResourceState) MarshalJSON() ([]byte, error) {
2479 type NoMethod FeatureResourceState
2480 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2481 }
2482
2483 // FeatureState: FeatureState describes the high-level state of a Feature. It
2484 // may be used to describe a Feature's state at the environ-level, or
2485 // per-membershop, depending on the context.
2486 type FeatureState struct {
2487 // Code: The high-level, machine-readable status of this Feature.
2488 //
2489 // Possible values:
2490 // "CODE_UNSPECIFIED" - Unknown or not set.
2491 // "OK" - The Feature is operating normally.
2492 // "WARNING" - The Feature has encountered an issue, and is operating in a
2493 // degraded state. The Feature may need intervention to return to normal
2494 // operation. See the description and any associated Feature-specific details
2495 // for more information.
2496 // "ERROR" - The Feature is not operating or is in a severely degraded state.
2497 // The Feature may need intervention to return to normal operation. See the
2498 // description and any associated Feature-specific details for more
2499 // information.
2500 Code string `json:"code,omitempty"`
2501 // Description: A human-readable description of the current status.
2502 Description string `json:"description,omitempty"`
2503 // UpdateTime: The time this status and any related Feature-specific details
2504 // were updated.
2505 UpdateTime string `json:"updateTime,omitempty"`
2506 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2507 // include in API requests. By default, fields with empty or default values are
2508 // omitted from API requests. See
2509 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2510 // details.
2511 ForceSendFields []string `json:"-"`
2512 // NullFields is a list of field names (e.g. "Code") to include in API requests
2513 // with the JSON null value. By default, fields with empty values are omitted
2514 // from API requests. See
2515 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2516 NullFields []string `json:"-"`
2517 }
2518
2519 func (s FeatureState) MarshalJSON() ([]byte, error) {
2520 type NoMethod FeatureState
2521 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2522 }
2523
2524 // Fleet: Fleet contains the Fleet-wide metadata and configuration.
2525 type Fleet struct {
2526 // CreateTime: Output only. When the Fleet was created.
2527 CreateTime string `json:"createTime,omitempty"`
2528 // DefaultClusterConfig: Optional. The default cluster configurations to apply
2529 // across the fleet.
2530 DefaultClusterConfig *DefaultClusterConfig `json:"defaultClusterConfig,omitempty"`
2531 // DeleteTime: Output only. When the Fleet was deleted.
2532 DeleteTime string `json:"deleteTime,omitempty"`
2533 // DisplayName: Optional. A user-assigned display name of the Fleet. When
2534 // present, it must be between 4 to 30 characters. Allowed characters are:
2535 // lowercase and uppercase letters, numbers, hyphen, single-quote,
2536 // double-quote, space, and exclamation point. Example: `Production Fleet`
2537 DisplayName string `json:"displayName,omitempty"`
2538 // Labels: Optional. Labels for this Fleet.
2539 Labels map[string]string `json:"labels,omitempty"`
2540 // Name: Output only. The full, unique resource name of this fleet in the
2541 // format of `projects/{project}/locations/{location}/fleets/{fleet}`. Each
2542 // Google Cloud project can have at most one fleet resource, named "default".
2543 Name string `json:"name,omitempty"`
2544 // State: Output only. State of the namespace resource.
2545 State *FleetLifecycleState `json:"state,omitempty"`
2546 // Uid: Output only. Google-generated UUID for this resource. This is unique
2547 // across all Fleet resources. If a Fleet resource is deleted and another
2548 // resource with the same name is created, it gets a different uid.
2549 Uid string `json:"uid,omitempty"`
2550 // UpdateTime: Output only. When the Fleet was last updated.
2551 UpdateTime string `json:"updateTime,omitempty"`
2552
2553 // ServerResponse contains the HTTP response code and headers from the server.
2554 googleapi.ServerResponse `json:"-"`
2555 // ForceSendFields is a list of field names (e.g. "CreateTime") to
2556 // unconditionally include in API requests. By default, fields with empty or
2557 // default values are omitted from API requests. See
2558 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2559 // details.
2560 ForceSendFields []string `json:"-"`
2561 // NullFields is a list of field names (e.g. "CreateTime") to include in API
2562 // requests with the JSON null value. By default, fields with empty values are
2563 // omitted from API requests. See
2564 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2565 NullFields []string `json:"-"`
2566 }
2567
2568 func (s Fleet) MarshalJSON() ([]byte, error) {
2569 type NoMethod Fleet
2570 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2571 }
2572
2573 // FleetLifecycleState: FleetLifecycleState describes the state of a Fleet
2574 // resource.
2575 type FleetLifecycleState struct {
2576 // Code: Output only. The current state of the Fleet resource.
2577 //
2578 // Possible values:
2579 // "CODE_UNSPECIFIED" - The code is not set.
2580 // "CREATING" - The fleet is being created.
2581 // "READY" - The fleet active.
2582 // "DELETING" - The fleet is being deleted.
2583 // "UPDATING" - The fleet is being updated.
2584 Code string `json:"code,omitempty"`
2585 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2586 // include in API requests. By default, fields with empty or default values are
2587 // omitted from API requests. See
2588 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2589 // details.
2590 ForceSendFields []string `json:"-"`
2591 // NullFields is a list of field names (e.g. "Code") to include in API requests
2592 // with the JSON null value. By default, fields with empty values are omitted
2593 // from API requests. See
2594 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2595 NullFields []string `json:"-"`
2596 }
2597
2598 func (s FleetLifecycleState) MarshalJSON() ([]byte, error) {
2599 type NoMethod FleetLifecycleState
2600 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2601 }
2602
2603 // FleetObservabilityFeatureError: All error details of the fleet observability
2604 // feature.
2605 type FleetObservabilityFeatureError struct {
2606 // Code: The code of the error.
2607 Code string `json:"code,omitempty"`
2608 // Description: A human-readable description of the current status.
2609 Description string `json:"description,omitempty"`
2610 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2611 // include in API requests. By default, fields with empty or default values are
2612 // omitted from API requests. See
2613 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2614 // details.
2615 ForceSendFields []string `json:"-"`
2616 // NullFields is a list of field names (e.g. "Code") to include in API requests
2617 // with the JSON null value. By default, fields with empty values are omitted
2618 // from API requests. See
2619 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2620 NullFields []string `json:"-"`
2621 }
2622
2623 func (s FleetObservabilityFeatureError) MarshalJSON() ([]byte, error) {
2624 type NoMethod FleetObservabilityFeatureError
2625 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2626 }
2627
2628 // FleetObservabilityFeatureSpec: **Fleet Observability**: The Hub-wide input
2629 // for the FleetObservability feature.
2630 type FleetObservabilityFeatureSpec struct {
2631 // LoggingConfig: Specified if fleet logging feature is enabled for the entire
2632 // fleet. If UNSPECIFIED, fleet logging feature is disabled for the entire
2633 // fleet.
2634 LoggingConfig *FleetObservabilityLoggingConfig `json:"loggingConfig,omitempty"`
2635 // ForceSendFields is a list of field names (e.g. "LoggingConfig") to
2636 // unconditionally include in API requests. By default, fields with empty or
2637 // default values are omitted from API requests. See
2638 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2639 // details.
2640 ForceSendFields []string `json:"-"`
2641 // NullFields is a list of field names (e.g. "LoggingConfig") to include in API
2642 // requests with the JSON null value. By default, fields with empty values are
2643 // omitted from API requests. See
2644 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2645 NullFields []string `json:"-"`
2646 }
2647
2648 func (s FleetObservabilityFeatureSpec) MarshalJSON() ([]byte, error) {
2649 type NoMethod FleetObservabilityFeatureSpec
2650 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2651 }
2652
2653 // FleetObservabilityFeatureState: **FleetObservability**: Hub-wide Feature for
2654 // FleetObservability feature. state.
2655 type FleetObservabilityFeatureState struct {
2656 // Logging: The feature state of default logging.
2657 Logging *FleetObservabilityFleetObservabilityLoggingState `json:"logging,omitempty"`
2658 // Monitoring: The feature state of fleet monitoring.
2659 Monitoring *FleetObservabilityFleetObservabilityMonitoringState `json:"monitoring,omitempty"`
2660 // ForceSendFields is a list of field names (e.g. "Logging") to unconditionally
2661 // include in API requests. By default, fields with empty or default values are
2662 // omitted from API requests. See
2663 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2664 // details.
2665 ForceSendFields []string `json:"-"`
2666 // NullFields is a list of field names (e.g. "Logging") to include in API
2667 // requests with the JSON null value. By default, fields with empty values are
2668 // omitted from API requests. See
2669 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2670 NullFields []string `json:"-"`
2671 }
2672
2673 func (s FleetObservabilityFeatureState) MarshalJSON() ([]byte, error) {
2674 type NoMethod FleetObservabilityFeatureState
2675 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2676 }
2677
2678 // FleetObservabilityFleetObservabilityBaseFeatureState: Base state for fleet
2679 // observability feature.
2680 type FleetObservabilityFleetObservabilityBaseFeatureState struct {
2681 // Code: The high-level, machine-readable status of this Feature.
2682 //
2683 // Possible values:
2684 // "CODE_UNSPECIFIED" - Unknown or not set.
2685 // "OK" - The Feature is operating normally.
2686 // "ERROR" - The Feature is encountering errors in the reconciliation. The
2687 // Feature may need intervention to return to normal operation. See the
2688 // description and any associated Feature-specific details for more
2689 // information.
2690 Code string `json:"code,omitempty"`
2691 // Errors: Errors after reconciling the monitoring and logging feature if the
2692 // code is not OK.
2693 Errors []*FleetObservabilityFeatureError `json:"errors,omitempty"`
2694 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2695 // include in API requests. By default, fields with empty or default values are
2696 // omitted from API requests. See
2697 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2698 // details.
2699 ForceSendFields []string `json:"-"`
2700 // NullFields is a list of field names (e.g. "Code") to include in API requests
2701 // with the JSON null value. By default, fields with empty values are omitted
2702 // from API requests. See
2703 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2704 NullFields []string `json:"-"`
2705 }
2706
2707 func (s FleetObservabilityFleetObservabilityBaseFeatureState) MarshalJSON() ([]byte, error) {
2708 type NoMethod FleetObservabilityFleetObservabilityBaseFeatureState
2709 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2710 }
2711
2712 // FleetObservabilityFleetObservabilityLoggingState: Feature state for logging
2713 // feature.
2714 type FleetObservabilityFleetObservabilityLoggingState struct {
2715 // DefaultLog: The base feature state of fleet default log.
2716 DefaultLog *FleetObservabilityFleetObservabilityBaseFeatureState `json:"defaultLog,omitempty"`
2717 // ScopeLog: The base feature state of fleet scope log.
2718 ScopeLog *FleetObservabilityFleetObservabilityBaseFeatureState `json:"scopeLog,omitempty"`
2719 // ForceSendFields is a list of field names (e.g. "DefaultLog") to
2720 // unconditionally include in API requests. By default, fields with empty or
2721 // default values are omitted from API requests. See
2722 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2723 // details.
2724 ForceSendFields []string `json:"-"`
2725 // NullFields is a list of field names (e.g. "DefaultLog") to include in API
2726 // requests with the JSON null value. By default, fields with empty values are
2727 // omitted from API requests. See
2728 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2729 NullFields []string `json:"-"`
2730 }
2731
2732 func (s FleetObservabilityFleetObservabilityLoggingState) MarshalJSON() ([]byte, error) {
2733 type NoMethod FleetObservabilityFleetObservabilityLoggingState
2734 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2735 }
2736
2737 // FleetObservabilityFleetObservabilityMonitoringState: Feature state for
2738 // monitoring feature.
2739 type FleetObservabilityFleetObservabilityMonitoringState struct {
2740 // State: The base feature state of fleet monitoring feature.
2741 State *FleetObservabilityFleetObservabilityBaseFeatureState `json:"state,omitempty"`
2742 // ForceSendFields is a list of field names (e.g. "State") to unconditionally
2743 // include in API requests. By default, fields with empty or default values are
2744 // omitted from API requests. See
2745 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2746 // details.
2747 ForceSendFields []string `json:"-"`
2748 // NullFields is a list of field names (e.g. "State") to include in API
2749 // requests with the JSON null value. By default, fields with empty values are
2750 // omitted from API requests. See
2751 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2752 NullFields []string `json:"-"`
2753 }
2754
2755 func (s FleetObservabilityFleetObservabilityMonitoringState) MarshalJSON() ([]byte, error) {
2756 type NoMethod FleetObservabilityFleetObservabilityMonitoringState
2757 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2758 }
2759
2760 // FleetObservabilityLoggingConfig: LoggingConfig defines the configuration for
2761 // different types of logs.
2762 type FleetObservabilityLoggingConfig struct {
2763 // DefaultConfig: Specified if applying the default routing config to logs not
2764 // specified in other configs.
2765 DefaultConfig *FleetObservabilityRoutingConfig `json:"defaultConfig,omitempty"`
2766 // FleetScopeLogsConfig: Specified if applying the routing config to all logs
2767 // for all fleet scopes.
2768 FleetScopeLogsConfig *FleetObservabilityRoutingConfig `json:"fleetScopeLogsConfig,omitempty"`
2769 // ForceSendFields is a list of field names (e.g. "DefaultConfig") to
2770 // unconditionally include in API requests. By default, fields with empty or
2771 // default values are omitted from API requests. See
2772 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2773 // details.
2774 ForceSendFields []string `json:"-"`
2775 // NullFields is a list of field names (e.g. "DefaultConfig") to include in API
2776 // requests with the JSON null value. By default, fields with empty values are
2777 // omitted from API requests. See
2778 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2779 NullFields []string `json:"-"`
2780 }
2781
2782 func (s FleetObservabilityLoggingConfig) MarshalJSON() ([]byte, error) {
2783 type NoMethod FleetObservabilityLoggingConfig
2784 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2785 }
2786
2787 // FleetObservabilityMembershipSpec: **FleetObservability**: The
2788 // membership-specific input for FleetObservability feature.
2789 type FleetObservabilityMembershipSpec struct {
2790 }
2791
2792 // FleetObservabilityMembershipState: **FleetObservability**:
2793 // Membership-specific Feature state for fleetobservability.
2794 type FleetObservabilityMembershipState struct {
2795 }
2796
2797 // FleetObservabilityRoutingConfig: RoutingConfig configures the behaviour of
2798 // fleet logging feature.
2799 type FleetObservabilityRoutingConfig struct {
2800 // Mode: mode configures the logs routing mode.
2801 //
2802 // Possible values:
2803 // "MODE_UNSPECIFIED" - If UNSPECIFIED, fleet logging feature is disabled.
2804 // "COPY" - logs will be copied to the destination project.
2805 // "MOVE" - logs will be moved to the destination project.
2806 Mode string `json:"mode,omitempty"`
2807 // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally
2808 // include in API requests. By default, fields with empty or default values are
2809 // omitted from API requests. See
2810 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2811 // details.
2812 ForceSendFields []string `json:"-"`
2813 // NullFields is a list of field names (e.g. "Mode") to include in API requests
2814 // with the JSON null value. By default, fields with empty values are omitted
2815 // from API requests. See
2816 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2817 NullFields []string `json:"-"`
2818 }
2819
2820 func (s FleetObservabilityRoutingConfig) MarshalJSON() ([]byte, error) {
2821 type NoMethod FleetObservabilityRoutingConfig
2822 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2823 }
2824
2825 // GenerateConnectManifestResponse: GenerateConnectManifestResponse contains
2826 // manifest information for installing/upgrading a Connect agent.
2827 type GenerateConnectManifestResponse struct {
2828 // Manifest: The ordered list of Kubernetes resources that need to be applied
2829 // to the cluster for GKE Connect agent installation/upgrade.
2830 Manifest []*ConnectAgentResource `json:"manifest,omitempty"`
2831
2832 // ServerResponse contains the HTTP response code and headers from the server.
2833 googleapi.ServerResponse `json:"-"`
2834 // ForceSendFields is a list of field names (e.g. "Manifest") to
2835 // unconditionally include in API requests. By default, fields with empty or
2836 // default values are omitted from API requests. See
2837 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2838 // details.
2839 ForceSendFields []string `json:"-"`
2840 // NullFields is a list of field names (e.g. "Manifest") to include in API
2841 // requests with the JSON null value. By default, fields with empty values are
2842 // omitted from API requests. See
2843 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2844 NullFields []string `json:"-"`
2845 }
2846
2847 func (s GenerateConnectManifestResponse) MarshalJSON() ([]byte, error) {
2848 type NoMethod GenerateConnectManifestResponse
2849 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2850 }
2851
2852 // GenerateMembershipRBACRoleBindingYAMLResponse: Response for
2853 // GenerateRBACRoleBindingYAML.
2854 type GenerateMembershipRBACRoleBindingYAMLResponse struct {
2855 // RoleBindingsYaml: a yaml text blob including the RBAC policies.
2856 RoleBindingsYaml string `json:"roleBindingsYaml,omitempty"`
2857
2858 // ServerResponse contains the HTTP response code and headers from the server.
2859 googleapi.ServerResponse `json:"-"`
2860 // ForceSendFields is a list of field names (e.g. "RoleBindingsYaml") to
2861 // unconditionally include in API requests. By default, fields with empty or
2862 // default values are omitted from API requests. See
2863 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2864 // details.
2865 ForceSendFields []string `json:"-"`
2866 // NullFields is a list of field names (e.g. "RoleBindingsYaml") to include in
2867 // API requests with the JSON null value. By default, fields with empty values
2868 // are omitted from API requests. See
2869 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2870 NullFields []string `json:"-"`
2871 }
2872
2873 func (s GenerateMembershipRBACRoleBindingYAMLResponse) MarshalJSON() ([]byte, error) {
2874 type NoMethod GenerateMembershipRBACRoleBindingYAMLResponse
2875 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2876 }
2877
2878 // GkeCluster: GkeCluster contains information specific to GKE clusters.
2879 type GkeCluster struct {
2880 // ClusterMissing: Output only. If cluster_missing is set then it denotes that
2881 // the GKE cluster no longer exists in the GKE Control Plane.
2882 ClusterMissing bool `json:"clusterMissing,omitempty"`
2883 // ResourceLink: Immutable. Self-link of the Google Cloud resource for the GKE
2884 // cluster. For example:
2885 // //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/
2886 // my-cluster Zonal clusters are also supported.
2887 ResourceLink string `json:"resourceLink,omitempty"`
2888 // ForceSendFields is a list of field names (e.g. "ClusterMissing") to
2889 // unconditionally include in API requests. By default, fields with empty or
2890 // default values are omitted from API requests. See
2891 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2892 // details.
2893 ForceSendFields []string `json:"-"`
2894 // NullFields is a list of field names (e.g. "ClusterMissing") to include in
2895 // API requests with the JSON null value. By default, fields with empty values
2896 // are omitted from API requests. See
2897 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2898 NullFields []string `json:"-"`
2899 }
2900
2901 func (s GkeCluster) MarshalJSON() ([]byte, error) {
2902 type NoMethod GkeCluster
2903 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2904 }
2905
2906 // GoogleRpcStatus: The `Status` type defines a logical error model that is
2907 // suitable for different programming environments, including REST APIs and RPC
2908 // APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message
2909 // contains three pieces of data: error code, error message, and error details.
2910 // You can find out more about this error model and how to work with it in the
2911 // API Design Guide (https://cloud.google.com/apis/design/errors).
2912 type GoogleRpcStatus struct {
2913 // Code: The status code, which should be an enum value of google.rpc.Code.
2914 Code int64 `json:"code,omitempty"`
2915 // Details: A list of messages that carry the error details. There is a common
2916 // set of message types for APIs to use.
2917 Details []googleapi.RawMessage `json:"details,omitempty"`
2918 // Message: A developer-facing error message, which should be in English. Any
2919 // user-facing error message should be localized and sent in the
2920 // google.rpc.Status.details field, or localized by the client.
2921 Message string `json:"message,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 GoogleRpcStatus) MarshalJSON() ([]byte, error) {
2936 type NoMethod GoogleRpcStatus
2937 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2938 }
2939
2940 // IdentityServiceAuthMethod: Configuration of an auth method for a
2941 // member/cluster. Only one authentication method (e.g., OIDC and LDAP) can be
2942 // set per AuthMethod.
2943 type IdentityServiceAuthMethod struct {
2944 // AzureadConfig: AzureAD specific Configuration.
2945 AzureadConfig *IdentityServiceAzureADConfig `json:"azureadConfig,omitempty"`
2946 // GoogleConfig: GoogleConfig specific configuration.
2947 GoogleConfig *IdentityServiceGoogleConfig `json:"googleConfig,omitempty"`
2948 // LdapConfig: LDAP specific configuration.
2949 LdapConfig *IdentityServiceLdapConfig `json:"ldapConfig,omitempty"`
2950 // Name: Identifier for auth config.
2951 Name string `json:"name,omitempty"`
2952 // OidcConfig: OIDC specific configuration.
2953 OidcConfig *IdentityServiceOidcConfig `json:"oidcConfig,omitempty"`
2954 // Proxy: Proxy server address to use for auth method.
2955 Proxy string `json:"proxy,omitempty"`
2956 // SamlConfig: SAML specific configuration.
2957 SamlConfig *IdentityServiceSamlConfig `json:"samlConfig,omitempty"`
2958 // ForceSendFields is a list of field names (e.g. "AzureadConfig") to
2959 // unconditionally include in API requests. By default, fields with empty or
2960 // default values are omitted from API requests. See
2961 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2962 // details.
2963 ForceSendFields []string `json:"-"`
2964 // NullFields is a list of field names (e.g. "AzureadConfig") to include in API
2965 // requests with the JSON null value. By default, fields with empty values are
2966 // omitted from API requests. See
2967 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2968 NullFields []string `json:"-"`
2969 }
2970
2971 func (s IdentityServiceAuthMethod) MarshalJSON() ([]byte, error) {
2972 type NoMethod IdentityServiceAuthMethod
2973 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2974 }
2975
2976 // IdentityServiceAzureADConfig: Configuration for the AzureAD Auth flow.
2977 type IdentityServiceAzureADConfig struct {
2978 // ClientId: ID for the registered client application that makes authentication
2979 // requests to the Azure AD identity provider.
2980 ClientId string `json:"clientId,omitempty"`
2981 // ClientSecret: Input only. Unencrypted AzureAD client secret will be passed
2982 // to the GKE Hub CLH.
2983 ClientSecret string `json:"clientSecret,omitempty"`
2984 // EncryptedClientSecret: Output only. Encrypted AzureAD client secret.
2985 EncryptedClientSecret string `json:"encryptedClientSecret,omitempty"`
2986 // GroupFormat: Optional. Format of the AzureAD groups that the client wants
2987 // for auth.
2988 GroupFormat string `json:"groupFormat,omitempty"`
2989 // KubectlRedirectUri: The redirect URL that kubectl uses for authorization.
2990 KubectlRedirectUri string `json:"kubectlRedirectUri,omitempty"`
2991 // Tenant: Kind of Azure AD account to be authenticated. Supported values are
2992 // or for accounts belonging to a specific tenant.
2993 Tenant string `json:"tenant,omitempty"`
2994 // UserClaim: Optional. Claim in the AzureAD ID Token that holds the user
2995 // details.
2996 UserClaim string `json:"userClaim,omitempty"`
2997 // ForceSendFields is a list of field names (e.g. "ClientId") to
2998 // unconditionally include in API requests. By default, fields with empty or
2999 // default values are omitted from API requests. See
3000 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3001 // details.
3002 ForceSendFields []string `json:"-"`
3003 // NullFields is a list of field names (e.g. "ClientId") to include in API
3004 // requests with the JSON null value. By default, fields with empty values are
3005 // omitted from API requests. See
3006 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3007 NullFields []string `json:"-"`
3008 }
3009
3010 func (s IdentityServiceAzureADConfig) MarshalJSON() ([]byte, error) {
3011 type NoMethod IdentityServiceAzureADConfig
3012 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3013 }
3014
3015 // IdentityServiceDiagnosticInterface: Configuration options for the AIS
3016 // diagnostic interface.
3017 type IdentityServiceDiagnosticInterface struct {
3018 // Enabled: Determines whether to enable the diagnostic interface.
3019 Enabled bool `json:"enabled,omitempty"`
3020 // ExpirationTime: Determines the expiration time of the diagnostic interface
3021 // enablement. When reached, requests to the interface would be automatically
3022 // rejected.
3023 ExpirationTime string `json:"expirationTime,omitempty"`
3024 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
3025 // include in API requests. By default, fields with empty or default values are
3026 // omitted from API requests. See
3027 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3028 // details.
3029 ForceSendFields []string `json:"-"`
3030 // NullFields is a list of field names (e.g. "Enabled") to include in API
3031 // requests with the JSON null value. By default, fields with empty values are
3032 // omitted from API requests. See
3033 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3034 NullFields []string `json:"-"`
3035 }
3036
3037 func (s IdentityServiceDiagnosticInterface) MarshalJSON() ([]byte, error) {
3038 type NoMethod IdentityServiceDiagnosticInterface
3039 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3040 }
3041
3042 // IdentityServiceGoogleConfig: Configuration for the Google Plugin Auth flow.
3043 type IdentityServiceGoogleConfig struct {
3044 // Disable: Disable automatic configuration of Google Plugin on supported
3045 // platforms.
3046 Disable bool `json:"disable,omitempty"`
3047 // ForceSendFields is a list of field names (e.g. "Disable") to unconditionally
3048 // include in API requests. By default, fields with empty or default values are
3049 // omitted from API requests. See
3050 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3051 // details.
3052 ForceSendFields []string `json:"-"`
3053 // NullFields is a list of field names (e.g. "Disable") to include in API
3054 // requests with the JSON null value. By default, fields with empty values are
3055 // omitted from API requests. See
3056 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3057 NullFields []string `json:"-"`
3058 }
3059
3060 func (s IdentityServiceGoogleConfig) MarshalJSON() ([]byte, error) {
3061 type NoMethod IdentityServiceGoogleConfig
3062 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3063 }
3064
3065 // IdentityServiceGroupConfig: Contains the properties for locating and
3066 // authenticating groups in the directory.
3067 type IdentityServiceGroupConfig struct {
3068 // BaseDn: Required. The location of the subtree in the LDAP directory to
3069 // search for group entries.
3070 BaseDn string `json:"baseDn,omitempty"`
3071 // Filter: Optional. Optional filter to be used when searching for groups a
3072 // user belongs to. This can be used to explicitly match only certain groups in
3073 // order to reduce the amount of groups returned for each user. This defaults
3074 // to "(objectClass=Group)".
3075 Filter string `json:"filter,omitempty"`
3076 // IdAttribute: Optional. The identifying name of each group a user belongs to.
3077 // For example, if this is set to "distinguishedName" then RBACs and other
3078 // group expectations should be written as full DNs. This defaults to
3079 // "distinguishedName".
3080 IdAttribute string `json:"idAttribute,omitempty"`
3081 // ForceSendFields is a list of field names (e.g. "BaseDn") to unconditionally
3082 // include in API requests. By default, fields with empty or default values are
3083 // 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. "BaseDn") 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 IdentityServiceGroupConfig) MarshalJSON() ([]byte, error) {
3095 type NoMethod IdentityServiceGroupConfig
3096 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3097 }
3098
3099 // IdentityServiceIdentityServiceOptions: Holds non-protocol-related
3100 // configuration options.
3101 type IdentityServiceIdentityServiceOptions struct {
3102 // DiagnosticInterface: Configuration options for the AIS diagnostic interface.
3103 DiagnosticInterface *IdentityServiceDiagnosticInterface `json:"diagnosticInterface,omitempty"`
3104 // SessionDuration: Determines the lifespan of STS tokens issued by Anthos
3105 // Identity Service.
3106 SessionDuration string `json:"sessionDuration,omitempty"`
3107 // ForceSendFields is a list of field names (e.g. "DiagnosticInterface") to
3108 // unconditionally include in API requests. By default, fields with empty or
3109 // default values are omitted from API requests. See
3110 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3111 // details.
3112 ForceSendFields []string `json:"-"`
3113 // NullFields is a list of field names (e.g. "DiagnosticInterface") to include
3114 // in API requests with the JSON null value. By default, fields with empty
3115 // values are omitted from API requests. See
3116 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3117 NullFields []string `json:"-"`
3118 }
3119
3120 func (s IdentityServiceIdentityServiceOptions) MarshalJSON() ([]byte, error) {
3121 type NoMethod IdentityServiceIdentityServiceOptions
3122 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3123 }
3124
3125 // IdentityServiceLdapConfig: Configuration for the LDAP Auth flow.
3126 type IdentityServiceLdapConfig struct {
3127 // Group: Optional. Contains the properties for locating and authenticating
3128 // groups in the directory.
3129 Group *IdentityServiceGroupConfig `json:"group,omitempty"`
3130 // Server: Required. Server settings for the external LDAP server.
3131 Server *IdentityServiceServerConfig `json:"server,omitempty"`
3132 // ServiceAccount: Required. Contains the credentials of the service account
3133 // which is authorized to perform the LDAP search in the directory. The
3134 // credentials can be supplied by the combination of the DN and password or the
3135 // client certificate.
3136 ServiceAccount *IdentityServiceServiceAccountConfig `json:"serviceAccount,omitempty"`
3137 // User: Required. Defines where users exist in the LDAP directory.
3138 User *IdentityServiceUserConfig `json:"user,omitempty"`
3139 // ForceSendFields is a list of field names (e.g. "Group") to unconditionally
3140 // include in API requests. By default, fields with empty or default values are
3141 // omitted from API requests. See
3142 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3143 // details.
3144 ForceSendFields []string `json:"-"`
3145 // NullFields is a list of field names (e.g. "Group") to include in API
3146 // requests with the JSON null value. By default, fields with empty values are
3147 // omitted from API requests. See
3148 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3149 NullFields []string `json:"-"`
3150 }
3151
3152 func (s IdentityServiceLdapConfig) MarshalJSON() ([]byte, error) {
3153 type NoMethod IdentityServiceLdapConfig
3154 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3155 }
3156
3157 // IdentityServiceMembershipSpec: **Anthos Identity Service**: Configuration
3158 // for a single Membership.
3159 type IdentityServiceMembershipSpec struct {
3160 // AuthMethods: A member may support multiple auth methods.
3161 AuthMethods []*IdentityServiceAuthMethod `json:"authMethods,omitempty"`
3162 // IdentityServiceOptions: Optional. non-protocol-related configuration
3163 // options.
3164 IdentityServiceOptions *IdentityServiceIdentityServiceOptions `json:"identityServiceOptions,omitempty"`
3165 // ForceSendFields is a list of field names (e.g. "AuthMethods") to
3166 // unconditionally include in API requests. By default, fields with empty or
3167 // default values are omitted from API requests. See
3168 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3169 // details.
3170 ForceSendFields []string `json:"-"`
3171 // NullFields is a list of field names (e.g. "AuthMethods") to include in API
3172 // requests with the JSON null value. By default, fields with empty values are
3173 // omitted from API requests. See
3174 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3175 NullFields []string `json:"-"`
3176 }
3177
3178 func (s IdentityServiceMembershipSpec) MarshalJSON() ([]byte, error) {
3179 type NoMethod IdentityServiceMembershipSpec
3180 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3181 }
3182
3183 // IdentityServiceMembershipState: **Anthos Identity Service**: State for a
3184 // single Membership.
3185 type IdentityServiceMembershipState struct {
3186 // FailureReason: The reason of the failure.
3187 FailureReason string `json:"failureReason,omitempty"`
3188 // InstalledVersion: Installed AIS version. This is the AIS version installed
3189 // on this member. The values makes sense iff state is OK.
3190 InstalledVersion string `json:"installedVersion,omitempty"`
3191 // MemberConfig: Last reconciled membership configuration
3192 MemberConfig *IdentityServiceMembershipSpec `json:"memberConfig,omitempty"`
3193 // State: Deployment state on this member
3194 //
3195 // Possible values:
3196 // "DEPLOYMENT_STATE_UNSPECIFIED" - Unspecified state
3197 // "OK" - deployment succeeds
3198 // "ERROR" - Failure with error.
3199 State string `json:"state,omitempty"`
3200 // ForceSendFields is a list of field names (e.g. "FailureReason") to
3201 // unconditionally include in API requests. By default, fields with empty or
3202 // default values are omitted from API requests. See
3203 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3204 // details.
3205 ForceSendFields []string `json:"-"`
3206 // NullFields is a list of field names (e.g. "FailureReason") to include in API
3207 // requests with the JSON null value. By default, fields with empty values are
3208 // omitted from API requests. See
3209 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3210 NullFields []string `json:"-"`
3211 }
3212
3213 func (s IdentityServiceMembershipState) MarshalJSON() ([]byte, error) {
3214 type NoMethod IdentityServiceMembershipState
3215 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3216 }
3217
3218 // IdentityServiceOidcConfig: Configuration for OIDC Auth flow.
3219 type IdentityServiceOidcConfig struct {
3220 // CertificateAuthorityData: PEM-encoded CA for OIDC provider.
3221 CertificateAuthorityData string `json:"certificateAuthorityData,omitempty"`
3222 // ClientId: ID for OIDC client application.
3223 ClientId string `json:"clientId,omitempty"`
3224 // ClientSecret: Input only. Unencrypted OIDC client secret will be passed to
3225 // the GKE Hub CLH.
3226 ClientSecret string `json:"clientSecret,omitempty"`
3227 // DeployCloudConsoleProxy: Flag to denote if reverse proxy is used to connect
3228 // to auth provider. This flag should be set to true when provider is not
3229 // reachable by Google Cloud Console.
3230 DeployCloudConsoleProxy bool `json:"deployCloudConsoleProxy,omitempty"`
3231 // EnableAccessToken: Enable access token.
3232 EnableAccessToken bool `json:"enableAccessToken,omitempty"`
3233 // EncryptedClientSecret: Output only. Encrypted OIDC Client secret
3234 EncryptedClientSecret string `json:"encryptedClientSecret,omitempty"`
3235 // ExtraParams: Comma-separated list of key-value pairs.
3236 ExtraParams string `json:"extraParams,omitempty"`
3237 // GroupPrefix: Prefix to prepend to group name.
3238 GroupPrefix string `json:"groupPrefix,omitempty"`
3239 // GroupsClaim: Claim in OIDC ID token that holds group information.
3240 GroupsClaim string `json:"groupsClaim,omitempty"`
3241 // IssuerUri: URI for the OIDC provider. This should point to the level below
3242 // .well-known/openid-configuration.
3243 IssuerUri string `json:"issuerUri,omitempty"`
3244 // KubectlRedirectUri: Registered redirect uri to redirect users going through
3245 // OAuth flow using kubectl plugin.
3246 KubectlRedirectUri string `json:"kubectlRedirectUri,omitempty"`
3247 // Scopes: Comma-separated list of identifiers.
3248 Scopes string `json:"scopes,omitempty"`
3249 // UserClaim: Claim in OIDC ID token that holds username.
3250 UserClaim string `json:"userClaim,omitempty"`
3251 // UserPrefix: Prefix to prepend to user name.
3252 UserPrefix string `json:"userPrefix,omitempty"`
3253 // ForceSendFields is a list of field names (e.g. "CertificateAuthorityData")
3254 // to unconditionally include in API requests. By default, fields with empty or
3255 // default values are omitted from API requests. See
3256 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3257 // details.
3258 ForceSendFields []string `json:"-"`
3259 // NullFields is a list of field names (e.g. "CertificateAuthorityData") to
3260 // include in API requests with the JSON null value. By default, fields with
3261 // empty values are omitted from API requests. See
3262 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3263 NullFields []string `json:"-"`
3264 }
3265
3266 func (s IdentityServiceOidcConfig) MarshalJSON() ([]byte, error) {
3267 type NoMethod IdentityServiceOidcConfig
3268 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3269 }
3270
3271 // IdentityServiceSamlConfig: Configuration for the SAML Auth flow.
3272 type IdentityServiceSamlConfig struct {
3273 // AttributeMapping: Optional. The mapping of additional user attributes like
3274 // nickname, birthday and address etc.. `key` is the name of this additional
3275 // attribute. `value` is a string presenting as CEL(common expression language,
3276 // go/cel) used for getting the value from the resources. Take nickname as an
3277 // example, in this case, `key` is "attribute.nickname" and `value` is
3278 // "assertion.nickname".
3279 AttributeMapping map[string]string `json:"attributeMapping,omitempty"`
3280 // GroupPrefix: Optional. Prefix to prepend to group name.
3281 GroupPrefix string `json:"groupPrefix,omitempty"`
3282 // GroupsAttribute: Optional. The SAML attribute to read groups from. This
3283 // value is expected to be a string and will be passed along as-is (with the
3284 // option of being prefixed by the `group_prefix`).
3285 GroupsAttribute string `json:"groupsAttribute,omitempty"`
3286 // IdentityProviderCertificates: Required. The list of IdP certificates to
3287 // validate the SAML response against.
3288 IdentityProviderCertificates []string `json:"identityProviderCertificates,omitempty"`
3289 // IdentityProviderId: Required. The entity ID of the SAML IdP.
3290 IdentityProviderId string `json:"identityProviderId,omitempty"`
3291 // IdentityProviderSsoUri: Required. The URI where the SAML IdP exposes the SSO
3292 // service.
3293 IdentityProviderSsoUri string `json:"identityProviderSsoUri,omitempty"`
3294 // UserAttribute: Optional. The SAML attribute to read username from. If
3295 // unspecified, the username will be read from the NameID element of the
3296 // assertion in SAML response. This value is expected to be a string and will
3297 // be passed along as-is (with the option of being prefixed by the
3298 // `user_prefix`).
3299 UserAttribute string `json:"userAttribute,omitempty"`
3300 // UserPrefix: Optional. Prefix to prepend to user name.
3301 UserPrefix string `json:"userPrefix,omitempty"`
3302 // ForceSendFields is a list of field names (e.g. "AttributeMapping") to
3303 // unconditionally include in API requests. By default, fields with empty or
3304 // default values are omitted from API requests. See
3305 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3306 // details.
3307 ForceSendFields []string `json:"-"`
3308 // NullFields is a list of field names (e.g. "AttributeMapping") to include in
3309 // API requests with the JSON null value. By default, fields with empty values
3310 // are omitted from API requests. See
3311 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3312 NullFields []string `json:"-"`
3313 }
3314
3315 func (s IdentityServiceSamlConfig) MarshalJSON() ([]byte, error) {
3316 type NoMethod IdentityServiceSamlConfig
3317 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3318 }
3319
3320 // IdentityServiceServerConfig: Server settings for the external LDAP server.
3321 type IdentityServiceServerConfig struct {
3322 // CertificateAuthorityData: Optional. Contains a Base64 encoded, PEM formatted
3323 // certificate authority certificate for the LDAP server. This must be provided
3324 // for the "ldaps" and "startTLS" connections.
3325 CertificateAuthorityData string `json:"certificateAuthorityData,omitempty"`
3326 // ConnectionType: Optional. Defines the connection type to communicate with
3327 // the LDAP server. If `starttls` or `ldaps` is specified, the
3328 // certificate_authority_data should not be empty.
3329 ConnectionType string `json:"connectionType,omitempty"`
3330 // Host: Required. Defines the hostname or IP of the LDAP server. Port is
3331 // optional and will default to 389, if unspecified. For example,
3332 // "ldap.server.example" or "10.10.10.10:389".
3333 Host string `json:"host,omitempty"`
3334 // ForceSendFields is a list of field names (e.g. "CertificateAuthorityData")
3335 // to unconditionally include in API requests. By default, fields with empty or
3336 // default values are omitted from API requests. See
3337 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3338 // details.
3339 ForceSendFields []string `json:"-"`
3340 // NullFields is a list of field names (e.g. "CertificateAuthorityData") to
3341 // include in API requests with the JSON null value. By default, fields with
3342 // empty values are omitted from API requests. See
3343 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3344 NullFields []string `json:"-"`
3345 }
3346
3347 func (s IdentityServiceServerConfig) MarshalJSON() ([]byte, error) {
3348 type NoMethod IdentityServiceServerConfig
3349 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3350 }
3351
3352 // IdentityServiceServiceAccountConfig: Contains the credentials of the service
3353 // account which is authorized to perform the LDAP search in the directory. The
3354 // credentials can be supplied by the combination of the DN and password or the
3355 // client certificate.
3356 type IdentityServiceServiceAccountConfig struct {
3357 // SimpleBindCredentials: Credentials for basic auth.
3358 SimpleBindCredentials *IdentityServiceSimpleBindCredentials `json:"simpleBindCredentials,omitempty"`
3359 // ForceSendFields is a list of field names (e.g. "SimpleBindCredentials") to
3360 // unconditionally include in API requests. By default, fields with empty or
3361 // default values are omitted from API requests. See
3362 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3363 // details.
3364 ForceSendFields []string `json:"-"`
3365 // NullFields is a list of field names (e.g. "SimpleBindCredentials") to
3366 // include in API requests with the JSON null value. By default, fields with
3367 // empty values are omitted from API requests. See
3368 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3369 NullFields []string `json:"-"`
3370 }
3371
3372 func (s IdentityServiceServiceAccountConfig) MarshalJSON() ([]byte, error) {
3373 type NoMethod IdentityServiceServiceAccountConfig
3374 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3375 }
3376
3377 // IdentityServiceSimpleBindCredentials: The structure holds the LDAP simple
3378 // binding credential.
3379 type IdentityServiceSimpleBindCredentials struct {
3380 // Dn: Required. The distinguished name(DN) of the service account object/user.
3381 Dn string `json:"dn,omitempty"`
3382 // EncryptedPassword: Output only. The encrypted password of the service
3383 // account object/user.
3384 EncryptedPassword string `json:"encryptedPassword,omitempty"`
3385 // Password: Required. Input only. The password of the service account
3386 // object/user.
3387 Password string `json:"password,omitempty"`
3388 // ForceSendFields is a list of field names (e.g. "Dn") to unconditionally
3389 // include in API requests. By default, fields with empty or default values are
3390 // omitted from API requests. See
3391 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3392 // details.
3393 ForceSendFields []string `json:"-"`
3394 // NullFields is a list of field names (e.g. "Dn") to include in API requests
3395 // with the JSON null value. By default, fields with empty values are omitted
3396 // from API requests. See
3397 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3398 NullFields []string `json:"-"`
3399 }
3400
3401 func (s IdentityServiceSimpleBindCredentials) MarshalJSON() ([]byte, error) {
3402 type NoMethod IdentityServiceSimpleBindCredentials
3403 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3404 }
3405
3406 // IdentityServiceUserConfig: Defines where users exist in the LDAP directory.
3407 type IdentityServiceUserConfig struct {
3408 // BaseDn: Required. The location of the subtree in the LDAP directory to
3409 // search for user entries.
3410 BaseDn string `json:"baseDn,omitempty"`
3411 // Filter: Optional. Filter to apply when searching for the user. This can be
3412 // used to further restrict the user accounts which are allowed to login. This
3413 // defaults to "(objectClass=User)".
3414 Filter string `json:"filter,omitempty"`
3415 // IdAttribute: Optional. Determines which attribute to use as the user's
3416 // identity after they are authenticated. This is distinct from the
3417 // loginAttribute field to allow users to login with a username, but then have
3418 // their actual identifier be an email address or full Distinguished Name (DN).
3419 // For example, setting loginAttribute to "sAMAccountName" and
3420 // identifierAttribute to "userPrincipalName" would allow a user to login as
3421 // "bsmith", but actual RBAC policies for the user would be written as
3422 // "[email protected]". Using "userPrincipalName" is recommended since this
3423 // will be unique for each user. This defaults to "userPrincipalName".
3424 IdAttribute string `json:"idAttribute,omitempty"`
3425 // LoginAttribute: Optional. The name of the attribute which matches against
3426 // the input username. This is used to find the user in the LDAP database e.g.
3427 // "(=)" and is combined with the optional filter field. This defaults to
3428 // "userPrincipalName".
3429 LoginAttribute string `json:"loginAttribute,omitempty"`
3430 // ForceSendFields is a list of field names (e.g. "BaseDn") to unconditionally
3431 // include in API requests. By default, fields with empty or default values are
3432 // omitted from API requests. See
3433 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3434 // details.
3435 ForceSendFields []string `json:"-"`
3436 // NullFields is a list of field names (e.g. "BaseDn") to include in API
3437 // requests with the JSON null value. By default, fields with empty values are
3438 // omitted from API requests. See
3439 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3440 NullFields []string `json:"-"`
3441 }
3442
3443 func (s IdentityServiceUserConfig) MarshalJSON() ([]byte, error) {
3444 type NoMethod IdentityServiceUserConfig
3445 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3446 }
3447
3448 // KubernetesMetadata: KubernetesMetadata provides informational metadata for
3449 // Memberships representing Kubernetes clusters.
3450 type KubernetesMetadata struct {
3451 // KubernetesApiServerVersion: Output only. Kubernetes API server version
3452 // string as reported by `/version`.
3453 KubernetesApiServerVersion string `json:"kubernetesApiServerVersion,omitempty"`
3454 // MemoryMb: Output only. The total memory capacity as reported by the sum of
3455 // all Kubernetes nodes resources, defined in MB.
3456 MemoryMb int64 `json:"memoryMb,omitempty"`
3457 // NodeCount: Output only. Node count as reported by Kubernetes nodes
3458 // resources.
3459 NodeCount int64 `json:"nodeCount,omitempty"`
3460 // NodeProviderId: Output only. Node providerID as reported by the first node
3461 // in the list of nodes on the Kubernetes endpoint. On Kubernetes platforms
3462 // that support zero-node clusters (like GKE on Google Cloud), the node_count
3463 // will be zero and the node_provider_id will be empty.
3464 NodeProviderId string `json:"nodeProviderId,omitempty"`
3465 // UpdateTime: Output only. The time at which these details were last updated.
3466 // This update_time is different from the Membership-level update_time since
3467 // EndpointDetails are updated internally for API consumers.
3468 UpdateTime string `json:"updateTime,omitempty"`
3469 // VcpuCount: Output only. vCPU count as reported by Kubernetes nodes
3470 // resources.
3471 VcpuCount int64 `json:"vcpuCount,omitempty"`
3472 // ForceSendFields is a list of field names (e.g. "KubernetesApiServerVersion")
3473 // to unconditionally include in API requests. By default, fields with empty or
3474 // default values are omitted from API requests. See
3475 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3476 // details.
3477 ForceSendFields []string `json:"-"`
3478 // NullFields is a list of field names (e.g. "KubernetesApiServerVersion") to
3479 // include in API requests with the JSON null value. By default, fields with
3480 // empty values are omitted from API requests. See
3481 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3482 NullFields []string `json:"-"`
3483 }
3484
3485 func (s KubernetesMetadata) MarshalJSON() ([]byte, error) {
3486 type NoMethod KubernetesMetadata
3487 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3488 }
3489
3490 // KubernetesResource: KubernetesResource contains the YAML manifests and
3491 // configuration for Membership Kubernetes resources in the cluster. After
3492 // CreateMembership or UpdateMembership, these resources should be re-applied
3493 // in the cluster.
3494 type KubernetesResource struct {
3495 // ConnectResources: Output only. The Kubernetes resources for installing the
3496 // GKE Connect agent This field is only populated in the Membership returned
3497 // from a successful long-running operation from CreateMembership or
3498 // UpdateMembership. It is not populated during normal GetMembership or
3499 // ListMemberships requests. To get the resource manifest after the initial
3500 // registration, the caller should make a UpdateMembership call with an empty
3501 // field mask.
3502 ConnectResources []*ResourceManifest `json:"connectResources,omitempty"`
3503 // MembershipCrManifest: Input only. The YAML representation of the Membership
3504 // CR. This field is ignored for GKE clusters where Hub can read the CR
3505 // directly. Callers should provide the CR that is currently present in the
3506 // cluster during CreateMembership or UpdateMembership, or leave this field
3507 // empty if none exists. The CR manifest is used to validate the cluster has
3508 // not been registered with another Membership.
3509 MembershipCrManifest string `json:"membershipCrManifest,omitempty"`
3510 // MembershipResources: Output only. Additional Kubernetes resources that need
3511 // to be applied to the cluster after Membership creation, and after every
3512 // update. This field is only populated in the Membership returned from a
3513 // successful long-running operation from CreateMembership or UpdateMembership.
3514 // It is not populated during normal GetMembership or ListMemberships requests.
3515 // To get the resource manifest after the initial registration, the caller
3516 // should make a UpdateMembership call with an empty field mask.
3517 MembershipResources []*ResourceManifest `json:"membershipResources,omitempty"`
3518 // ResourceOptions: Optional. Options for Kubernetes resource generation.
3519 ResourceOptions *ResourceOptions `json:"resourceOptions,omitempty"`
3520 // ForceSendFields is a list of field names (e.g. "ConnectResources") to
3521 // unconditionally include in API requests. By default, fields with empty or
3522 // default values are omitted from API requests. See
3523 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3524 // details.
3525 ForceSendFields []string `json:"-"`
3526 // NullFields is a list of field names (e.g. "ConnectResources") to include in
3527 // API requests with the JSON null value. By default, fields with empty values
3528 // are omitted from API requests. See
3529 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3530 NullFields []string `json:"-"`
3531 }
3532
3533 func (s KubernetesResource) MarshalJSON() ([]byte, error) {
3534 type NoMethod KubernetesResource
3535 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3536 }
3537
3538 // ListBoundMembershipsResponse: List of Memberships bound to a Scope.
3539 type ListBoundMembershipsResponse struct {
3540 // Memberships: The list of Memberships bound to the given Scope.
3541 Memberships []*Membership `json:"memberships,omitempty"`
3542 // NextPageToken: A token to request the next page of resources from the
3543 // `ListBoundMemberships` method. The value of an empty string means that there
3544 // are no more resources to return.
3545 NextPageToken string `json:"nextPageToken,omitempty"`
3546 // Unreachable: List of locations that could not be reached while fetching this
3547 // list.
3548 Unreachable []string `json:"unreachable,omitempty"`
3549
3550 // ServerResponse contains the HTTP response code and headers from the server.
3551 googleapi.ServerResponse `json:"-"`
3552 // ForceSendFields is a list of field names (e.g. "Memberships") to
3553 // unconditionally include in API requests. By default, fields with empty or
3554 // default values are omitted from API requests. See
3555 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3556 // details.
3557 ForceSendFields []string `json:"-"`
3558 // NullFields is a list of field names (e.g. "Memberships") to include in API
3559 // requests with the JSON null value. By default, fields with empty values are
3560 // omitted from API requests. See
3561 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3562 NullFields []string `json:"-"`
3563 }
3564
3565 func (s ListBoundMembershipsResponse) MarshalJSON() ([]byte, error) {
3566 type NoMethod ListBoundMembershipsResponse
3567 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3568 }
3569
3570 // ListFeaturesResponse: Response message for the `GkeHub.ListFeatures` method.
3571 type ListFeaturesResponse struct {
3572 // NextPageToken: A token to request the next page of resources from the
3573 // `ListFeatures` method. The value of an empty string means that there are no
3574 // more resources to return.
3575 NextPageToken string `json:"nextPageToken,omitempty"`
3576 // Resources: The list of matching Features
3577 Resources []*Feature `json:"resources,omitempty"`
3578
3579 // ServerResponse contains the HTTP response code and headers from the server.
3580 googleapi.ServerResponse `json:"-"`
3581 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3582 // unconditionally include in API requests. By default, fields with empty or
3583 // default values are omitted from API requests. See
3584 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3585 // details.
3586 ForceSendFields []string `json:"-"`
3587 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3588 // requests with the JSON null value. By default, fields with empty values are
3589 // omitted from API requests. See
3590 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3591 NullFields []string `json:"-"`
3592 }
3593
3594 func (s ListFeaturesResponse) MarshalJSON() ([]byte, error) {
3595 type NoMethod ListFeaturesResponse
3596 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3597 }
3598
3599 // ListFleetsResponse: Response message for the `GkeHub.ListFleetsResponse`
3600 // method.
3601 type ListFleetsResponse struct {
3602 // Fleets: The list of matching fleets.
3603 Fleets []*Fleet `json:"fleets,omitempty"`
3604 // NextPageToken: A token, which can be sent as `page_token` to retrieve the
3605 // next page. If this field is omitted, there are no subsequent pages. The
3606 // token is only valid for 1h.
3607 NextPageToken string `json:"nextPageToken,omitempty"`
3608
3609 // ServerResponse contains the HTTP response code and headers from the server.
3610 googleapi.ServerResponse `json:"-"`
3611 // ForceSendFields is a list of field names (e.g. "Fleets") to unconditionally
3612 // include in API requests. By default, fields with empty or default values are
3613 // omitted from API requests. See
3614 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3615 // details.
3616 ForceSendFields []string `json:"-"`
3617 // NullFields is a list of field names (e.g. "Fleets") to include in API
3618 // requests with the JSON null value. By default, fields with empty values are
3619 // omitted from API requests. See
3620 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3621 NullFields []string `json:"-"`
3622 }
3623
3624 func (s ListFleetsResponse) MarshalJSON() ([]byte, error) {
3625 type NoMethod ListFleetsResponse
3626 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3627 }
3628
3629 // ListLocationsResponse: The response message for Locations.ListLocations.
3630 type ListLocationsResponse struct {
3631 // Locations: A list of locations that matches the specified filter in the
3632 // request.
3633 Locations []*Location `json:"locations,omitempty"`
3634 // NextPageToken: The standard List next-page token.
3635 NextPageToken string `json:"nextPageToken,omitempty"`
3636
3637 // ServerResponse contains the HTTP response code and headers from the server.
3638 googleapi.ServerResponse `json:"-"`
3639 // ForceSendFields is a list of field names (e.g. "Locations") to
3640 // unconditionally include in API requests. By default, fields with empty or
3641 // default values are omitted from API requests. See
3642 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3643 // details.
3644 ForceSendFields []string `json:"-"`
3645 // NullFields is a list of field names (e.g. "Locations") to include in API
3646 // requests with the JSON null value. By default, fields with empty values are
3647 // omitted from API requests. See
3648 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3649 NullFields []string `json:"-"`
3650 }
3651
3652 func (s ListLocationsResponse) MarshalJSON() ([]byte, error) {
3653 type NoMethod ListLocationsResponse
3654 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3655 }
3656
3657 // ListMembershipBindingsResponse: List of MembershipBindings.
3658 type ListMembershipBindingsResponse struct {
3659 // MembershipBindings: The list of membership_bindings
3660 MembershipBindings []*MembershipBinding `json:"membershipBindings,omitempty"`
3661 // NextPageToken: A token to request the next page of resources from the
3662 // `ListMembershipBindings` method. The value of an empty string means that
3663 // there are no more resources to return.
3664 NextPageToken string `json:"nextPageToken,omitempty"`
3665 // Unreachable: List of locations that could not be reached while fetching this
3666 // list.
3667 Unreachable []string `json:"unreachable,omitempty"`
3668
3669 // ServerResponse contains the HTTP response code and headers from the server.
3670 googleapi.ServerResponse `json:"-"`
3671 // ForceSendFields is a list of field names (e.g. "MembershipBindings") to
3672 // unconditionally include in API requests. By default, fields with empty or
3673 // default values are omitted from API requests. See
3674 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3675 // details.
3676 ForceSendFields []string `json:"-"`
3677 // NullFields is a list of field names (e.g. "MembershipBindings") to include
3678 // in API requests with the JSON null value. By default, fields with empty
3679 // values are omitted from API requests. See
3680 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3681 NullFields []string `json:"-"`
3682 }
3683
3684 func (s ListMembershipBindingsResponse) MarshalJSON() ([]byte, error) {
3685 type NoMethod ListMembershipBindingsResponse
3686 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3687 }
3688
3689 // ListMembershipRBACRoleBindingsResponse: List of Membership RBACRoleBindings.
3690 type ListMembershipRBACRoleBindingsResponse struct {
3691 // NextPageToken: A token to request the next page of resources from the
3692 // `ListMembershipRBACRoleBindings` method. The value of an empty string means
3693 // that there are no more resources to return.
3694 NextPageToken string `json:"nextPageToken,omitempty"`
3695 // Rbacrolebindings: The list of Membership RBACRoleBindings.
3696 Rbacrolebindings []*RBACRoleBinding `json:"rbacrolebindings,omitempty"`
3697 // Unreachable: List of locations that could not be reached while fetching this
3698 // list.
3699 Unreachable []string `json:"unreachable,omitempty"`
3700
3701 // ServerResponse contains the HTTP response code and headers from the server.
3702 googleapi.ServerResponse `json:"-"`
3703 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3704 // unconditionally include in API requests. By default, fields with empty or
3705 // default values are omitted from API requests. See
3706 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3707 // details.
3708 ForceSendFields []string `json:"-"`
3709 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3710 // requests with the JSON null value. By default, fields with empty values are
3711 // omitted from API requests. See
3712 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3713 NullFields []string `json:"-"`
3714 }
3715
3716 func (s ListMembershipRBACRoleBindingsResponse) MarshalJSON() ([]byte, error) {
3717 type NoMethod ListMembershipRBACRoleBindingsResponse
3718 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3719 }
3720
3721 // ListMembershipsResponse: Response message for the `GkeHub.ListMemberships`
3722 // method.
3723 type ListMembershipsResponse struct {
3724 // NextPageToken: A token to request the next page of resources from the
3725 // `ListMemberships` method. The value of an empty string means that there are
3726 // no more resources to return.
3727 NextPageToken string `json:"nextPageToken,omitempty"`
3728 // Resources: The list of matching Memberships.
3729 Resources []*Membership `json:"resources,omitempty"`
3730 // Unreachable: List of locations that could not be reached while fetching this
3731 // list.
3732 Unreachable []string `json:"unreachable,omitempty"`
3733
3734 // ServerResponse contains the HTTP response code and headers from the server.
3735 googleapi.ServerResponse `json:"-"`
3736 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3737 // unconditionally include in API requests. By default, fields with empty or
3738 // default values are omitted from API requests. See
3739 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3740 // details.
3741 ForceSendFields []string `json:"-"`
3742 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3743 // requests with the JSON null value. By default, fields with empty values are
3744 // omitted from API requests. See
3745 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3746 NullFields []string `json:"-"`
3747 }
3748
3749 func (s ListMembershipsResponse) MarshalJSON() ([]byte, error) {
3750 type NoMethod ListMembershipsResponse
3751 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3752 }
3753
3754 // ListOperationsResponse: The response message for Operations.ListOperations.
3755 type ListOperationsResponse struct {
3756 // NextPageToken: The standard List next-page token.
3757 NextPageToken string `json:"nextPageToken,omitempty"`
3758 // Operations: A list of operations that matches the specified filter in the
3759 // request.
3760 Operations []*Operation `json:"operations,omitempty"`
3761 // Unreachable: Unordered list. Unreachable resources. Populated when the
3762 // request sets `ListOperationsRequest.return_partial_success` and reads across
3763 // collections. For example, when attempting to list all resources across all
3764 // supported locations.
3765 Unreachable []string `json:"unreachable,omitempty"`
3766
3767 // ServerResponse contains the HTTP response code and headers from the server.
3768 googleapi.ServerResponse `json:"-"`
3769 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3770 // unconditionally include in API requests. By default, fields with empty or
3771 // default values are omitted from API requests. See
3772 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3773 // details.
3774 ForceSendFields []string `json:"-"`
3775 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3776 // requests with the JSON null value. By default, fields with empty values are
3777 // omitted from API requests. See
3778 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3779 NullFields []string `json:"-"`
3780 }
3781
3782 func (s ListOperationsResponse) MarshalJSON() ([]byte, error) {
3783 type NoMethod ListOperationsResponse
3784 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3785 }
3786
3787 // ListPermittedScopesResponse: List of permitted Scopes.
3788 type ListPermittedScopesResponse struct {
3789 // NextPageToken: A token to request the next page of resources from the
3790 // `ListPermittedScopes` method. The value of an empty string means that there
3791 // are no more resources to return.
3792 NextPageToken string `json:"nextPageToken,omitempty"`
3793 // Scopes: The list of permitted Scopes
3794 Scopes []*Scope `json:"scopes,omitempty"`
3795
3796 // ServerResponse contains the HTTP response code and headers from the server.
3797 googleapi.ServerResponse `json:"-"`
3798 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3799 // unconditionally include in API requests. By default, fields with empty or
3800 // default values are omitted from API requests. See
3801 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3802 // details.
3803 ForceSendFields []string `json:"-"`
3804 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3805 // requests with the JSON null value. By default, fields with empty values are
3806 // omitted from API requests. See
3807 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3808 NullFields []string `json:"-"`
3809 }
3810
3811 func (s ListPermittedScopesResponse) MarshalJSON() ([]byte, error) {
3812 type NoMethod ListPermittedScopesResponse
3813 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3814 }
3815
3816 // ListScopeNamespacesResponse: List of fleet namespaces.
3817 type ListScopeNamespacesResponse struct {
3818 // NextPageToken: A token to request the next page of resources from the
3819 // `ListNamespaces` method. The value of an empty string means that there are
3820 // no more resources to return.
3821 NextPageToken string `json:"nextPageToken,omitempty"`
3822 // ScopeNamespaces: The list of fleet namespaces
3823 ScopeNamespaces []*Namespace `json:"scopeNamespaces,omitempty"`
3824
3825 // ServerResponse contains the HTTP response code and headers from the server.
3826 googleapi.ServerResponse `json:"-"`
3827 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3828 // unconditionally include in API requests. By default, fields with empty or
3829 // default values are omitted from API requests. See
3830 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3831 // details.
3832 ForceSendFields []string `json:"-"`
3833 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3834 // requests with the JSON null value. By default, fields with empty values are
3835 // omitted from API requests. See
3836 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3837 NullFields []string `json:"-"`
3838 }
3839
3840 func (s ListScopeNamespacesResponse) MarshalJSON() ([]byte, error) {
3841 type NoMethod ListScopeNamespacesResponse
3842 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3843 }
3844
3845 // ListScopeRBACRoleBindingsResponse: List of Scope RBACRoleBindings.
3846 type ListScopeRBACRoleBindingsResponse struct {
3847 // NextPageToken: A token to request the next page of resources from the
3848 // `ListScopeRBACRoleBindings` method. The value of an empty string means that
3849 // there are no more resources to return.
3850 NextPageToken string `json:"nextPageToken,omitempty"`
3851 // Rbacrolebindings: The list of Scope RBACRoleBindings.
3852 Rbacrolebindings []*RBACRoleBinding `json:"rbacrolebindings,omitempty"`
3853
3854 // ServerResponse contains the HTTP response code and headers from the server.
3855 googleapi.ServerResponse `json:"-"`
3856 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3857 // unconditionally include in API requests. By default, fields with empty or
3858 // default values are omitted from API requests. See
3859 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3860 // details.
3861 ForceSendFields []string `json:"-"`
3862 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3863 // requests with the JSON null value. By default, fields with empty values are
3864 // omitted from API requests. See
3865 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3866 NullFields []string `json:"-"`
3867 }
3868
3869 func (s ListScopeRBACRoleBindingsResponse) MarshalJSON() ([]byte, error) {
3870 type NoMethod ListScopeRBACRoleBindingsResponse
3871 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3872 }
3873
3874 // ListScopesResponse: List of Scopes.
3875 type ListScopesResponse struct {
3876 // NextPageToken: A token to request the next page of resources from the
3877 // `ListScopes` method. The value of an empty string means that there are no
3878 // more resources to return.
3879 NextPageToken string `json:"nextPageToken,omitempty"`
3880 // Scopes: The list of Scopes
3881 Scopes []*Scope `json:"scopes,omitempty"`
3882
3883 // ServerResponse contains the HTTP response code and headers from the server.
3884 googleapi.ServerResponse `json:"-"`
3885 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3886 // unconditionally include in API requests. By default, fields with empty or
3887 // default values are omitted from API requests. See
3888 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3889 // details.
3890 ForceSendFields []string `json:"-"`
3891 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3892 // requests with the JSON null value. By default, fields with empty values are
3893 // omitted from API requests. See
3894 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3895 NullFields []string `json:"-"`
3896 }
3897
3898 func (s ListScopesResponse) MarshalJSON() ([]byte, error) {
3899 type NoMethod ListScopesResponse
3900 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3901 }
3902
3903 // Location: A resource that represents a Google Cloud location.
3904 type Location struct {
3905 // DisplayName: The friendly name for this location, typically a nearby city
3906 // name. For example, "Tokyo".
3907 DisplayName string `json:"displayName,omitempty"`
3908 // Labels: Cross-service attributes for the location. For example
3909 // {"cloud.googleapis.com/region": "us-east1"}
3910 Labels map[string]string `json:"labels,omitempty"`
3911 // LocationId: The canonical id for this location. For example: "us-east1".
3912 LocationId string `json:"locationId,omitempty"`
3913 // Metadata: Service-specific metadata. For example the available capacity at
3914 // the given location.
3915 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
3916 // Name: Resource name for the location, which may vary between
3917 // implementations. For example:
3918 // "projects/example-project/locations/us-east1"
3919 Name string `json:"name,omitempty"`
3920
3921 // ServerResponse contains the HTTP response code and headers from the server.
3922 googleapi.ServerResponse `json:"-"`
3923 // ForceSendFields is a list of field names (e.g. "DisplayName") to
3924 // unconditionally include in API requests. By default, fields with empty or
3925 // default values are omitted from API requests. See
3926 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3927 // details.
3928 ForceSendFields []string `json:"-"`
3929 // NullFields is a list of field names (e.g. "DisplayName") to include in API
3930 // requests with the JSON null value. By default, fields with empty values are
3931 // omitted from API requests. See
3932 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3933 NullFields []string `json:"-"`
3934 }
3935
3936 func (s Location) MarshalJSON() ([]byte, error) {
3937 type NoMethod Location
3938 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3939 }
3940
3941 // Membership: Membership contains information about a member cluster.
3942 type Membership struct {
3943 // Authority: Optional. How to identify workloads from this Membership. See the
3944 // documentation on Workload Identity for more details:
3945 // https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity
3946 Authority *Authority `json:"authority,omitempty"`
3947 // ClusterTier: Output only. The tier of the cluster.
3948 //
3949 // Possible values:
3950 // "CLUSTER_TIER_UNSPECIFIED" - The ClusterTier is not set.
3951 // "STANDARD" - The ClusterTier is standard.
3952 // "ENTERPRISE" - The ClusterTier is enterprise.
3953 ClusterTier string `json:"clusterTier,omitempty"`
3954 // CreateTime: Output only. When the Membership was created.
3955 CreateTime string `json:"createTime,omitempty"`
3956 // DeleteTime: Output only. When the Membership was deleted.
3957 DeleteTime string `json:"deleteTime,omitempty"`
3958 // Description: Output only. Description of this membership, limited to 63
3959 // characters. Must match the regex: `a-zA-Z0-9*` This field is present for
3960 // legacy purposes.
3961 Description string `json:"description,omitempty"`
3962 // Endpoint: Optional. Endpoint information to reach this member.
3963 Endpoint *MembershipEndpoint `json:"endpoint,omitempty"`
3964 // ExternalId: Optional. An externally-generated and managed ID for this
3965 // Membership. This ID may be modified after creation, but this is not
3966 // recommended. The ID must match the regex: `a-zA-Z0-9*` If this Membership
3967 // represents a Kubernetes cluster, this value should be set to the UID of the
3968 // `kube-system` namespace object.
3969 ExternalId string `json:"externalId,omitempty"`
3970 // Labels: Optional. Labels for this membership. These labels are not leveraged
3971 // by multi-cluster features, instead, we prefer cluster labels, which can be
3972 // set on GKE cluster or other cluster types.
3973 Labels map[string]string `json:"labels,omitempty"`
3974 // LastConnectionTime: Output only. For clusters using Connect, the timestamp
3975 // of the most recent connection established with Google Cloud. This time is
3976 // updated every several minutes, not continuously. For clusters that do not
3977 // use GKE Connect, or that have never connected successfully, this field will
3978 // be unset.
3979 LastConnectionTime string `json:"lastConnectionTime,omitempty"`
3980 // MembershipType: Output only. The type of the membership.
3981 //
3982 // Possible values:
3983 // "MEMBERSHIP_TYPE_UNSPECIFIED" - The MembershipType is not set.
3984 // "LIGHTWEIGHT" - The membership supports only lightweight compatible
3985 // features.
3986 MembershipType string `json:"membershipType,omitempty"`
3987 // MonitoringConfig: Optional. The monitoring config information for this
3988 // membership.
3989 MonitoringConfig *MonitoringConfig `json:"monitoringConfig,omitempty"`
3990 // Name: Output only. The full, unique name of this Membership resource in the
3991 // format `projects/*/locations/*/memberships/{membership_id}`, set during
3992 // creation. `membership_id` must be a valid RFC 1123 compliant DNS label: 1.
3993 // At most 63 characters in length 2. It must consist of lower case
3994 // alphanumeric characters or `-` 3. It must start and end with an alphanumeric
3995 // character Which can be expressed as the regex:
3996 // `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
3997 Name string `json:"name,omitempty"`
3998 // State: Output only. State of the Membership resource.
3999 State *MembershipState `json:"state,omitempty"`
4000 // UniqueId: Output only. Google-generated UUID for this resource. This is
4001 // unique across all Membership resources. If a Membership resource is deleted
4002 // and another resource with the same name is created, it gets a different
4003 // unique_id.
4004 UniqueId string `json:"uniqueId,omitempty"`
4005 // UpdateTime: Output only. When the Membership was last updated.
4006 UpdateTime string `json:"updateTime,omitempty"`
4007
4008 // ServerResponse contains the HTTP response code and headers from the server.
4009 googleapi.ServerResponse `json:"-"`
4010 // ForceSendFields is a list of field names (e.g. "Authority") to
4011 // unconditionally include in API requests. By default, fields with empty or
4012 // default values are omitted from API requests. See
4013 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4014 // details.
4015 ForceSendFields []string `json:"-"`
4016 // NullFields is a list of field names (e.g. "Authority") to include in API
4017 // requests with the JSON null value. By default, fields with empty values are
4018 // omitted from API requests. See
4019 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4020 NullFields []string `json:"-"`
4021 }
4022
4023 func (s Membership) MarshalJSON() ([]byte, error) {
4024 type NoMethod Membership
4025 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4026 }
4027
4028 // MembershipBinding: MembershipBinding is a subresource of a Membership,
4029 // representing what Fleet Scopes (or other, future Fleet resources) a
4030 // Membership is bound to.
4031 type MembershipBinding struct {
4032 // CreateTime: Output only. When the membership binding was created.
4033 CreateTime string `json:"createTime,omitempty"`
4034 // DeleteTime: Output only. When the membership binding was deleted.
4035 DeleteTime string `json:"deleteTime,omitempty"`
4036 // Labels: Optional. Labels for this MembershipBinding.
4037 Labels map[string]string `json:"labels,omitempty"`
4038 // Name: The resource name for the membershipbinding itself
4039 // `projects/{project}/locations/{location}/memberships/{membership}/bindings/{m
4040 // embershipbinding}`
4041 Name string `json:"name,omitempty"`
4042 // Scope: A Scope resource name in the format
4043 // `projects/*/locations/*/scopes/*`.
4044 Scope string `json:"scope,omitempty"`
4045 // State: Output only. State of the membership binding resource.
4046 State *MembershipBindingLifecycleState `json:"state,omitempty"`
4047 // Uid: Output only. Google-generated UUID for this resource. This is unique
4048 // across all membershipbinding resources. If a membershipbinding resource is
4049 // deleted and another resource with the same name is created, it gets a
4050 // different uid.
4051 Uid string `json:"uid,omitempty"`
4052 // UpdateTime: Output only. When the membership binding was last updated.
4053 UpdateTime string `json:"updateTime,omitempty"`
4054
4055 // ServerResponse contains the HTTP response code and headers from the server.
4056 googleapi.ServerResponse `json:"-"`
4057 // ForceSendFields is a list of field names (e.g. "CreateTime") to
4058 // unconditionally include in API requests. By default, fields with empty or
4059 // default values are omitted from API requests. See
4060 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4061 // details.
4062 ForceSendFields []string `json:"-"`
4063 // NullFields is a list of field names (e.g. "CreateTime") to include in API
4064 // requests with the JSON null value. By default, fields with empty values are
4065 // omitted from API requests. See
4066 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4067 NullFields []string `json:"-"`
4068 }
4069
4070 func (s MembershipBinding) MarshalJSON() ([]byte, error) {
4071 type NoMethod MembershipBinding
4072 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4073 }
4074
4075 // MembershipBindingLifecycleState: MembershipBindingLifecycleState describes
4076 // the state of a Binding resource.
4077 type MembershipBindingLifecycleState struct {
4078 // Code: Output only. The current state of the MembershipBinding resource.
4079 //
4080 // Possible values:
4081 // "CODE_UNSPECIFIED" - The code is not set.
4082 // "CREATING" - The membershipbinding is being created.
4083 // "READY" - The membershipbinding active.
4084 // "DELETING" - The membershipbinding is being deleted.
4085 // "UPDATING" - The membershipbinding is being updated.
4086 Code string `json:"code,omitempty"`
4087 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
4088 // include in API requests. By default, fields with empty or default values are
4089 // omitted from API requests. See
4090 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4091 // details.
4092 ForceSendFields []string `json:"-"`
4093 // NullFields is a list of field names (e.g. "Code") to include in API requests
4094 // with the JSON null value. By default, fields with empty values are omitted
4095 // from API requests. See
4096 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4097 NullFields []string `json:"-"`
4098 }
4099
4100 func (s MembershipBindingLifecycleState) MarshalJSON() ([]byte, error) {
4101 type NoMethod MembershipBindingLifecycleState
4102 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4103 }
4104
4105 // MembershipEndpoint: MembershipEndpoint contains information needed to
4106 // contact a Kubernetes API, endpoint and any additional Kubernetes metadata.
4107 type MembershipEndpoint struct {
4108 // ApplianceCluster: Optional. Specific information for a GDC Edge Appliance
4109 // cluster.
4110 ApplianceCluster *ApplianceCluster `json:"applianceCluster,omitempty"`
4111 // EdgeCluster: Optional. Specific information for a Google Edge cluster.
4112 EdgeCluster *EdgeCluster `json:"edgeCluster,omitempty"`
4113 // GkeCluster: Optional. Specific information for a GKE on Google Cloud
4114 // cluster.
4115 GkeCluster *GkeCluster `json:"gkeCluster,omitempty"`
4116 // GoogleManaged: Output only. Whether the lifecycle of this membership is
4117 // managed by a google cluster platform service.
4118 GoogleManaged bool `json:"googleManaged,omitempty"`
4119 // KubernetesMetadata: Output only. Useful Kubernetes-specific metadata.
4120 KubernetesMetadata *KubernetesMetadata `json:"kubernetesMetadata,omitempty"`
4121 // KubernetesResource: Optional. The in-cluster Kubernetes Resources that
4122 // should be applied for a correctly registered cluster, in the steady state.
4123 // These resources: * Ensure that the cluster is exclusively registered to one
4124 // and only one Hub Membership. * Propagate Workload Pool Information available
4125 // in the Membership Authority field. * Ensure proper initial configuration of
4126 // default Hub Features.
4127 KubernetesResource *KubernetesResource `json:"kubernetesResource,omitempty"`
4128 // MultiCloudCluster: Optional. Specific information for a GKE Multi-Cloud
4129 // cluster.
4130 MultiCloudCluster *MultiCloudCluster `json:"multiCloudCluster,omitempty"`
4131 // OnPremCluster: Optional. Specific information for a GKE On-Prem cluster. An
4132 // onprem user-cluster who has no resourceLink is not allowed to use this
4133 // field, it should have a nil "type" instead.
4134 OnPremCluster *OnPremCluster `json:"onPremCluster,omitempty"`
4135 // ForceSendFields is a list of field names (e.g. "ApplianceCluster") to
4136 // unconditionally include in API requests. By default, fields with empty or
4137 // default values are omitted from API requests. See
4138 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4139 // details.
4140 ForceSendFields []string `json:"-"`
4141 // NullFields is a list of field names (e.g. "ApplianceCluster") to include in
4142 // API requests with the JSON null value. By default, fields with empty values
4143 // are omitted from API requests. See
4144 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4145 NullFields []string `json:"-"`
4146 }
4147
4148 func (s MembershipEndpoint) MarshalJSON() ([]byte, error) {
4149 type NoMethod MembershipEndpoint
4150 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4151 }
4152
4153 // MembershipFeatureSpec: MembershipFeatureSpec contains configuration
4154 // information for a single Membership.
4155 type MembershipFeatureSpec struct {
4156 // Configmanagement: Config Management-specific spec.
4157 Configmanagement *ConfigManagementMembershipSpec `json:"configmanagement,omitempty"`
4158 // Fleetobservability: Fleet observability membership spec
4159 Fleetobservability *FleetObservabilityMembershipSpec `json:"fleetobservability,omitempty"`
4160 // Identityservice: Identity Service-specific spec.
4161 Identityservice *IdentityServiceMembershipSpec `json:"identityservice,omitempty"`
4162 // Mesh: Anthos Service Mesh-specific spec
4163 Mesh *ServiceMeshMembershipSpec `json:"mesh,omitempty"`
4164 // Origin: Whether this per-Membership spec was inherited from a fleet-level
4165 // default. This field can be updated by users by either overriding a
4166 // Membership config (updated to USER implicitly) or setting to FLEET
4167 // explicitly.
4168 Origin *Origin `json:"origin,omitempty"`
4169 // Policycontroller: Policy Controller spec.
4170 Policycontroller *PolicyControllerMembershipSpec `json:"policycontroller,omitempty"`
4171 // ForceSendFields is a list of field names (e.g. "Configmanagement") to
4172 // unconditionally include in API requests. By default, fields with empty or
4173 // default values are omitted from API requests. See
4174 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4175 // details.
4176 ForceSendFields []string `json:"-"`
4177 // NullFields is a list of field names (e.g. "Configmanagement") to include in
4178 // API requests with the JSON null value. By default, fields with empty values
4179 // are omitted from API requests. See
4180 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4181 NullFields []string `json:"-"`
4182 }
4183
4184 func (s MembershipFeatureSpec) MarshalJSON() ([]byte, error) {
4185 type NoMethod MembershipFeatureSpec
4186 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4187 }
4188
4189 // MembershipFeatureState: MembershipFeatureState contains Feature status
4190 // information for a single Membership.
4191 type MembershipFeatureState struct {
4192 // Appdevexperience: Appdevexperience specific state.
4193 Appdevexperience *AppDevExperienceFeatureState `json:"appdevexperience,omitempty"`
4194 // Clusterupgrade: ClusterUpgrade state.
4195 Clusterupgrade *ClusterUpgradeMembershipState `json:"clusterupgrade,omitempty"`
4196 // Configmanagement: Config Management-specific state.
4197 Configmanagement *ConfigManagementMembershipState `json:"configmanagement,omitempty"`
4198 // Fleetobservability: Fleet observability membership state.
4199 Fleetobservability *FleetObservabilityMembershipState `json:"fleetobservability,omitempty"`
4200 // Identityservice: Identity Service-specific state.
4201 Identityservice *IdentityServiceMembershipState `json:"identityservice,omitempty"`
4202 // Policycontroller: Policycontroller-specific state.
4203 Policycontroller *PolicyControllerMembershipState `json:"policycontroller,omitempty"`
4204 // Servicemesh: Service Mesh-specific state.
4205 Servicemesh *ServiceMeshMembershipState `json:"servicemesh,omitempty"`
4206 // State: The high-level state of this Feature for a single membership.
4207 State *FeatureState `json:"state,omitempty"`
4208 // Workloadidentity: Workload Identity membership specific state.
4209 Workloadidentity *WorkloadIdentityMembershipState `json:"workloadidentity,omitempty"`
4210 // ForceSendFields is a list of field names (e.g. "Appdevexperience") to
4211 // unconditionally include in API requests. By default, fields with empty or
4212 // default values are omitted from API requests. See
4213 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4214 // details.
4215 ForceSendFields []string `json:"-"`
4216 // NullFields is a list of field names (e.g. "Appdevexperience") to include in
4217 // API requests with the JSON null value. By default, fields with empty values
4218 // are omitted from API requests. See
4219 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4220 NullFields []string `json:"-"`
4221 }
4222
4223 func (s MembershipFeatureState) MarshalJSON() ([]byte, error) {
4224 type NoMethod MembershipFeatureState
4225 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4226 }
4227
4228 // MembershipState: MembershipState describes the state of a Membership
4229 // resource.
4230 type MembershipState struct {
4231 // Code: Output only. The current state of the Membership resource.
4232 //
4233 // Possible values:
4234 // "CODE_UNSPECIFIED" - The code is not set.
4235 // "CREATING" - The cluster is being registered.
4236 // "READY" - The cluster is registered.
4237 // "DELETING" - The cluster is being unregistered.
4238 // "UPDATING" - The Membership is being updated.
4239 // "SERVICE_UPDATING" - The Membership is being updated by the Hub Service.
4240 Code string `json:"code,omitempty"`
4241 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
4242 // include in API requests. By default, fields with empty or default values are
4243 // omitted from API requests. See
4244 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4245 // details.
4246 ForceSendFields []string `json:"-"`
4247 // NullFields is a list of field names (e.g. "Code") to include in API requests
4248 // with the JSON null value. By default, fields with empty values are omitted
4249 // from API requests. See
4250 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4251 NullFields []string `json:"-"`
4252 }
4253
4254 func (s MembershipState) MarshalJSON() ([]byte, error) {
4255 type NoMethod MembershipState
4256 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4257 }
4258
4259 // MonitoringConfig: MonitoringConfig informs Fleet-based
4260 // applications/services/UIs how the metrics for the underlying cluster is
4261 // reported to cloud monitoring services. It can be set from empty to
4262 // non-empty, but can't be mutated directly to prevent accidentally breaking
4263 // the constinousty of metrics.
4264 type MonitoringConfig struct {
4265 // Cluster: Optional. Cluster name used to report metrics. For Anthos on
4266 // VMWare/Baremetal/MultiCloud clusters, it would be in format
4267 // {cluster_type}/{cluster_name}, e.g., "awsClusters/cluster_1".
4268 Cluster string `json:"cluster,omitempty"`
4269 // ClusterHash: Optional. For GKE and Multicloud clusters, this is the UUID of
4270 // the cluster resource. For VMWare and Baremetal clusters, this is the
4271 // kube-system UID.
4272 ClusterHash string `json:"clusterHash,omitempty"`
4273 // KubernetesMetricsPrefix: Optional. Kubernetes system metrics, if available,
4274 // are written to this prefix. This defaults to kubernetes.io for GKE, and
4275 // kubernetes.io/anthos for Anthos eventually. Noted: Anthos MultiCloud will
4276 // have kubernetes.io prefix today but will migration to be under
4277 // kubernetes.io/anthos.
4278 KubernetesMetricsPrefix string `json:"kubernetesMetricsPrefix,omitempty"`
4279 // Location: Optional. Location used to report Metrics
4280 Location string `json:"location,omitempty"`
4281 // ProjectId: Optional. Project used to report Metrics
4282 ProjectId string `json:"projectId,omitempty"`
4283 // ForceSendFields is a list of field names (e.g. "Cluster") to unconditionally
4284 // include in API requests. By default, fields with empty or default values are
4285 // omitted from API requests. See
4286 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4287 // details.
4288 ForceSendFields []string `json:"-"`
4289 // NullFields is a list of field names (e.g. "Cluster") to include in API
4290 // requests with the JSON null value. By default, fields with empty values are
4291 // omitted from API requests. See
4292 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4293 NullFields []string `json:"-"`
4294 }
4295
4296 func (s MonitoringConfig) MarshalJSON() ([]byte, error) {
4297 type NoMethod MonitoringConfig
4298 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4299 }
4300
4301 // MultiCloudCluster: MultiCloudCluster contains information specific to GKE
4302 // Multi-Cloud clusters.
4303 type MultiCloudCluster struct {
4304 // ClusterMissing: Output only. If cluster_missing is set then it denotes that
4305 // API(gkemulticloud.googleapis.com) resource for this GKE Multi-Cloud cluster
4306 // no longer exists.
4307 ClusterMissing bool `json:"clusterMissing,omitempty"`
4308 // ResourceLink: Immutable. Self-link of the Google Cloud resource for the GKE
4309 // Multi-Cloud cluster. For example:
4310 // //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/awsCl
4311 // usters/my-cluster
4312 // //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/azure
4313 // Clusters/my-cluster
4314 // //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/attac
4315 // hedClusters/my-cluster
4316 ResourceLink string `json:"resourceLink,omitempty"`
4317 // ForceSendFields is a list of field names (e.g. "ClusterMissing") 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. "ClusterMissing") to include in
4324 // API requests with the JSON null value. By default, fields with empty values
4325 // are 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 MultiCloudCluster) MarshalJSON() ([]byte, error) {
4331 type NoMethod MultiCloudCluster
4332 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4333 }
4334
4335 // MultiClusterIngressFeatureSpec: **Multi-cluster Ingress**: The configuration
4336 // for the MultiClusterIngress feature.
4337 type MultiClusterIngressFeatureSpec struct {
4338 // ConfigMembership: Fully-qualified Membership name which hosts the
4339 // MultiClusterIngress CRD. Example:
4340 // `projects/foo-proj/locations/global/memberships/bar`
4341 ConfigMembership string `json:"configMembership,omitempty"`
4342 // ForceSendFields is a list of field names (e.g. "ConfigMembership") to
4343 // unconditionally include in API requests. By default, fields with empty or
4344 // default values are omitted from API requests. See
4345 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4346 // details.
4347 ForceSendFields []string `json:"-"`
4348 // NullFields is a list of field names (e.g. "ConfigMembership") to include in
4349 // API requests with the JSON null value. By default, fields with empty values
4350 // are omitted from API requests. See
4351 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4352 NullFields []string `json:"-"`
4353 }
4354
4355 func (s MultiClusterIngressFeatureSpec) MarshalJSON() ([]byte, error) {
4356 type NoMethod MultiClusterIngressFeatureSpec
4357 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4358 }
4359
4360 // Namespace: Namespace represents a namespace across the Fleet
4361 type Namespace struct {
4362 // CreateTime: Output only. When the namespace was created.
4363 CreateTime string `json:"createTime,omitempty"`
4364 // DeleteTime: Output only. When the namespace was deleted.
4365 DeleteTime string `json:"deleteTime,omitempty"`
4366 // Labels: Optional. Labels for this Namespace.
4367 Labels map[string]string `json:"labels,omitempty"`
4368 // Name: The resource name for the namespace
4369 // `projects/{project}/locations/{location}/namespaces/{namespace}`
4370 Name string `json:"name,omitempty"`
4371 // NamespaceLabels: Optional. Namespace-level cluster namespace labels. These
4372 // labels are applied to the related namespace of the member clusters bound to
4373 // the parent Scope. Scope-level labels (`namespace_labels` in the Fleet Scope
4374 // resource) take precedence over Namespace-level labels if they share a key.
4375 // Keys and values must be Kubernetes-conformant.
4376 NamespaceLabels map[string]string `json:"namespaceLabels,omitempty"`
4377 // Scope: Required. Scope associated with the namespace
4378 Scope string `json:"scope,omitempty"`
4379 // State: Output only. State of the namespace resource.
4380 State *NamespaceLifecycleState `json:"state,omitempty"`
4381 // Uid: Output only. Google-generated UUID for this resource. This is unique
4382 // across all namespace resources. If a namespace resource is deleted and
4383 // another resource with the same name is created, it gets a different uid.
4384 Uid string `json:"uid,omitempty"`
4385 // UpdateTime: Output only. When the namespace was last updated.
4386 UpdateTime string `json:"updateTime,omitempty"`
4387
4388 // ServerResponse contains the HTTP response code and headers from the server.
4389 googleapi.ServerResponse `json:"-"`
4390 // ForceSendFields is a list of field names (e.g. "CreateTime") to
4391 // unconditionally include in API requests. By default, fields with empty or
4392 // default values are omitted from API requests. See
4393 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4394 // details.
4395 ForceSendFields []string `json:"-"`
4396 // NullFields is a list of field names (e.g. "CreateTime") to include in API
4397 // requests with the JSON null value. By default, fields with empty values are
4398 // omitted from API requests. See
4399 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4400 NullFields []string `json:"-"`
4401 }
4402
4403 func (s Namespace) MarshalJSON() ([]byte, error) {
4404 type NoMethod Namespace
4405 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4406 }
4407
4408 // NamespaceLifecycleState: NamespaceLifecycleState describes the state of a
4409 // Namespace resource.
4410 type NamespaceLifecycleState struct {
4411 // Code: Output only. The current state of the Namespace resource.
4412 //
4413 // Possible values:
4414 // "CODE_UNSPECIFIED" - The code is not set.
4415 // "CREATING" - The namespace is being created.
4416 // "READY" - The namespace active.
4417 // "DELETING" - The namespace is being deleted.
4418 // "UPDATING" - The namespace is being updated.
4419 Code string `json:"code,omitempty"`
4420 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
4421 // include in API requests. By default, fields with empty or default values are
4422 // omitted from API requests. See
4423 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4424 // details.
4425 ForceSendFields []string `json:"-"`
4426 // NullFields is a list of field names (e.g. "Code") to include in API requests
4427 // with the JSON null value. By default, fields with empty values are omitted
4428 // from API requests. See
4429 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4430 NullFields []string `json:"-"`
4431 }
4432
4433 func (s NamespaceLifecycleState) MarshalJSON() ([]byte, error) {
4434 type NoMethod NamespaceLifecycleState
4435 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4436 }
4437
4438 // OnPremCluster: OnPremCluster contains information specific to GKE On-Prem
4439 // clusters.
4440 type OnPremCluster struct {
4441 // AdminCluster: Immutable. Whether the cluster is an admin cluster.
4442 AdminCluster bool `json:"adminCluster,omitempty"`
4443 // ClusterMissing: Output only. If cluster_missing is set then it denotes that
4444 // API(gkeonprem.googleapis.com) resource for this GKE On-Prem cluster no
4445 // longer exists.
4446 ClusterMissing bool `json:"clusterMissing,omitempty"`
4447 // ClusterType: Immutable. The on prem cluster's type.
4448 //
4449 // Possible values:
4450 // "CLUSTERTYPE_UNSPECIFIED" - The ClusterType is not set.
4451 // "BOOTSTRAP" - The ClusterType is bootstrap cluster.
4452 // "HYBRID" - The ClusterType is baremetal hybrid cluster.
4453 // "STANDALONE" - The ClusterType is baremetal standalone cluster.
4454 // "USER" - The ClusterType is user cluster.
4455 ClusterType string `json:"clusterType,omitempty"`
4456 // ResourceLink: Immutable. Self-link of the Google Cloud resource for the GKE
4457 // On-Prem cluster. For example:
4458 // //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/vmwareClu
4459 // sters/my-cluster
4460 // //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/bareMetal
4461 // Clusters/my-cluster
4462 ResourceLink string `json:"resourceLink,omitempty"`
4463 // ForceSendFields is a list of field names (e.g. "AdminCluster") to
4464 // unconditionally include in API requests. By default, fields with empty or
4465 // default values are omitted from API requests. See
4466 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4467 // details.
4468 ForceSendFields []string `json:"-"`
4469 // NullFields is a list of field names (e.g. "AdminCluster") to include in API
4470 // requests with the JSON null value. By default, fields with empty values are
4471 // omitted from API requests. See
4472 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4473 NullFields []string `json:"-"`
4474 }
4475
4476 func (s OnPremCluster) MarshalJSON() ([]byte, error) {
4477 type NoMethod OnPremCluster
4478 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4479 }
4480
4481 // Operation: This resource represents a long-running operation that is the
4482 // result of a network API call.
4483 type Operation struct {
4484 // Done: If the value is `false`, it means the operation is still in progress.
4485 // If `true`, the operation is completed, and either `error` or `response` is
4486 // available.
4487 Done bool `json:"done,omitempty"`
4488 // Error: The error result of the operation in case of failure or cancellation.
4489 Error *GoogleRpcStatus `json:"error,omitempty"`
4490 // Metadata: Service-specific metadata associated with the operation. It
4491 // typically contains progress information and common metadata such as create
4492 // time. Some services might not provide such metadata. Any method that returns
4493 // a long-running operation should document the metadata type, if any.
4494 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
4495 // Name: The server-assigned name, which is only unique within the same service
4496 // that originally returns it. If you use the default HTTP mapping, the `name`
4497 // should be a resource name ending with `operations/{unique_id}`.
4498 Name string `json:"name,omitempty"`
4499 // Response: The normal, successful response of the operation. If the original
4500 // method returns no data on success, such as `Delete`, the response is
4501 // `google.protobuf.Empty`. If the original method is standard
4502 // `Get`/`Create`/`Update`, the response should be the resource. For other
4503 // methods, the response should have the type `XxxResponse`, where `Xxx` is the
4504 // original method name. For example, if the original method name is
4505 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
4506 Response googleapi.RawMessage `json:"response,omitempty"`
4507
4508 // ServerResponse contains the HTTP response code and headers from the server.
4509 googleapi.ServerResponse `json:"-"`
4510 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally
4511 // include in API requests. By default, fields with empty or default values are
4512 // omitted from API requests. See
4513 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4514 // details.
4515 ForceSendFields []string `json:"-"`
4516 // NullFields is a list of field names (e.g. "Done") to include in API requests
4517 // with the JSON null value. By default, fields with empty values are omitted
4518 // from API requests. See
4519 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4520 NullFields []string `json:"-"`
4521 }
4522
4523 func (s Operation) MarshalJSON() ([]byte, error) {
4524 type NoMethod Operation
4525 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4526 }
4527
4528 // OperationMetadata: Represents the metadata of the long-running operation.
4529 type OperationMetadata struct {
4530 // ApiVersion: Output only. API version used to start the operation.
4531 ApiVersion string `json:"apiVersion,omitempty"`
4532 // CancelRequested: Output only. Identifies whether the user has requested
4533 // cancellation of the operation. Operations that have successfully been
4534 // cancelled have google.longrunning.Operation.error value with a
4535 // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
4536 CancelRequested bool `json:"cancelRequested,omitempty"`
4537 // CreateTime: Output only. The time the operation was created.
4538 CreateTime string `json:"createTime,omitempty"`
4539 // EndTime: Output only. The time the operation finished running.
4540 EndTime string `json:"endTime,omitempty"`
4541 // StatusDetail: Output only. Human-readable status of the operation, if any.
4542 StatusDetail string `json:"statusDetail,omitempty"`
4543 // Target: Output only. Server-defined resource path for the target of the
4544 // operation.
4545 Target string `json:"target,omitempty"`
4546 // Verb: Output only. Name of the verb executed by the operation.
4547 Verb string `json:"verb,omitempty"`
4548 // ForceSendFields is a list of field names (e.g. "ApiVersion") to
4549 // unconditionally include in API requests. By default, fields with empty or
4550 // default values are omitted from API requests. See
4551 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4552 // details.
4553 ForceSendFields []string `json:"-"`
4554 // NullFields is a list of field names (e.g. "ApiVersion") to include in API
4555 // requests with the JSON null value. By default, fields with empty values are
4556 // omitted from API requests. See
4557 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4558 NullFields []string `json:"-"`
4559 }
4560
4561 func (s OperationMetadata) MarshalJSON() ([]byte, error) {
4562 type NoMethod OperationMetadata
4563 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4564 }
4565
4566 // Origin: Origin defines where this MembershipFeatureSpec originated from.
4567 type Origin struct {
4568 // Type: Type specifies which type of origin is set.
4569 //
4570 // Possible values:
4571 // "TYPE_UNSPECIFIED" - Type is unknown or not set.
4572 // "FLEET" - Per-Membership spec was inherited from the fleet-level default.
4573 // "FLEET_OUT_OF_SYNC" - Per-Membership spec was inherited from the
4574 // fleet-level default but is now out of sync with the current default.
4575 // "USER" - Per-Membership spec was inherited from a user specification.
4576 Type string `json:"type,omitempty"`
4577 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally
4578 // include in API requests. By default, fields with empty or default values are
4579 // omitted from API requests. See
4580 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4581 // details.
4582 ForceSendFields []string `json:"-"`
4583 // NullFields is a list of field names (e.g. "Type") to include in API requests
4584 // with the JSON null value. By default, fields with empty values are omitted
4585 // from API requests. See
4586 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4587 NullFields []string `json:"-"`
4588 }
4589
4590 func (s Origin) MarshalJSON() ([]byte, error) {
4591 type NoMethod Origin
4592 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4593 }
4594
4595 // Policy: An Identity and Access Management (IAM) policy, which specifies
4596 // access controls for Google Cloud resources. A `Policy` is a collection of
4597 // `bindings`. A `binding` binds one or more `members`, or principals, to a
4598 // single `role`. Principals can be user accounts, service accounts, Google
4599 // groups, and domains (such as G Suite). A `role` is a named list of
4600 // permissions; each `role` can be an IAM predefined role or a user-created
4601 // custom role. For some types of Google Cloud resources, a `binding` can also
4602 // specify a `condition`, which is a logical expression that allows access to a
4603 // resource only if the expression evaluates to `true`. A condition can add
4604 // constraints based on attributes of the request, the resource, or both. To
4605 // learn which resources support conditions in their IAM policies, see the IAM
4606 // documentation
4607 // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
4608 // example:** ``` { "bindings": [ { "role":
4609 // "roles/resourcemanager.organizationAdmin", "members": [
4610 // "user:[email protected]", "group:[email protected]", "domain:google.com",
4611 // "serviceAccount:[email protected]" ] }, { "role":
4612 // "roles/resourcemanager.organizationViewer", "members": [
4613 // "user:[email protected]" ], "condition": { "title": "expirable access",
4614 // "description": "Does not grant access after Sep 2020", "expression":
4615 // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
4616 // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
4617 // members: - user:[email protected] - group:[email protected] -
4618 // domain:google.com - serviceAccount:[email protected]
4619 // role: roles/resourcemanager.organizationAdmin - members: -
4620 // user:[email protected] role: roles/resourcemanager.organizationViewer
4621 // condition: title: expirable access description: Does not grant access after
4622 // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
4623 // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
4624 // see the IAM documentation (https://cloud.google.com/iam/docs/).
4625 type Policy struct {
4626 // AuditConfigs: Specifies cloud audit logging configuration for this policy.
4627 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
4628 // Bindings: Associates a list of `members`, or principals, with a `role`.
4629 // Optionally, may specify a `condition` that determines how and when the
4630 // `bindings` are applied. Each of the `bindings` must contain at least one
4631 // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
4632 // up to 250 of these principals can be Google groups. Each occurrence of a
4633 // principal counts towards these limits. For example, if the `bindings` grant
4634 // 50 different roles to `user:[email protected]`, and not to any other
4635 // principal, then you can add another 1,450 principals to the `bindings` in
4636 // the `Policy`.
4637 Bindings []*Binding `json:"bindings,omitempty"`
4638 // Etag: `etag` is used for optimistic concurrency control as a way to help
4639 // prevent simultaneous updates of a policy from overwriting each other. It is
4640 // strongly suggested that systems make use of the `etag` in the
4641 // read-modify-write cycle to perform policy updates in order to avoid race
4642 // conditions: An `etag` is returned in the response to `getIamPolicy`, and
4643 // systems are expected to put that etag in the request to `setIamPolicy` to
4644 // ensure that their change will be applied to the same version of the policy.
4645 // **Important:** If you use IAM Conditions, you must include the `etag` field
4646 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4647 // you to overwrite a version `3` policy with a version `1` policy, and all of
4648 // the conditions in the version `3` policy are lost.
4649 Etag string `json:"etag,omitempty"`
4650 // Version: Specifies the format of the policy. Valid values are `0`, `1`, and
4651 // `3`. Requests that specify an invalid value are rejected. Any operation that
4652 // affects conditional role bindings must specify version `3`. This requirement
4653 // applies to the following operations: * Getting a policy that includes a
4654 // conditional role binding * Adding a conditional role binding to a policy *
4655 // Changing a conditional role binding in a policy * Removing any role binding,
4656 // with or without a condition, from a policy that includes conditions
4657 // **Important:** If you use IAM Conditions, you must include the `etag` field
4658 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4659 // you to overwrite a version `3` policy with a version `1` policy, and all of
4660 // the conditions in the version `3` policy are lost. If a policy does not
4661 // include any conditions, operations on that policy may specify any valid
4662 // version or leave the field unset. To learn which resources support
4663 // conditions in their IAM policies, see the IAM documentation
4664 // (https://cloud.google.com/iam/help/conditions/resource-policies).
4665 Version int64 `json:"version,omitempty"`
4666
4667 // ServerResponse contains the HTTP response code and headers from the server.
4668 googleapi.ServerResponse `json:"-"`
4669 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to
4670 // unconditionally include in API requests. By default, fields with empty or
4671 // default values are omitted from API requests. See
4672 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4673 // details.
4674 ForceSendFields []string `json:"-"`
4675 // NullFields is a list of field names (e.g. "AuditConfigs") to include in API
4676 // requests with the JSON null value. By default, fields with empty values are
4677 // omitted from API requests. See
4678 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4679 NullFields []string `json:"-"`
4680 }
4681
4682 func (s Policy) MarshalJSON() ([]byte, error) {
4683 type NoMethod Policy
4684 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4685 }
4686
4687 // PolicyBinding: Binauthz policy that applies to this cluster.
4688 type PolicyBinding struct {
4689 // Name: The relative resource name of the binauthz platform policy to audit.
4690 // GKE platform policies have the following format:
4691 // `projects/{project_number}/platforms/gke/policies/{policy_id}`.
4692 Name string `json:"name,omitempty"`
4693 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
4694 // include in API requests. By default, fields with empty or default values are
4695 // omitted from API requests. See
4696 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4697 // details.
4698 ForceSendFields []string `json:"-"`
4699 // NullFields is a list of field names (e.g. "Name") to include in API requests
4700 // with the JSON null value. By default, fields with empty values are omitted
4701 // from API requests. See
4702 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4703 NullFields []string `json:"-"`
4704 }
4705
4706 func (s PolicyBinding) MarshalJSON() ([]byte, error) {
4707 type NoMethod PolicyBinding
4708 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4709 }
4710
4711 // PolicyControllerBundleInstallSpec: BundleInstallSpec is the specification
4712 // configuration for a single managed bundle.
4713 type PolicyControllerBundleInstallSpec struct {
4714 // ExemptedNamespaces: The set of namespaces to be exempted from the bundle.
4715 ExemptedNamespaces []string `json:"exemptedNamespaces,omitempty"`
4716 // ForceSendFields is a list of field names (e.g. "ExemptedNamespaces") to
4717 // unconditionally include in API requests. By default, fields with empty or
4718 // default values are omitted from API requests. See
4719 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4720 // details.
4721 ForceSendFields []string `json:"-"`
4722 // NullFields is a list of field names (e.g. "ExemptedNamespaces") to include
4723 // in API requests with the JSON null value. By default, fields with empty
4724 // values are omitted from API requests. See
4725 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4726 NullFields []string `json:"-"`
4727 }
4728
4729 func (s PolicyControllerBundleInstallSpec) MarshalJSON() ([]byte, error) {
4730 type NoMethod PolicyControllerBundleInstallSpec
4731 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4732 }
4733
4734 // PolicyControllerHubConfig: Configuration for Policy Controller
4735 type PolicyControllerHubConfig struct {
4736 // AuditIntervalSeconds: Sets the interval for Policy Controller Audit Scans
4737 // (in seconds). When set to 0, this disables audit functionality altogether.
4738 AuditIntervalSeconds int64 `json:"auditIntervalSeconds,omitempty,string"`
4739 // ConstraintViolationLimit: The maximum number of audit violations to be
4740 // stored in a constraint. If not set, the internal default (currently 20) will
4741 // be used.
4742 ConstraintViolationLimit int64 `json:"constraintViolationLimit,omitempty,string"`
4743 // DeploymentConfigs: Map of deployment configs to deployments ("admission",
4744 // "audit", "mutation').
4745 DeploymentConfigs map[string]PolicyControllerPolicyControllerDeploymentConfig `json:"deploymentConfigs,omitempty"`
4746 // ExemptableNamespaces: The set of namespaces that are excluded from Policy
4747 // Controller checks. Namespaces do not need to currently exist on the cluster.
4748 ExemptableNamespaces []string `json:"exemptableNamespaces,omitempty"`
4749 // InstallSpec: The install_spec represents the intended state specified by the
4750 // latest request that mutated install_spec in the feature spec, not the
4751 // lifecycle state of the feature observed by the Hub feature controller that
4752 // is reported in the feature state.
4753 //
4754 // Possible values:
4755 // "INSTALL_SPEC_UNSPECIFIED" - Spec is unknown.
4756 // "INSTALL_SPEC_NOT_INSTALLED" - Request to uninstall Policy Controller.
4757 // "INSTALL_SPEC_ENABLED" - Request to install and enable Policy Controller.
4758 // "INSTALL_SPEC_SUSPENDED" - Request to suspend Policy Controller i.e. its
4759 // webhooks. If Policy Controller is not installed, it will be installed but
4760 // suspended.
4761 // "INSTALL_SPEC_DETACHED" - Request to stop all reconciliation actions by
4762 // PoCo Hub controller. This is a breakglass mechanism to stop PoCo Hub from
4763 // affecting cluster resources.
4764 InstallSpec string `json:"installSpec,omitempty"`
4765 // LogDeniesEnabled: Logs all denies and dry run failures.
4766 LogDeniesEnabled bool `json:"logDeniesEnabled,omitempty"`
4767 // Monitoring: Monitoring specifies the configuration of monitoring.
4768 Monitoring *PolicyControllerMonitoringConfig `json:"monitoring,omitempty"`
4769 // MutationEnabled: Enables the ability to mutate resources using Policy
4770 // Controller.
4771 MutationEnabled bool `json:"mutationEnabled,omitempty"`
4772 // PolicyContent: Specifies the desired policy content on the cluster
4773 PolicyContent *PolicyControllerPolicyContentSpec `json:"policyContent,omitempty"`
4774 // ReferentialRulesEnabled: Enables the ability to use Constraint Templates
4775 // that reference to objects other than the object currently being evaluated.
4776 ReferentialRulesEnabled bool `json:"referentialRulesEnabled,omitempty"`
4777 // ForceSendFields is a list of field names (e.g. "AuditIntervalSeconds") to
4778 // unconditionally include in API requests. By default, fields with empty or
4779 // default values are omitted from API requests. See
4780 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4781 // details.
4782 ForceSendFields []string `json:"-"`
4783 // NullFields is a list of field names (e.g. "AuditIntervalSeconds") to include
4784 // in API requests with the JSON null value. By default, fields with empty
4785 // values are omitted from API requests. See
4786 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4787 NullFields []string `json:"-"`
4788 }
4789
4790 func (s PolicyControllerHubConfig) MarshalJSON() ([]byte, error) {
4791 type NoMethod PolicyControllerHubConfig
4792 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4793 }
4794
4795 // PolicyControllerMembershipSpec: **Policy Controller**: Configuration for a
4796 // single cluster. Intended to parallel the PolicyController CR.
4797 type PolicyControllerMembershipSpec struct {
4798 // PolicyControllerHubConfig: Policy Controller configuration for the cluster.
4799 PolicyControllerHubConfig *PolicyControllerHubConfig `json:"policyControllerHubConfig,omitempty"`
4800 // Version: Version of Policy Controller installed.
4801 Version string `json:"version,omitempty"`
4802 // ForceSendFields is a list of field names (e.g. "PolicyControllerHubConfig")
4803 // to unconditionally include in API requests. By default, fields with empty or
4804 // default values are omitted from API requests. See
4805 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4806 // details.
4807 ForceSendFields []string `json:"-"`
4808 // NullFields is a list of field names (e.g. "PolicyControllerHubConfig") to
4809 // include in API requests with the JSON null value. By default, fields with
4810 // empty values are omitted from API requests. See
4811 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4812 NullFields []string `json:"-"`
4813 }
4814
4815 func (s PolicyControllerMembershipSpec) MarshalJSON() ([]byte, error) {
4816 type NoMethod PolicyControllerMembershipSpec
4817 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4818 }
4819
4820 // PolicyControllerMembershipState: **Policy Controller**: State for a single
4821 // cluster.
4822 type PolicyControllerMembershipState struct {
4823 // ComponentStates: Currently these include (also serving as map keys): 1.
4824 // "admission" 2. "audit" 3. "mutation"
4825 ComponentStates map[string]PolicyControllerOnClusterState `json:"componentStates,omitempty"`
4826 // PolicyContentState: The overall content state observed by the Hub Feature
4827 // controller.
4828 PolicyContentState *PolicyControllerPolicyContentState `json:"policyContentState,omitempty"`
4829 // State: The overall Policy Controller lifecycle state observed by the Hub
4830 // Feature controller.
4831 //
4832 // Possible values:
4833 // "LIFECYCLE_STATE_UNSPECIFIED" - The lifecycle state is unspecified.
4834 // "NOT_INSTALLED" - The PC does not exist on the given cluster, and no k8s
4835 // resources of any type that are associated with the PC should exist there.
4836 // The cluster does not possess a membership with the PCH.
4837 // "INSTALLING" - The PCH possesses a Membership, however the PC is not fully
4838 // installed on the cluster. In this state the hub can be expected to be taking
4839 // actions to install the PC on the cluster.
4840 // "ACTIVE" - The PC is fully installed on the cluster and in an operational
4841 // mode. In this state PCH will be reconciling state with the PC, and the PC
4842 // will be performing it's operational tasks per that software. Entering a
4843 // READY state requires that the hub has confirmed the PC is installed and its
4844 // pods are operational with the version of the PC the PCH expects.
4845 // "UPDATING" - The PC is fully installed, but in the process of changing the
4846 // configuration (including changing the version of PC either up and down, or
4847 // modifying the manifests of PC) of the resources running on the cluster. The
4848 // PCH has a Membership, is aware of the version the cluster should be running
4849 // in, but has not confirmed for itself that the PC is running with that
4850 // version.
4851 // "DECOMMISSIONING" - The PC may have resources on the cluster, but the PCH
4852 // wishes to remove the Membership. The Membership still exists.
4853 // "CLUSTER_ERROR" - The PC is not operational, and the PCH is unable to act
4854 // to make it operational. Entering a CLUSTER_ERROR state happens automatically
4855 // when the PCH determines that a PC installed on the cluster is non-operative
4856 // or that the cluster does not meet requirements set for the PCH to administer
4857 // the cluster but has nevertheless been given an instruction to do so (such as
4858 // 'install').
4859 // "HUB_ERROR" - In this state, the PC may still be operational, and only the
4860 // PCH is unable to act. The hub should not issue instructions to change the PC
4861 // state, or otherwise interfere with the on-cluster resources. Entering a
4862 // HUB_ERROR state happens automatically when the PCH determines the hub is in
4863 // an unhealthy state and it wishes to 'take hands off' to avoid corrupting the
4864 // PC or other data.
4865 // "SUSPENDED" - Policy Controller (PC) is installed but suspended. This
4866 // means that the policies are not enforced, but violations are still recorded
4867 // (through audit).
4868 // "DETACHED" - PoCo Hub is not taking any action to reconcile cluster
4869 // objects. Changes to those objects will not be overwritten by PoCo Hub.
4870 State string `json:"state,omitempty"`
4871 // ForceSendFields is a list of field names (e.g. "ComponentStates") to
4872 // unconditionally include in API requests. By default, fields with empty or
4873 // default values are omitted from API requests. See
4874 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4875 // details.
4876 ForceSendFields []string `json:"-"`
4877 // NullFields is a list of field names (e.g. "ComponentStates") to include in
4878 // API requests with the JSON null value. By default, fields with empty values
4879 // are omitted from API requests. See
4880 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4881 NullFields []string `json:"-"`
4882 }
4883
4884 func (s PolicyControllerMembershipState) MarshalJSON() ([]byte, error) {
4885 type NoMethod PolicyControllerMembershipState
4886 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4887 }
4888
4889 // PolicyControllerMonitoringConfig: MonitoringConfig specifies the backends
4890 // Policy Controller should export metrics to. For example, to specify metrics
4891 // should be exported to Cloud Monitoring and Prometheus, specify backends:
4892 // ["cloudmonitoring", "prometheus"]
4893 type PolicyControllerMonitoringConfig struct {
4894 // Backends: Specifies the list of backends Policy Controller will export to.
4895 // An empty list would effectively disable metrics export.
4896 //
4897 // Possible values:
4898 // "MONITORING_BACKEND_UNSPECIFIED" - Backend cannot be determined
4899 // "PROMETHEUS" - Prometheus backend for monitoring
4900 // "CLOUD_MONITORING" - Stackdriver/Cloud Monitoring backend for monitoring
4901 Backends []string `json:"backends,omitempty"`
4902 // ForceSendFields is a list of field names (e.g. "Backends") to
4903 // unconditionally include in API requests. By default, fields with empty or
4904 // default values are omitted from API requests. See
4905 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4906 // details.
4907 ForceSendFields []string `json:"-"`
4908 // NullFields is a list of field names (e.g. "Backends") to include in API
4909 // requests with the JSON null value. By default, fields with empty values are
4910 // omitted from API requests. See
4911 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4912 NullFields []string `json:"-"`
4913 }
4914
4915 func (s PolicyControllerMonitoringConfig) MarshalJSON() ([]byte, error) {
4916 type NoMethod PolicyControllerMonitoringConfig
4917 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4918 }
4919
4920 // PolicyControllerOnClusterState: OnClusterState represents the state of a
4921 // sub-component of Policy Controller.
4922 type PolicyControllerOnClusterState struct {
4923 // Details: Surface potential errors or information logs.
4924 Details string `json:"details,omitempty"`
4925 // State: The lifecycle state of this component.
4926 //
4927 // Possible values:
4928 // "LIFECYCLE_STATE_UNSPECIFIED" - The lifecycle state is unspecified.
4929 // "NOT_INSTALLED" - The PC does not exist on the given cluster, and no k8s
4930 // resources of any type that are associated with the PC should exist there.
4931 // The cluster does not possess a membership with the PCH.
4932 // "INSTALLING" - The PCH possesses a Membership, however the PC is not fully
4933 // installed on the cluster. In this state the hub can be expected to be taking
4934 // actions to install the PC on the cluster.
4935 // "ACTIVE" - The PC is fully installed on the cluster and in an operational
4936 // mode. In this state PCH will be reconciling state with the PC, and the PC
4937 // will be performing it's operational tasks per that software. Entering a
4938 // READY state requires that the hub has confirmed the PC is installed and its
4939 // pods are operational with the version of the PC the PCH expects.
4940 // "UPDATING" - The PC is fully installed, but in the process of changing the
4941 // configuration (including changing the version of PC either up and down, or
4942 // modifying the manifests of PC) of the resources running on the cluster. The
4943 // PCH has a Membership, is aware of the version the cluster should be running
4944 // in, but has not confirmed for itself that the PC is running with that
4945 // version.
4946 // "DECOMMISSIONING" - The PC may have resources on the cluster, but the PCH
4947 // wishes to remove the Membership. The Membership still exists.
4948 // "CLUSTER_ERROR" - The PC is not operational, and the PCH is unable to act
4949 // to make it operational. Entering a CLUSTER_ERROR state happens automatically
4950 // when the PCH determines that a PC installed on the cluster is non-operative
4951 // or that the cluster does not meet requirements set for the PCH to administer
4952 // the cluster but has nevertheless been given an instruction to do so (such as
4953 // 'install').
4954 // "HUB_ERROR" - In this state, the PC may still be operational, and only the
4955 // PCH is unable to act. The hub should not issue instructions to change the PC
4956 // state, or otherwise interfere with the on-cluster resources. Entering a
4957 // HUB_ERROR state happens automatically when the PCH determines the hub is in
4958 // an unhealthy state and it wishes to 'take hands off' to avoid corrupting the
4959 // PC or other data.
4960 // "SUSPENDED" - Policy Controller (PC) is installed but suspended. This
4961 // means that the policies are not enforced, but violations are still recorded
4962 // (through audit).
4963 // "DETACHED" - PoCo Hub is not taking any action to reconcile cluster
4964 // objects. Changes to those objects will not be overwritten by PoCo Hub.
4965 State string `json:"state,omitempty"`
4966 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally
4967 // include in API requests. By default, fields with empty or default values are
4968 // omitted from API requests. See
4969 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4970 // details.
4971 ForceSendFields []string `json:"-"`
4972 // NullFields is a list of field names (e.g. "Details") to include in API
4973 // requests with the JSON null value. By default, fields with empty values are
4974 // omitted from API requests. See
4975 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4976 NullFields []string `json:"-"`
4977 }
4978
4979 func (s PolicyControllerOnClusterState) MarshalJSON() ([]byte, error) {
4980 type NoMethod PolicyControllerOnClusterState
4981 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4982 }
4983
4984 // PolicyControllerPolicyContentSpec: PolicyContentSpec defines the user's
4985 // desired content configuration on the cluster.
4986 type PolicyControllerPolicyContentSpec struct {
4987 // Bundles: map of bundle name to BundleInstallSpec. The bundle name maps to
4988 // the `bundleName` key in the `policycontroller.gke.io/constraintData`
4989 // annotation on a constraint.
4990 Bundles map[string]PolicyControllerBundleInstallSpec `json:"bundles,omitempty"`
4991 // TemplateLibrary: Configures the installation of the Template Library.
4992 TemplateLibrary *PolicyControllerTemplateLibraryConfig `json:"templateLibrary,omitempty"`
4993 // ForceSendFields is a list of field names (e.g. "Bundles") to unconditionally
4994 // include in API requests. By default, fields with empty or default values are
4995 // omitted from API requests. See
4996 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4997 // details.
4998 ForceSendFields []string `json:"-"`
4999 // NullFields is a list of field names (e.g. "Bundles") to include in API
5000 // requests with the JSON null value. By default, fields with empty values are
5001 // omitted from API requests. See
5002 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5003 NullFields []string `json:"-"`
5004 }
5005
5006 func (s PolicyControllerPolicyContentSpec) MarshalJSON() ([]byte, error) {
5007 type NoMethod PolicyControllerPolicyContentSpec
5008 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5009 }
5010
5011 // PolicyControllerPolicyContentState: The state of the policy controller
5012 // policy content
5013 type PolicyControllerPolicyContentState struct {
5014 // BundleStates: The state of the any bundles included in the chosen version of
5015 // the manifest
5016 BundleStates map[string]PolicyControllerOnClusterState `json:"bundleStates,omitempty"`
5017 // ReferentialSyncConfigState: The state of the referential data sync
5018 // configuration. This could represent the state of either the syncSet
5019 // object(s) or the config object, depending on the version of PoCo configured
5020 // by the user.
5021 ReferentialSyncConfigState *PolicyControllerOnClusterState `json:"referentialSyncConfigState,omitempty"`
5022 // TemplateLibraryState: The state of the template library
5023 TemplateLibraryState *PolicyControllerOnClusterState `json:"templateLibraryState,omitempty"`
5024 // ForceSendFields is a list of field names (e.g. "BundleStates") to
5025 // unconditionally include in API requests. By default, fields with empty or
5026 // default values are omitted from API requests. See
5027 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5028 // details.
5029 ForceSendFields []string `json:"-"`
5030 // NullFields is a list of field names (e.g. "BundleStates") to include in API
5031 // requests with the JSON null value. By default, fields with empty values are
5032 // omitted from API requests. See
5033 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5034 NullFields []string `json:"-"`
5035 }
5036
5037 func (s PolicyControllerPolicyContentState) MarshalJSON() ([]byte, error) {
5038 type NoMethod PolicyControllerPolicyContentState
5039 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5040 }
5041
5042 // PolicyControllerPolicyControllerDeploymentConfig: Deployment-specific
5043 // configuration.
5044 type PolicyControllerPolicyControllerDeploymentConfig struct {
5045 // ContainerResources: Container resource requirements.
5046 ContainerResources *PolicyControllerResourceRequirements `json:"containerResources,omitempty"`
5047 // PodAffinity: Pod affinity configuration.
5048 //
5049 // Possible values:
5050 // "AFFINITY_UNSPECIFIED" - No affinity configuration has been specified.
5051 // "NO_AFFINITY" - Affinity configurations will be removed from the
5052 // deployment.
5053 // "ANTI_AFFINITY" - Anti-affinity configuration will be applied to this
5054 // deployment. Default for admissions deployment.
5055 PodAffinity string `json:"podAffinity,omitempty"`
5056 // PodAntiAffinity: Pod anti-affinity enablement. Deprecated: use
5057 // `pod_affinity` instead.
5058 PodAntiAffinity bool `json:"podAntiAffinity,omitempty"`
5059 // PodTolerations: Pod tolerations of node taints.
5060 PodTolerations []*PolicyControllerToleration `json:"podTolerations,omitempty"`
5061 // ReplicaCount: Pod replica count.
5062 ReplicaCount int64 `json:"replicaCount,omitempty,string"`
5063 // ForceSendFields is a list of field names (e.g. "ContainerResources") to
5064 // unconditionally include in API requests. By default, fields with empty or
5065 // default values are omitted from API requests. See
5066 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5067 // details.
5068 ForceSendFields []string `json:"-"`
5069 // NullFields is a list of field names (e.g. "ContainerResources") to include
5070 // in API requests with the JSON null value. By default, fields with empty
5071 // values are omitted from API requests. See
5072 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5073 NullFields []string `json:"-"`
5074 }
5075
5076 func (s PolicyControllerPolicyControllerDeploymentConfig) MarshalJSON() ([]byte, error) {
5077 type NoMethod PolicyControllerPolicyControllerDeploymentConfig
5078 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5079 }
5080
5081 // PolicyControllerResourceList: ResourceList contains container resource
5082 // requirements.
5083 type PolicyControllerResourceList struct {
5084 // Cpu: CPU requirement expressed in Kubernetes resource units.
5085 Cpu string `json:"cpu,omitempty"`
5086 // Memory: Memory requirement expressed in Kubernetes resource units.
5087 Memory string `json:"memory,omitempty"`
5088 // ForceSendFields is a list of field names (e.g. "Cpu") to unconditionally
5089 // include in API requests. By default, fields with empty or default values are
5090 // omitted from API requests. See
5091 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5092 // details.
5093 ForceSendFields []string `json:"-"`
5094 // NullFields is a list of field names (e.g. "Cpu") to include in API requests
5095 // with the JSON null value. By default, fields with empty values are omitted
5096 // from API requests. See
5097 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5098 NullFields []string `json:"-"`
5099 }
5100
5101 func (s PolicyControllerResourceList) MarshalJSON() ([]byte, error) {
5102 type NoMethod PolicyControllerResourceList
5103 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5104 }
5105
5106 // PolicyControllerResourceRequirements: ResourceRequirements describes the
5107 // compute resource requirements.
5108 type PolicyControllerResourceRequirements struct {
5109 // Limits: Limits describes the maximum amount of compute resources allowed for
5110 // use by the running container.
5111 Limits *PolicyControllerResourceList `json:"limits,omitempty"`
5112 // Requests: Requests describes the amount of compute resources reserved for
5113 // the container by the kube-scheduler.
5114 Requests *PolicyControllerResourceList `json:"requests,omitempty"`
5115 // ForceSendFields is a list of field names (e.g. "Limits") to unconditionally
5116 // include in API requests. By default, fields with empty or default values are
5117 // omitted from API requests. See
5118 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5119 // details.
5120 ForceSendFields []string `json:"-"`
5121 // NullFields is a list of field names (e.g. "Limits") to include in API
5122 // requests with the JSON null value. By default, fields with empty values are
5123 // omitted from API requests. See
5124 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5125 NullFields []string `json:"-"`
5126 }
5127
5128 func (s PolicyControllerResourceRequirements) MarshalJSON() ([]byte, error) {
5129 type NoMethod PolicyControllerResourceRequirements
5130 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5131 }
5132
5133 // PolicyControllerTemplateLibraryConfig: The config specifying which default
5134 // library templates to install.
5135 type PolicyControllerTemplateLibraryConfig struct {
5136 // Installation: Configures the manner in which the template library is
5137 // installed on the cluster.
5138 //
5139 // Possible values:
5140 // "INSTALLATION_UNSPECIFIED" - No installation strategy has been specified.
5141 // "NOT_INSTALLED" - Do not install the template library.
5142 // "ALL" - Install the entire template library.
5143 Installation string `json:"installation,omitempty"`
5144 // ForceSendFields is a list of field names (e.g. "Installation") to
5145 // unconditionally include in API requests. By default, fields with empty or
5146 // default values are omitted from API requests. See
5147 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5148 // details.
5149 ForceSendFields []string `json:"-"`
5150 // NullFields is a list of field names (e.g. "Installation") to include in API
5151 // requests with the JSON null value. By default, fields with empty values are
5152 // omitted from API requests. See
5153 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5154 NullFields []string `json:"-"`
5155 }
5156
5157 func (s PolicyControllerTemplateLibraryConfig) MarshalJSON() ([]byte, error) {
5158 type NoMethod PolicyControllerTemplateLibraryConfig
5159 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5160 }
5161
5162 // PolicyControllerToleration: Toleration of a node taint.
5163 type PolicyControllerToleration struct {
5164 // Effect: Matches a taint effect.
5165 Effect string `json:"effect,omitempty"`
5166 // Key: Matches a taint key (not necessarily unique).
5167 Key string `json:"key,omitempty"`
5168 // Operator: Matches a taint operator.
5169 Operator string `json:"operator,omitempty"`
5170 // Value: Matches a taint value.
5171 Value string `json:"value,omitempty"`
5172 // ForceSendFields is a list of field names (e.g. "Effect") to unconditionally
5173 // include in API requests. By default, fields with empty or default values are
5174 // omitted from API requests. See
5175 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5176 // details.
5177 ForceSendFields []string `json:"-"`
5178 // NullFields is a list of field names (e.g. "Effect") to include in API
5179 // requests with the JSON null value. By default, fields with empty values are
5180 // omitted from API requests. See
5181 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5182 NullFields []string `json:"-"`
5183 }
5184
5185 func (s PolicyControllerToleration) MarshalJSON() ([]byte, error) {
5186 type NoMethod PolicyControllerToleration
5187 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5188 }
5189
5190 // RBACRoleBinding: RBACRoleBinding represents a rbacrolebinding across the
5191 // Fleet
5192 type RBACRoleBinding struct {
5193 // CreateTime: Output only. When the rbacrolebinding was created.
5194 CreateTime string `json:"createTime,omitempty"`
5195 // DeleteTime: Output only. When the rbacrolebinding was deleted.
5196 DeleteTime string `json:"deleteTime,omitempty"`
5197 // Group: group is the group, as seen by the kubernetes cluster.
5198 Group string `json:"group,omitempty"`
5199 // Labels: Optional. Labels for this RBACRolebinding.
5200 Labels map[string]string `json:"labels,omitempty"`
5201 // Name: The resource name for the rbacrolebinding
5202 // `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rba
5203 // crolebinding}` or
5204 // `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebin
5205 // dings/{rbacrolebinding}`
5206 Name string `json:"name,omitempty"`
5207 // Role: Required. Role to bind to the principal
5208 Role *Role `json:"role,omitempty"`
5209 // State: Output only. State of the rbacrolebinding resource.
5210 State *RBACRoleBindingLifecycleState `json:"state,omitempty"`
5211 // Uid: Output only. Google-generated UUID for this resource. This is unique
5212 // across all rbacrolebinding resources. If a rbacrolebinding resource is
5213 // deleted and another resource with the same name is created, it gets a
5214 // different uid.
5215 Uid string `json:"uid,omitempty"`
5216 // UpdateTime: Output only. When the rbacrolebinding was last updated.
5217 UpdateTime string `json:"updateTime,omitempty"`
5218 // User: user is the name of the user as seen by the kubernetes cluster,
5219 // example "alice" or "[email protected]"
5220 User string `json:"user,omitempty"`
5221
5222 // ServerResponse contains the HTTP response code and headers from the server.
5223 googleapi.ServerResponse `json:"-"`
5224 // ForceSendFields is a list of field names (e.g. "CreateTime") to
5225 // unconditionally include in API requests. By default, fields with empty or
5226 // default values are omitted from API requests. See
5227 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5228 // details.
5229 ForceSendFields []string `json:"-"`
5230 // NullFields is a list of field names (e.g. "CreateTime") to include in API
5231 // requests with the JSON null value. By default, fields with empty values are
5232 // omitted from API requests. See
5233 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5234 NullFields []string `json:"-"`
5235 }
5236
5237 func (s RBACRoleBinding) MarshalJSON() ([]byte, error) {
5238 type NoMethod RBACRoleBinding
5239 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5240 }
5241
5242 // RBACRoleBindingActuationFeatureSpec: **RBAC RoleBinding Actuation**: The
5243 // Hub-wide input for the RBACRoleBindingActuation feature.
5244 type RBACRoleBindingActuationFeatureSpec struct {
5245 // AllowedCustomRoles: The list of allowed custom roles (ClusterRoles). If a
5246 // ClusterRole is not part of this list, it cannot be used in a Scope
5247 // RBACRoleBinding. If a ClusterRole in this list is in use, it cannot be
5248 // removed from the list.
5249 AllowedCustomRoles []string `json:"allowedCustomRoles,omitempty"`
5250 // ForceSendFields is a list of field names (e.g. "AllowedCustomRoles") to
5251 // unconditionally include in API requests. By default, fields with empty or
5252 // default values are omitted from API requests. See
5253 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5254 // details.
5255 ForceSendFields []string `json:"-"`
5256 // NullFields is a list of field names (e.g. "AllowedCustomRoles") to include
5257 // in API requests with the JSON null value. By default, fields with empty
5258 // values are omitted from API requests. See
5259 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5260 NullFields []string `json:"-"`
5261 }
5262
5263 func (s RBACRoleBindingActuationFeatureSpec) MarshalJSON() ([]byte, error) {
5264 type NoMethod RBACRoleBindingActuationFeatureSpec
5265 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5266 }
5267
5268 // RBACRoleBindingActuationFeatureState: **RBAC RoleBinding Actuation**: An
5269 // empty state left as an example Hub-wide Feature state.
5270 type RBACRoleBindingActuationFeatureState struct {
5271 }
5272
5273 // RBACRoleBindingLifecycleState: RBACRoleBindingLifecycleState describes the
5274 // state of a RbacRoleBinding resource.
5275 type RBACRoleBindingLifecycleState struct {
5276 // Code: Output only. The current state of the rbacrolebinding resource.
5277 //
5278 // Possible values:
5279 // "CODE_UNSPECIFIED" - The code is not set.
5280 // "CREATING" - The rbacrolebinding is being created.
5281 // "READY" - The rbacrolebinding active.
5282 // "DELETING" - The rbacrolebinding is being deleted.
5283 // "UPDATING" - The rbacrolebinding is being updated.
5284 Code string `json:"code,omitempty"`
5285 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
5286 // include in API requests. By default, fields with empty or default values are
5287 // omitted from API requests. See
5288 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5289 // details.
5290 ForceSendFields []string `json:"-"`
5291 // NullFields is a list of field names (e.g. "Code") to include in API requests
5292 // with the JSON null value. By default, fields with empty values are omitted
5293 // from API requests. See
5294 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5295 NullFields []string `json:"-"`
5296 }
5297
5298 func (s RBACRoleBindingLifecycleState) MarshalJSON() ([]byte, error) {
5299 type NoMethod RBACRoleBindingLifecycleState
5300 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5301 }
5302
5303 // ResourceManifest: ResourceManifest represents a single Kubernetes resource
5304 // to be applied to the cluster.
5305 type ResourceManifest struct {
5306 // ClusterScoped: Output only. Whether the resource provided in the manifest is
5307 // `cluster_scoped`. If unset, the manifest is assumed to be namespace scoped.
5308 // This field is used for REST mapping when applying the resource in a cluster.
5309 ClusterScoped bool `json:"clusterScoped,omitempty"`
5310 // Manifest: Output only. YAML manifest of the resource.
5311 Manifest string `json:"manifest,omitempty"`
5312 // ForceSendFields is a list of field names (e.g. "ClusterScoped") to
5313 // unconditionally include in API requests. By default, fields with empty or
5314 // default values are omitted from API requests. See
5315 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5316 // details.
5317 ForceSendFields []string `json:"-"`
5318 // NullFields is a list of field names (e.g. "ClusterScoped") to include in API
5319 // requests with the JSON null value. By default, fields with empty values are
5320 // omitted from API requests. See
5321 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5322 NullFields []string `json:"-"`
5323 }
5324
5325 func (s ResourceManifest) MarshalJSON() ([]byte, error) {
5326 type NoMethod ResourceManifest
5327 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5328 }
5329
5330 // ResourceOptions: ResourceOptions represent options for Kubernetes resource
5331 // generation.
5332 type ResourceOptions struct {
5333 // ConnectVersion: Optional. The Connect agent version to use for
5334 // connect_resources. Defaults to the latest GKE Connect version. The version
5335 // must be a currently supported version, obsolete versions will be rejected.
5336 ConnectVersion string `json:"connectVersion,omitempty"`
5337 // K8sGitVersion: Optional. Git version of the Kubernetes cluster. This is only
5338 // used to gate the Connect Agent migration to svc.id.goog on GDC-SO 1.33.100
5339 // patch and above.
5340 K8sGitVersion string `json:"k8sGitVersion,omitempty"`
5341 // K8sVersion: Optional. Major and minor version of the Kubernetes cluster.
5342 // This is only used to determine which version to use for the
5343 // CustomResourceDefinition resources, `apiextensions/v1beta1`
5344 // or`apiextensions/v1`.
5345 K8sVersion string `json:"k8sVersion,omitempty"`
5346 // V1beta1Crd: Optional. Use `apiextensions/v1beta1` instead of
5347 // `apiextensions/v1` for CustomResourceDefinition resources. This option
5348 // should be set for clusters with Kubernetes apiserver versions <1.16.
5349 V1beta1Crd bool `json:"v1beta1Crd,omitempty"`
5350 // ForceSendFields is a list of field names (e.g. "ConnectVersion") to
5351 // unconditionally include in API requests. By default, fields with empty or
5352 // default values are omitted from API requests. See
5353 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5354 // details.
5355 ForceSendFields []string `json:"-"`
5356 // NullFields is a list of field names (e.g. "ConnectVersion") to include in
5357 // API requests with the JSON null value. By default, fields with empty values
5358 // are omitted from API requests. See
5359 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5360 NullFields []string `json:"-"`
5361 }
5362
5363 func (s ResourceOptions) MarshalJSON() ([]byte, error) {
5364 type NoMethod ResourceOptions
5365 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5366 }
5367
5368 // Role: Role is the type for Kubernetes roles
5369 type Role struct {
5370 // CustomRole: Optional. custom_role is the name of a custom
5371 // KubernetesClusterRole to use.
5372 CustomRole string `json:"customRole,omitempty"`
5373 // PredefinedRole: predefined_role is the Kubernetes default role to use
5374 //
5375 // Possible values:
5376 // "UNKNOWN" - UNKNOWN
5377 // "ADMIN" - ADMIN has EDIT and RBAC permissions
5378 // "EDIT" - EDIT can edit all resources except RBAC
5379 // "VIEW" - VIEW can only read resources
5380 // "ANTHOS_SUPPORT" - ANTHOS_SUPPORT gives Google Support read-only access to
5381 // a number of cluster resources.
5382 PredefinedRole string `json:"predefinedRole,omitempty"`
5383 // ForceSendFields is a list of field names (e.g. "CustomRole") to
5384 // unconditionally include in API requests. By default, fields with empty or
5385 // default values are omitted from API requests. See
5386 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5387 // details.
5388 ForceSendFields []string `json:"-"`
5389 // NullFields is a list of field names (e.g. "CustomRole") to include in API
5390 // requests with the JSON null value. By default, fields with empty values are
5391 // omitted from API requests. See
5392 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5393 NullFields []string `json:"-"`
5394 }
5395
5396 func (s Role) MarshalJSON() ([]byte, error) {
5397 type NoMethod Role
5398 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5399 }
5400
5401 // Scope: Scope represents a Scope in a Fleet.
5402 type Scope struct {
5403 // CreateTime: Output only. When the scope was created.
5404 CreateTime string `json:"createTime,omitempty"`
5405 // DeleteTime: Output only. When the scope was deleted.
5406 DeleteTime string `json:"deleteTime,omitempty"`
5407 // Labels: Optional. Labels for this Scope.
5408 Labels map[string]string `json:"labels,omitempty"`
5409 // Name: The resource name for the scope
5410 // `projects/{project}/locations/{location}/scopes/{scope}`
5411 Name string `json:"name,omitempty"`
5412 // NamespaceLabels: Optional. Scope-level cluster namespace labels. For the
5413 // member clusters bound to the Scope, these labels are applied to each
5414 // namespace under the Scope. Scope-level labels take precedence over
5415 // Namespace-level labels (`namespace_labels` in the Fleet Namespace resource)
5416 // if they share a key. Keys and values must be Kubernetes-conformant.
5417 NamespaceLabels map[string]string `json:"namespaceLabels,omitempty"`
5418 // State: Output only. State of the scope resource.
5419 State *ScopeLifecycleState `json:"state,omitempty"`
5420 // Uid: Output only. Google-generated UUID for this resource. This is unique
5421 // across all scope resources. If a scope resource is deleted and another
5422 // resource with the same name is created, it gets a different uid.
5423 Uid string `json:"uid,omitempty"`
5424 // UpdateTime: Output only. When the scope was last updated.
5425 UpdateTime string `json:"updateTime,omitempty"`
5426
5427 // ServerResponse contains the HTTP response code and headers from the server.
5428 googleapi.ServerResponse `json:"-"`
5429 // ForceSendFields is a list of field names (e.g. "CreateTime") to
5430 // unconditionally include in API requests. By default, fields with empty or
5431 // default values are omitted from API requests. See
5432 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5433 // details.
5434 ForceSendFields []string `json:"-"`
5435 // NullFields is a list of field names (e.g. "CreateTime") to include in API
5436 // requests with the JSON null value. By default, fields with empty values are
5437 // omitted from API requests. See
5438 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5439 NullFields []string `json:"-"`
5440 }
5441
5442 func (s Scope) MarshalJSON() ([]byte, error) {
5443 type NoMethod Scope
5444 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5445 }
5446
5447 // ScopeFeatureSpec: ScopeFeatureSpec contains feature specs for a fleet scope.
5448 type ScopeFeatureSpec struct {
5449 }
5450
5451 // ScopeFeatureState: ScopeFeatureState contains Scope-wide Feature status
5452 // information.
5453 type ScopeFeatureState struct {
5454 // State: Output only. The "running state" of the Feature in this Scope.
5455 State *FeatureState `json:"state,omitempty"`
5456 // ForceSendFields is a list of field names (e.g. "State") to unconditionally
5457 // include in API requests. By default, fields with empty or default values are
5458 // omitted from API requests. See
5459 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5460 // details.
5461 ForceSendFields []string `json:"-"`
5462 // NullFields is a list of field names (e.g. "State") to include in API
5463 // requests with the JSON null value. By default, fields with empty values are
5464 // omitted from API requests. See
5465 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5466 NullFields []string `json:"-"`
5467 }
5468
5469 func (s ScopeFeatureState) MarshalJSON() ([]byte, error) {
5470 type NoMethod ScopeFeatureState
5471 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5472 }
5473
5474 // ScopeLifecycleState: ScopeLifecycleState describes the state of a Scope
5475 // resource.
5476 type ScopeLifecycleState struct {
5477 // Code: Output only. The current state of the scope resource.
5478 //
5479 // Possible values:
5480 // "CODE_UNSPECIFIED" - The code is not set.
5481 // "CREATING" - The scope is being created.
5482 // "READY" - The scope active.
5483 // "DELETING" - The scope is being deleted.
5484 // "UPDATING" - The scope is being updated.
5485 Code string `json:"code,omitempty"`
5486 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
5487 // include in API requests. By default, fields with empty or default values are
5488 // omitted from API requests. See
5489 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5490 // details.
5491 ForceSendFields []string `json:"-"`
5492 // NullFields is a list of field names (e.g. "Code") to include in API requests
5493 // with the JSON null value. By default, fields with empty values are omitted
5494 // from API requests. See
5495 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5496 NullFields []string `json:"-"`
5497 }
5498
5499 func (s ScopeLifecycleState) MarshalJSON() ([]byte, error) {
5500 type NoMethod ScopeLifecycleState
5501 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5502 }
5503
5504 // SecurityPostureConfig: SecurityPostureConfig defines the flags needed to
5505 // enable/disable features for the Security Posture API.
5506 type SecurityPostureConfig struct {
5507 // Mode: Sets which mode to use for Security Posture features.
5508 //
5509 // Possible values:
5510 // "MODE_UNSPECIFIED" - Default value not specified.
5511 // "DISABLED" - Disables Security Posture features on the cluster.
5512 // "BASIC" - Applies Security Posture features on the cluster.
5513 // "ENTERPRISE" - Deprecated: Security Posture Enterprise features are no
5514 // longer supported. For more details, see
5515 // https://cloud.google.com/kubernetes-engine/docs/deprecations/posture-management-deprecation.
5516 // Applies the Security Posture off cluster Enterprise level features.
5517 Mode string `json:"mode,omitempty"`
5518 // VulnerabilityMode: Sets which mode to use for vulnerability scanning.
5519 //
5520 // Possible values:
5521 // "VULNERABILITY_MODE_UNSPECIFIED" - Default value not specified.
5522 // "VULNERABILITY_DISABLED" - Disables vulnerability scanning on the cluster.
5523 // "VULNERABILITY_BASIC" - Deprecated: Basic vulnerability scanning is no
5524 // longer supported. For more details, see
5525 // https://cloud.google.com/kubernetes-engine/docs/deprecations/posture-management-deprecation.
5526 // Applies basic vulnerability scanning on the cluster.
5527 // "VULNERABILITY_ENTERPRISE" - Applies the Security Posture's vulnerability
5528 // on cluster Enterprise level features.
5529 VulnerabilityMode string `json:"vulnerabilityMode,omitempty"`
5530 // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally
5531 // include in API requests. By default, fields with empty or default values are
5532 // omitted from API requests. See
5533 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5534 // details.
5535 ForceSendFields []string `json:"-"`
5536 // NullFields is a list of field names (e.g. "Mode") to include in API requests
5537 // with the JSON null value. By default, fields with empty values are omitted
5538 // from API requests. See
5539 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5540 NullFields []string `json:"-"`
5541 }
5542
5543 func (s SecurityPostureConfig) MarshalJSON() ([]byte, error) {
5544 type NoMethod SecurityPostureConfig
5545 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5546 }
5547
5548 // ServiceMeshCondition: Condition being reported.
5549 type ServiceMeshCondition struct {
5550 // Code: Unique identifier of the condition which describes the condition
5551 // recognizable to the user.
5552 //
5553 // Possible values:
5554 // "CODE_UNSPECIFIED" - Default Unspecified code
5555 // "MESH_IAM_PERMISSION_DENIED" - Mesh IAM permission denied error code
5556 // "MESH_IAM_CROSS_PROJECT_PERMISSION_DENIED" - Permission denied error code
5557 // for cross-project
5558 // "CNI_CONFIG_UNSUPPORTED" - CNI config unsupported error code
5559 // "GKE_SANDBOX_UNSUPPORTED" - GKE sandbox unsupported error code
5560 // "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED" - Nodepool workload
5561 // identity federation required error code
5562 // "CNI_INSTALLATION_FAILED" - CNI installation failed error code
5563 // "CNI_POD_UNSCHEDULABLE" - CNI pod unschedulable error code
5564 // "CLUSTER_HAS_ZERO_NODES" - Cluster has zero node code
5565 // "CANONICAL_SERVICE_ERROR" - Failure to reconcile CanonicalServices
5566 // "UNSUPPORTED_MULTIPLE_CONTROL_PLANES" - Multiple control planes
5567 // unsupported error code
5568 // "VPCSC_GA_SUPPORTED" - VPC-SC GA is supported for this control plane.
5569 // "DEPRECATED_SPEC_CONTROL_PLANE_MANAGEMENT" - User is using deprecated
5570 // ControlPlaneManagement and they have not yet set Management.
5571 // "DEPRECATED_SPEC_CONTROL_PLANE_MANAGEMENT_SAFE" - User is using deprecated
5572 // ControlPlaneManagement and they have already set Management.
5573 // "CONFIG_APPLY_INTERNAL_ERROR" - Configuration (Istio/k8s resources) failed
5574 // to apply due to internal error.
5575 // "CONFIG_VALIDATION_ERROR" - Configuration failed to be applied due to
5576 // being invalid.
5577 // "CONFIG_VALIDATION_WARNING" - Encountered configuration(s) with possible
5578 // unintended behavior or invalid configuration. These configs may not have
5579 // been applied.
5580 // "QUOTA_EXCEEDED_BACKEND_SERVICES" - BackendService quota exceeded error
5581 // code.
5582 // "QUOTA_EXCEEDED_HEALTH_CHECKS" - HealthCheck quota exceeded error code.
5583 // "QUOTA_EXCEEDED_HTTP_ROUTES" - HTTPRoute quota exceeded error code.
5584 // "QUOTA_EXCEEDED_TCP_ROUTES" - TCPRoute quota exceeded error code.
5585 // "QUOTA_EXCEEDED_TLS_ROUTES" - TLS routes quota exceeded error code.
5586 // "QUOTA_EXCEEDED_TRAFFIC_POLICIES" - TrafficPolicy quota exceeded error
5587 // code.
5588 // "QUOTA_EXCEEDED_ENDPOINT_POLICIES" - EndpointPolicy quota exceeded error
5589 // code.
5590 // "QUOTA_EXCEEDED_GATEWAYS" - Gateway quota exceeded error code.
5591 // "QUOTA_EXCEEDED_MESHES" - Mesh quota exceeded error code.
5592 // "QUOTA_EXCEEDED_SERVER_TLS_POLICIES" - ServerTLSPolicy quota exceeded
5593 // error code.
5594 // "QUOTA_EXCEEDED_CLIENT_TLS_POLICIES" - ClientTLSPolicy quota exceeded
5595 // error code.
5596 // "QUOTA_EXCEEDED_SERVICE_LB_POLICIES" - ServiceLBPolicy quota exceeded
5597 // error code.
5598 // "QUOTA_EXCEEDED_HTTP_FILTERS" - HTTPFilter quota exceeded error code.
5599 // "QUOTA_EXCEEDED_TCP_FILTERS" - TCPFilter quota exceeded error code.
5600 // "QUOTA_EXCEEDED_NETWORK_ENDPOINT_GROUPS" - NetworkEndpointGroup quota
5601 // exceeded error code.
5602 // "CONFIG_APPLY_BLOCKED" - Configuration failed to apply due to fleet being
5603 // blocked.
5604 // "LEGACY_MC_SECRETS" - Legacy istio secrets found for multicluster error
5605 // code
5606 // "WORKLOAD_IDENTITY_REQUIRED" - Workload identity required error code
5607 // "NON_STANDARD_BINARY_USAGE" - Non-standard binary usage error code
5608 // "UNSUPPORTED_GATEWAY_CLASS" - Unsupported gateway class error code
5609 // "MANAGED_CNI_NOT_ENABLED" - Managed CNI not enabled error code
5610 // "MODERNIZATION_SCHEDULED" - Modernization is scheduled for a cluster.
5611 // "MODERNIZATION_IN_PROGRESS" - Modernization is in progress for a cluster.
5612 // "MODERNIZATION_COMPLETED" - Modernization is completed for a cluster.
5613 // "MODERNIZATION_ABORTED" - Modernization is aborted for a cluster.
5614 // "MODERNIZATION_PREPARING" - Preparing cluster so that its workloads can be
5615 // migrated.
5616 // "MODERNIZATION_STALLED" - Modernization is stalled for a cluster.
5617 // "MODERNIZATION_PREPARED" - Cluster has been prepared for its workloads to
5618 // be migrated.
5619 // "MODERNIZATION_MIGRATING_WORKLOADS" - Migrating the cluster's workloads to
5620 // the new implementation.
5621 // "MODERNIZATION_ROLLING_BACK_CLUSTER" - Rollback is in progress for
5622 // modernization of a cluster.
5623 // "MODERNIZATION_WILL_BE_SCHEDULED" - Modernization will be scheduled for a
5624 // fleet.
5625 // "MODERNIZATION_MANUAL" - Fleet is opted out from automated modernization.
5626 // "MODERNIZATION_ELIGIBLE" - Fleet is eligible for modernization.
5627 // "MODERNIZATION_MODERNIZING" - Modernization of one or more clusters in a
5628 // fleet is in progress.
5629 // "MODERNIZATION_MODERNIZED_SOAKING" - Modernization of all the fleet's
5630 // clusters is complete. Soaking before finalizing the modernization.
5631 // "MODERNIZATION_FINALIZED" - Modernization is finalized for all clusters in
5632 // a fleet. Rollback is no longer allowed.
5633 // "MODERNIZATION_ROLLING_BACK_FLEET" - Rollback is in progress for
5634 // modernization of all clusters in a fleet.
5635 Code string `json:"code,omitempty"`
5636 // Details: A short summary about the issue.
5637 Details string `json:"details,omitempty"`
5638 // DocumentationLink: Links contains actionable information.
5639 DocumentationLink string `json:"documentationLink,omitempty"`
5640 // Severity: Severity level of the condition.
5641 //
5642 // Possible values:
5643 // "SEVERITY_UNSPECIFIED" - Unspecified severity
5644 // "ERROR" - Indicates an issue that prevents the mesh from operating
5645 // correctly
5646 // "WARNING" - Indicates a setting is likely wrong, but the mesh is still
5647 // able to operate
5648 // "INFO" - An informational message, not requiring any action
5649 Severity string `json:"severity,omitempty"`
5650 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
5651 // include in API requests. By default, fields with empty or default values are
5652 // omitted from API requests. See
5653 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5654 // details.
5655 ForceSendFields []string `json:"-"`
5656 // NullFields is a list of field names (e.g. "Code") to include in API requests
5657 // with the JSON null value. By default, fields with empty values are omitted
5658 // from API requests. See
5659 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5660 NullFields []string `json:"-"`
5661 }
5662
5663 func (s ServiceMeshCondition) MarshalJSON() ([]byte, error) {
5664 type NoMethod ServiceMeshCondition
5665 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5666 }
5667
5668 // ServiceMeshControlPlaneManagement: Status of control plane management.
5669 type ServiceMeshControlPlaneManagement struct {
5670 // Details: Explanation of state.
5671 Details []*ServiceMeshStatusDetails `json:"details,omitempty"`
5672 // Implementation: Output only. Implementation of managed control plane.
5673 //
5674 // Possible values:
5675 // "IMPLEMENTATION_UNSPECIFIED" - Unspecified
5676 // "ISTIOD" - A Google build of istiod is used for the managed control plane.
5677 // "TRAFFIC_DIRECTOR" - Traffic director is used for the managed control
5678 // plane.
5679 // "UPDATING" - The control plane implementation is being updated.
5680 Implementation string `json:"implementation,omitempty"`
5681 // State: LifecycleState of control plane management.
5682 //
5683 // Possible values:
5684 // "LIFECYCLE_STATE_UNSPECIFIED" - Unspecified
5685 // "DISABLED" - DISABLED means that the component is not enabled.
5686 // "FAILED_PRECONDITION" - FAILED_PRECONDITION means that provisioning cannot
5687 // proceed because of some characteristic of the member cluster.
5688 // "PROVISIONING" - PROVISIONING means that provisioning is in progress.
5689 // "ACTIVE" - ACTIVE means that the component is ready for use.
5690 // "STALLED" - STALLED means that provisioning could not be done.
5691 // "NEEDS_ATTENTION" - NEEDS_ATTENTION means that the component is ready, but
5692 // some user intervention is required. (For example that the user should
5693 // migrate workloads to a new control plane revision.)
5694 // "DEGRADED" - DEGRADED means that the component is ready, but operating in
5695 // a degraded state.
5696 // "DEPROVISIONING" - DEPROVISIONING means that deprovisioning is in
5697 // progress.
5698 State string `json:"state,omitempty"`
5699 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally
5700 // include in API requests. By default, fields with empty or default values are
5701 // omitted from API requests. See
5702 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5703 // details.
5704 ForceSendFields []string `json:"-"`
5705 // NullFields is a list of field names (e.g. "Details") to include in API
5706 // requests with the JSON null value. By default, fields with empty values are
5707 // omitted from API requests. See
5708 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5709 NullFields []string `json:"-"`
5710 }
5711
5712 func (s ServiceMeshControlPlaneManagement) MarshalJSON() ([]byte, error) {
5713 type NoMethod ServiceMeshControlPlaneManagement
5714 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5715 }
5716
5717 // ServiceMeshDataPlaneManagement: Status of data plane management. Only
5718 // reported per-member.
5719 type ServiceMeshDataPlaneManagement struct {
5720 // Details: Explanation of the status.
5721 Details []*ServiceMeshStatusDetails `json:"details,omitempty"`
5722 // State: Lifecycle status of data plane management.
5723 //
5724 // Possible values:
5725 // "LIFECYCLE_STATE_UNSPECIFIED" - Unspecified
5726 // "DISABLED" - DISABLED means that the component is not enabled.
5727 // "FAILED_PRECONDITION" - FAILED_PRECONDITION means that provisioning cannot
5728 // proceed because of some characteristic of the member cluster.
5729 // "PROVISIONING" - PROVISIONING means that provisioning is in progress.
5730 // "ACTIVE" - ACTIVE means that the component is ready for use.
5731 // "STALLED" - STALLED means that provisioning could not be done.
5732 // "NEEDS_ATTENTION" - NEEDS_ATTENTION means that the component is ready, but
5733 // some user intervention is required. (For example that the user should
5734 // migrate workloads to a new control plane revision.)
5735 // "DEGRADED" - DEGRADED means that the component is ready, but operating in
5736 // a degraded state.
5737 // "DEPROVISIONING" - DEPROVISIONING means that deprovisioning is in
5738 // progress.
5739 State string `json:"state,omitempty"`
5740 // ForceSendFields is a list of field names (e.g. "Details") 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. "Details") 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 ServiceMeshDataPlaneManagement) MarshalJSON() ([]byte, error) {
5754 type NoMethod ServiceMeshDataPlaneManagement
5755 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5756 }
5757
5758 // ServiceMeshMembershipSpec: **Service Mesh**: Spec for a single Membership
5759 // for the servicemesh feature
5760 type ServiceMeshMembershipSpec struct {
5761 // ConfigApi: Optional. Specifies the API that will be used for configuring the
5762 // mesh workloads.
5763 //
5764 // Possible values:
5765 // "CONFIG_API_UNSPECIFIED" - Unspecified
5766 // "CONFIG_API_ISTIO" - Use the Istio API for configuration.
5767 // "CONFIG_API_GATEWAY" - Use the K8s Gateway API for configuration.
5768 ConfigApi string `json:"configApi,omitempty"`
5769 // ControlPlane: Deprecated: use `management` instead Enables automatic control
5770 // plane management.
5771 //
5772 // Possible values:
5773 // "CONTROL_PLANE_MANAGEMENT_UNSPECIFIED" - Unspecified
5774 // "AUTOMATIC" - Google should provision a control plane revision and make it
5775 // available in the cluster. Google will enroll this revision in a release
5776 // channel and keep it up to date. The control plane revision may be a managed
5777 // service, or a managed install.
5778 // "MANUAL" - User will manually configure the control plane (e.g. via CLI,
5779 // or via the ControlPlaneRevision KRM API)
5780 ControlPlane string `json:"controlPlane,omitempty"`
5781 // Management: Optional. Enables automatic Service Mesh management.
5782 //
5783 // Possible values:
5784 // "MANAGEMENT_UNSPECIFIED" - Unspecified
5785 // "MANAGEMENT_AUTOMATIC" - Google should manage my Service Mesh for the
5786 // cluster.
5787 // "MANAGEMENT_MANUAL" - User will manually configure their service mesh
5788 // components.
5789 // "MANAGEMENT_NOT_INSTALLED" - Google should remove any managed Service Mesh
5790 // components from this cluster and deprovision any resources.
5791 Management string `json:"management,omitempty"`
5792 // ForceSendFields is a list of field names (e.g. "ConfigApi") 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. "ConfigApi") 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 ServiceMeshMembershipSpec) MarshalJSON() ([]byte, error) {
5806 type NoMethod ServiceMeshMembershipSpec
5807 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5808 }
5809
5810 // ServiceMeshMembershipState: **Service Mesh**: State for a single Membership,
5811 // as analyzed by the Service Mesh Hub Controller.
5812 type ServiceMeshMembershipState struct {
5813 // Conditions: Output only. List of conditions reported for this membership.
5814 Conditions []*ServiceMeshCondition `json:"conditions,omitempty"`
5815 // ControlPlaneManagement: Output only. Status of control plane management
5816 ControlPlaneManagement *ServiceMeshControlPlaneManagement `json:"controlPlaneManagement,omitempty"`
5817 // DataPlaneManagement: Output only. Status of data plane management.
5818 DataPlaneManagement *ServiceMeshDataPlaneManagement `json:"dataPlaneManagement,omitempty"`
5819 // ForceSendFields is a list of field names (e.g. "Conditions") to
5820 // unconditionally include in API requests. By default, fields with empty or
5821 // default values are omitted from API requests. See
5822 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5823 // details.
5824 ForceSendFields []string `json:"-"`
5825 // NullFields is a list of field names (e.g. "Conditions") to include in API
5826 // requests with the JSON null value. By default, fields with empty values are
5827 // omitted from API requests. See
5828 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5829 NullFields []string `json:"-"`
5830 }
5831
5832 func (s ServiceMeshMembershipState) MarshalJSON() ([]byte, error) {
5833 type NoMethod ServiceMeshMembershipState
5834 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5835 }
5836
5837 // ServiceMeshStatusDetails: Structured and human-readable details for a
5838 // status.
5839 type ServiceMeshStatusDetails struct {
5840 // Code: A machine-readable code that further describes a broad status.
5841 Code string `json:"code,omitempty"`
5842 // Details: Human-readable explanation of code.
5843 Details string `json:"details,omitempty"`
5844 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
5845 // include in API requests. By default, fields with empty or default values are
5846 // omitted from API requests. See
5847 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5848 // details.
5849 ForceSendFields []string `json:"-"`
5850 // NullFields is a list of field names (e.g. "Code") to include in API requests
5851 // with the JSON null value. By default, fields with empty values are omitted
5852 // from API requests. See
5853 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5854 NullFields []string `json:"-"`
5855 }
5856
5857 func (s ServiceMeshStatusDetails) MarshalJSON() ([]byte, error) {
5858 type NoMethod ServiceMeshStatusDetails
5859 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5860 }
5861
5862 // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
5863 type SetIamPolicyRequest struct {
5864 // Policy: REQUIRED: The complete policy to be applied to the `resource`. The
5865 // size of the policy is limited to a few 10s of KB. An empty policy is a valid
5866 // policy but certain Google Cloud services (such as Projects) might reject
5867 // them.
5868 Policy *Policy `json:"policy,omitempty"`
5869 // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
5870 // modify. Only the fields in the mask will be modified. If no mask is
5871 // provided, the following default mask is used: `paths: "bindings, etag"
5872 UpdateMask string `json:"updateMask,omitempty"`
5873 // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
5874 // include in API requests. By default, fields with empty or default values are
5875 // omitted from API requests. See
5876 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5877 // details.
5878 ForceSendFields []string `json:"-"`
5879 // NullFields is a list of field names (e.g. "Policy") to include in API
5880 // requests with the JSON null value. By default, fields with empty values are
5881 // omitted from API requests. See
5882 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5883 NullFields []string `json:"-"`
5884 }
5885
5886 func (s SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
5887 type NoMethod SetIamPolicyRequest
5888 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5889 }
5890
5891 // Status: Status specifies state for the subcomponent.
5892 type Status struct {
5893 // Code: Code specifies AppDevExperienceFeature's subcomponent ready state.
5894 //
5895 // Possible values:
5896 // "CODE_UNSPECIFIED" - Not set.
5897 // "OK" - AppDevExperienceFeature's specified subcomponent is ready.
5898 // "FAILED" - AppDevExperienceFeature's specified subcomponent ready state is
5899 // false. This means AppDevExperienceFeature has encountered an issue that
5900 // blocks all, or a portion, of its normal operation. See the `description` for
5901 // more details.
5902 // "UNKNOWN" - AppDevExperienceFeature's specified subcomponent has a pending
5903 // or unknown state.
5904 Code string `json:"code,omitempty"`
5905 // Description: Description is populated if Code is Failed, explaining why it
5906 // has failed.
5907 Description string `json:"description,omitempty"`
5908 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
5909 // include in API requests. By default, fields with empty or default values are
5910 // omitted from API requests. See
5911 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5912 // details.
5913 ForceSendFields []string `json:"-"`
5914 // NullFields is a list of field names (e.g. "Code") to include in API requests
5915 // with the JSON null value. By default, fields with empty values are omitted
5916 // from API requests. See
5917 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5918 NullFields []string `json:"-"`
5919 }
5920
5921 func (s Status) MarshalJSON() ([]byte, error) {
5922 type NoMethod Status
5923 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5924 }
5925
5926 // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
5927 type TestIamPermissionsRequest struct {
5928 // Permissions: The set of permissions to check for the `resource`. Permissions
5929 // with wildcards (such as `*` or `storage.*`) are not allowed. For more
5930 // information see IAM Overview
5931 // (https://cloud.google.com/iam/docs/overview#permissions).
5932 Permissions []string `json:"permissions,omitempty"`
5933 // ForceSendFields is a list of field names (e.g. "Permissions") to
5934 // unconditionally include in API requests. By default, fields with empty or
5935 // default values are omitted from API requests. See
5936 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5937 // details.
5938 ForceSendFields []string `json:"-"`
5939 // NullFields is a list of field names (e.g. "Permissions") to include in API
5940 // requests with the JSON null value. By default, fields with empty values are
5941 // omitted from API requests. See
5942 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5943 NullFields []string `json:"-"`
5944 }
5945
5946 func (s TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
5947 type NoMethod TestIamPermissionsRequest
5948 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5949 }
5950
5951 // TestIamPermissionsResponse: Response message for `TestIamPermissions`
5952 // method.
5953 type TestIamPermissionsResponse struct {
5954 // Permissions: A subset of `TestPermissionsRequest.permissions` that the
5955 // caller is allowed.
5956 Permissions []string `json:"permissions,omitempty"`
5957
5958 // ServerResponse contains the HTTP response code and headers from the server.
5959 googleapi.ServerResponse `json:"-"`
5960 // ForceSendFields is a list of field names (e.g. "Permissions") to
5961 // unconditionally include in API requests. By default, fields with empty or
5962 // default values are omitted from API requests. See
5963 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5964 // details.
5965 ForceSendFields []string `json:"-"`
5966 // NullFields is a list of field names (e.g. "Permissions") to include in API
5967 // requests with the JSON null value. By default, fields with empty values are
5968 // omitted from API requests. See
5969 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5970 NullFields []string `json:"-"`
5971 }
5972
5973 func (s TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
5974 type NoMethod TestIamPermissionsResponse
5975 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
5976 }
5977
5978 // TypeMeta: TypeMeta is the type information needed for content unmarshalling
5979 // of Kubernetes resources in the manifest.
5980 type TypeMeta struct {
5981 // ApiVersion: APIVersion of the resource (e.g. v1).
5982 ApiVersion string `json:"apiVersion,omitempty"`
5983 // Kind: Kind of the resource (e.g. Deployment).
5984 Kind string `json:"kind,omitempty"`
5985 // ForceSendFields is a list of field names (e.g. "ApiVersion") to
5986 // unconditionally include in API requests. By default, fields with empty or
5987 // default values are omitted from API requests. See
5988 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
5989 // details.
5990 ForceSendFields []string `json:"-"`
5991 // NullFields is a list of field names (e.g. "ApiVersion") to include in API
5992 // requests with the JSON null value. By default, fields with empty values are
5993 // omitted from API requests. See
5994 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
5995 NullFields []string `json:"-"`
5996 }
5997
5998 func (s TypeMeta) MarshalJSON() ([]byte, error) {
5999 type NoMethod TypeMeta
6000 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6001 }
6002
6003 // WorkloadIdentityFeatureSpec: **WorkloadIdentity**: Global feature
6004 // specification.
6005 type WorkloadIdentityFeatureSpec struct {
6006 // ScopeTenancyPool: Pool to be used for Workload Identity. This pool in
6007 // trust-domain mode is used with Fleet Tenancy, so that sameness can be
6008 // enforced. ex:
6009 // projects/example/locations/global/workloadidentitypools/custompool
6010 ScopeTenancyPool string `json:"scopeTenancyPool,omitempty"`
6011 // ForceSendFields is a list of field names (e.g. "ScopeTenancyPool") to
6012 // unconditionally include in API requests. By default, fields with empty or
6013 // default values are omitted from API requests. See
6014 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6015 // details.
6016 ForceSendFields []string `json:"-"`
6017 // NullFields is a list of field names (e.g. "ScopeTenancyPool") to include in
6018 // API requests with the JSON null value. By default, fields with empty values
6019 // are omitted from API requests. See
6020 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6021 NullFields []string `json:"-"`
6022 }
6023
6024 func (s WorkloadIdentityFeatureSpec) MarshalJSON() ([]byte, error) {
6025 type NoMethod WorkloadIdentityFeatureSpec
6026 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6027 }
6028
6029 // WorkloadIdentityFeatureState: **WorkloadIdentity**: Global feature state.
6030 type WorkloadIdentityFeatureState struct {
6031 // NamespaceStateDetails: The state of the IAM namespaces for the fleet.
6032 NamespaceStateDetails map[string]WorkloadIdentityNamespaceStateDetail `json:"namespaceStateDetails,omitempty"`
6033 // NamespaceStates: Deprecated, this field will be erased after code is changed
6034 // to use the new field.
6035 NamespaceStates map[string]string `json:"namespaceStates,omitempty"`
6036 // ScopeTenancyWorkloadIdentityPool: The full name of the scope-tenancy pool
6037 // for the fleet.
6038 ScopeTenancyWorkloadIdentityPool string `json:"scopeTenancyWorkloadIdentityPool,omitempty"`
6039 // WorkloadIdentityPool: The full name of the svc.id.goog pool for the fleet.
6040 WorkloadIdentityPool string `json:"workloadIdentityPool,omitempty"`
6041 // WorkloadIdentityPoolStateDetails: The state of the Workload Identity Pools
6042 // for the fleet.
6043 WorkloadIdentityPoolStateDetails map[string]WorkloadIdentityWorkloadIdentityPoolStateDetail `json:"workloadIdentityPoolStateDetails,omitempty"`
6044 // ForceSendFields is a list of field names (e.g. "NamespaceStateDetails") to
6045 // unconditionally include in API requests. By default, fields with empty or
6046 // default values are omitted from API requests. See
6047 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6048 // details.
6049 ForceSendFields []string `json:"-"`
6050 // NullFields is a list of field names (e.g. "NamespaceStateDetails") to
6051 // include in API requests with the JSON null value. By default, fields with
6052 // empty values are omitted from API requests. See
6053 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6054 NullFields []string `json:"-"`
6055 }
6056
6057 func (s WorkloadIdentityFeatureState) MarshalJSON() ([]byte, error) {
6058 type NoMethod WorkloadIdentityFeatureState
6059 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6060 }
6061
6062 // WorkloadIdentityIdentityProviderStateDetail: IdentityProviderStateDetail
6063 // represents the state of an Identity Provider.
6064 type WorkloadIdentityIdentityProviderStateDetail struct {
6065 // Code: The state of the Identity Provider.
6066 //
6067 // Possible values:
6068 // "IDENTITY_PROVIDER_STATE_UNSPECIFIED" - Unknown state.
6069 // "IDENTITY_PROVIDER_STATE_OK" - The Identity Provider was created/updated
6070 // successfully.
6071 // "IDENTITY_PROVIDER_STATE_ERROR" - The Identity Provider was not
6072 // created/updated successfully. The error message is in the description field.
6073 Code string `json:"code,omitempty"`
6074 // Description: A human-readable description of the current state or returned
6075 // error.
6076 Description string `json:"description,omitempty"`
6077 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
6078 // include in API requests. By default, fields with empty or default values are
6079 // omitted from API requests. See
6080 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6081 // details.
6082 ForceSendFields []string `json:"-"`
6083 // NullFields is a list of field names (e.g. "Code") to include in API requests
6084 // with the JSON null value. By default, fields with empty values are omitted
6085 // from API requests. See
6086 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6087 NullFields []string `json:"-"`
6088 }
6089
6090 func (s WorkloadIdentityIdentityProviderStateDetail) MarshalJSON() ([]byte, error) {
6091 type NoMethod WorkloadIdentityIdentityProviderStateDetail
6092 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6093 }
6094
6095 // WorkloadIdentityMembershipState: **WorkloadIdentity**: The
6096 // membership-specific state for WorkloadIdentity feature.
6097 type WorkloadIdentityMembershipState struct {
6098 // Description: Deprecated, this field will be erased after code is changed to
6099 // use the new field.
6100 Description string `json:"description,omitempty"`
6101 // IdentityProviderStateDetails: The state of the Identity Providers
6102 // corresponding to the membership.
6103 IdentityProviderStateDetails map[string]WorkloadIdentityIdentityProviderStateDetail `json:"identityProviderStateDetails,omitempty"`
6104 // ForceSendFields is a list of field names (e.g. "Description") to
6105 // unconditionally include in API requests. By default, fields with empty or
6106 // default values are omitted from API requests. See
6107 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6108 // details.
6109 ForceSendFields []string `json:"-"`
6110 // NullFields is a list of field names (e.g. "Description") to include in API
6111 // requests with the JSON null value. By default, fields with empty values are
6112 // omitted from API requests. See
6113 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6114 NullFields []string `json:"-"`
6115 }
6116
6117 func (s WorkloadIdentityMembershipState) MarshalJSON() ([]byte, error) {
6118 type NoMethod WorkloadIdentityMembershipState
6119 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6120 }
6121
6122 // WorkloadIdentityNamespaceStateDetail: NamespaceStateDetail represents the
6123 // state of a IAM namespace.
6124 type WorkloadIdentityNamespaceStateDetail struct {
6125 // Code: The state of the IAM namespace.
6126 //
6127 // Possible values:
6128 // "NAMESPACE_STATE_UNSPECIFIED" - Unknown state.
6129 // "NAMESPACE_STATE_OK" - The Namespace was created/updated successfully.
6130 // "NAMESPACE_STATE_ERROR" - The Namespace was not created/updated
6131 // successfully. The error message is in the description field.
6132 Code string `json:"code,omitempty"`
6133 // Description: A human-readable description of the current state or returned
6134 // error.
6135 Description string `json:"description,omitempty"`
6136 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
6137 // include in API requests. By default, fields with empty or default values are
6138 // omitted from API requests. See
6139 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6140 // details.
6141 ForceSendFields []string `json:"-"`
6142 // NullFields is a list of field names (e.g. "Code") to include in API requests
6143 // with the JSON null value. By default, fields with empty values are omitted
6144 // from API requests. See
6145 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6146 NullFields []string `json:"-"`
6147 }
6148
6149 func (s WorkloadIdentityNamespaceStateDetail) MarshalJSON() ([]byte, error) {
6150 type NoMethod WorkloadIdentityNamespaceStateDetail
6151 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6152 }
6153
6154 // WorkloadIdentityWorkloadIdentityPoolStateDetail:
6155 // WorkloadIdentityPoolStateDetail represents the state of the Workload
6156 // Identity Pools for the fleet.
6157 type WorkloadIdentityWorkloadIdentityPoolStateDetail struct {
6158 // Code: The state of the Workload Identity Pool.
6159 //
6160 // Possible values:
6161 // "WORKLOAD_IDENTITY_POOL_STATE_UNSPECIFIED" - Unknown state.
6162 // "WORKLOAD_IDENTITY_POOL_STATE_OK" - The Workload Identity Pool was
6163 // created/updated successfully.
6164 // "WORKLOAD_IDENTITY_POOL_STATE_ERROR" - The Workload Identity Pool was not
6165 // created/updated successfully. The error message is in the description field.
6166 Code string `json:"code,omitempty"`
6167 // Description: A human-readable description of the current state or returned
6168 // error.
6169 Description string `json:"description,omitempty"`
6170 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
6171 // include in API requests. By default, fields with empty or default values are
6172 // omitted from API requests. See
6173 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
6174 // details.
6175 ForceSendFields []string `json:"-"`
6176 // NullFields is a list of field names (e.g. "Code") to include in API requests
6177 // with the JSON null value. By default, fields with empty values are omitted
6178 // from API requests. See
6179 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
6180 NullFields []string `json:"-"`
6181 }
6182
6183 func (s WorkloadIdentityWorkloadIdentityPoolStateDetail) MarshalJSON() ([]byte, error) {
6184 type NoMethod WorkloadIdentityWorkloadIdentityPoolStateDetail
6185 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
6186 }
6187
6188 type OrganizationsLocationsFleetsListCall struct {
6189 s *Service
6190 parent string
6191 urlParams_ gensupport.URLParams
6192 ifNoneMatch_ string
6193 ctx_ context.Context
6194 header_ http.Header
6195 }
6196
6197 // List: Returns all fleets within an organization or a project that the caller
6198 // has access to.
6199 //
6200 // - parent: The organization or project to list for Fleets under, in the
6201 // format `organizations/*/locations/*` or `projects/*/locations/*`.
6202 func (r *OrganizationsLocationsFleetsService) List(parent string) *OrganizationsLocationsFleetsListCall {
6203 c := &OrganizationsLocationsFleetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6204 c.parent = parent
6205 return c
6206 }
6207
6208 // PageSize sets the optional parameter "pageSize": The maximum number of
6209 // fleets to return. The service may return fewer than this value. If
6210 // unspecified, at most 200 fleets will be returned. The maximum value is 1000;
6211 // values above 1000 will be coerced to 1000.
6212 func (c *OrganizationsLocationsFleetsListCall) PageSize(pageSize int64) *OrganizationsLocationsFleetsListCall {
6213 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6214 return c
6215 }
6216
6217 // PageToken sets the optional parameter "pageToken": A page token, received
6218 // from a previous `ListFleets` call. Provide this to retrieve the subsequent
6219 // page. When paginating, all other parameters provided to `ListFleets` must
6220 // match the call that provided the page token.
6221 func (c *OrganizationsLocationsFleetsListCall) PageToken(pageToken string) *OrganizationsLocationsFleetsListCall {
6222 c.urlParams_.Set("pageToken", pageToken)
6223 return c
6224 }
6225
6226 // Fields allows partial responses to be retrieved. See
6227 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6228 // details.
6229 func (c *OrganizationsLocationsFleetsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsFleetsListCall {
6230 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6231 return c
6232 }
6233
6234 // IfNoneMatch sets an optional parameter which makes the operation fail if the
6235 // object's ETag matches the given value. This is useful for getting updates
6236 // only after the object has changed since the last request.
6237 func (c *OrganizationsLocationsFleetsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsFleetsListCall {
6238 c.ifNoneMatch_ = entityTag
6239 return c
6240 }
6241
6242 // Context sets the context to be used in this call's Do method.
6243 func (c *OrganizationsLocationsFleetsListCall) Context(ctx context.Context) *OrganizationsLocationsFleetsListCall {
6244 c.ctx_ = ctx
6245 return c
6246 }
6247
6248 // Header returns a http.Header that can be modified by the caller to add
6249 // headers to the request.
6250 func (c *OrganizationsLocationsFleetsListCall) Header() http.Header {
6251 if c.header_ == nil {
6252 c.header_ = make(http.Header)
6253 }
6254 return c.header_
6255 }
6256
6257 func (c *OrganizationsLocationsFleetsListCall) doRequest(alt string) (*http.Response, error) {
6258 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6259 if c.ifNoneMatch_ != "" {
6260 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6261 }
6262 c.urlParams_.Set("alt", alt)
6263 c.urlParams_.Set("prettyPrint", "false")
6264 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fleets")
6265 urls += "?" + c.urlParams_.Encode()
6266 req, err := http.NewRequest("GET", urls, nil)
6267 if err != nil {
6268 return nil, err
6269 }
6270 req.Header = reqHeaders
6271 googleapi.Expand(req.URL, map[string]string{
6272 "parent": c.parent,
6273 })
6274 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.organizations.locations.fleets.list", "request", internallog.HTTPRequest(req, nil))
6275 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6276 }
6277
6278 // Do executes the "gkehub.organizations.locations.fleets.list" call.
6279 // Any non-2xx status code is an error. Response headers are in either
6280 // *ListFleetsResponse.ServerResponse.Header or (if a response was returned at
6281 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6282 // check whether the returned error was because http.StatusNotModified was
6283 // returned.
6284 func (c *OrganizationsLocationsFleetsListCall) Do(opts ...googleapi.CallOption) (*ListFleetsResponse, error) {
6285 gensupport.SetOptions(c.urlParams_, opts...)
6286 res, err := c.doRequest("json")
6287 if res != nil && res.StatusCode == http.StatusNotModified {
6288 if res.Body != nil {
6289 res.Body.Close()
6290 }
6291 return nil, gensupport.WrapError(&googleapi.Error{
6292 Code: res.StatusCode,
6293 Header: res.Header,
6294 })
6295 }
6296 if err != nil {
6297 return nil, err
6298 }
6299 defer googleapi.CloseBody(res)
6300 if err := googleapi.CheckResponse(res); err != nil {
6301 return nil, gensupport.WrapError(err)
6302 }
6303 ret := &ListFleetsResponse{
6304 ServerResponse: googleapi.ServerResponse{
6305 Header: res.Header,
6306 HTTPStatusCode: res.StatusCode,
6307 },
6308 }
6309 target := &ret
6310 b, err := gensupport.DecodeResponseBytes(target, res)
6311 if err != nil {
6312 return nil, err
6313 }
6314 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.organizations.locations.fleets.list", "response", internallog.HTTPResponse(res, b))
6315 return ret, nil
6316 }
6317
6318 // Pages invokes f for each page of results.
6319 // A non-nil error returned from f will halt the iteration.
6320 // The provided context supersedes any context provided to the Context method.
6321 func (c *OrganizationsLocationsFleetsListCall) Pages(ctx context.Context, f func(*ListFleetsResponse) error) error {
6322 c.ctx_ = ctx
6323 defer c.PageToken(c.urlParams_.Get("pageToken"))
6324 for {
6325 x, err := c.Do()
6326 if err != nil {
6327 return err
6328 }
6329 if err := f(x); err != nil {
6330 return err
6331 }
6332 if x.NextPageToken == "" {
6333 return nil
6334 }
6335 c.PageToken(x.NextPageToken)
6336 }
6337 }
6338
6339 type ProjectsLocationsGetCall struct {
6340 s *Service
6341 name string
6342 urlParams_ gensupport.URLParams
6343 ifNoneMatch_ string
6344 ctx_ context.Context
6345 header_ http.Header
6346 }
6347
6348 // Get: Gets information about a location.
6349 //
6350 // - name: Resource name for the location.
6351 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
6352 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6353 c.name = name
6354 return c
6355 }
6356
6357 // Fields allows partial responses to be retrieved. See
6358 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6359 // details.
6360 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
6361 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6362 return c
6363 }
6364
6365 // IfNoneMatch sets an optional parameter which makes the operation fail if the
6366 // object's ETag matches the given value. This is useful for getting updates
6367 // only after the object has changed since the last request.
6368 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
6369 c.ifNoneMatch_ = entityTag
6370 return c
6371 }
6372
6373 // Context sets the context to be used in this call's Do method.
6374 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
6375 c.ctx_ = ctx
6376 return c
6377 }
6378
6379 // Header returns a http.Header that can be modified by the caller to add
6380 // headers to the request.
6381 func (c *ProjectsLocationsGetCall) Header() http.Header {
6382 if c.header_ == nil {
6383 c.header_ = make(http.Header)
6384 }
6385 return c.header_
6386 }
6387
6388 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
6389 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6390 if c.ifNoneMatch_ != "" {
6391 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6392 }
6393 c.urlParams_.Set("alt", alt)
6394 c.urlParams_.Set("prettyPrint", "false")
6395 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6396 urls += "?" + c.urlParams_.Encode()
6397 req, err := http.NewRequest("GET", urls, nil)
6398 if err != nil {
6399 return nil, err
6400 }
6401 req.Header = reqHeaders
6402 googleapi.Expand(req.URL, map[string]string{
6403 "name": c.name,
6404 })
6405 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.get", "request", internallog.HTTPRequest(req, nil))
6406 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6407 }
6408
6409 // Do executes the "gkehub.projects.locations.get" call.
6410 // Any non-2xx status code is an error. Response headers are in either
6411 // *Location.ServerResponse.Header or (if a response was returned at all) in
6412 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6413 // whether the returned error was because http.StatusNotModified was returned.
6414 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
6415 gensupport.SetOptions(c.urlParams_, opts...)
6416 res, err := c.doRequest("json")
6417 if res != nil && res.StatusCode == http.StatusNotModified {
6418 if res.Body != nil {
6419 res.Body.Close()
6420 }
6421 return nil, gensupport.WrapError(&googleapi.Error{
6422 Code: res.StatusCode,
6423 Header: res.Header,
6424 })
6425 }
6426 if err != nil {
6427 return nil, err
6428 }
6429 defer googleapi.CloseBody(res)
6430 if err := googleapi.CheckResponse(res); err != nil {
6431 return nil, gensupport.WrapError(err)
6432 }
6433 ret := &Location{
6434 ServerResponse: googleapi.ServerResponse{
6435 Header: res.Header,
6436 HTTPStatusCode: res.StatusCode,
6437 },
6438 }
6439 target := &ret
6440 b, err := gensupport.DecodeResponseBytes(target, res)
6441 if err != nil {
6442 return nil, err
6443 }
6444 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.get", "response", internallog.HTTPResponse(res, b))
6445 return ret, nil
6446 }
6447
6448 type ProjectsLocationsListCall struct {
6449 s *Service
6450 name string
6451 urlParams_ gensupport.URLParams
6452 ifNoneMatch_ string
6453 ctx_ context.Context
6454 header_ http.Header
6455 }
6456
6457 // List: Lists information about the supported locations for this service. This
6458 // method lists locations based on the resource scope provided in the
6459 // [ListLocationsRequest.name] field: * **Global locations**: If `name` is
6460 // empty, the method lists the public locations available to all projects. *
6461 // **Project-specific locations**: If `name` follows the format
6462 // `projects/{project}`, the method lists locations visible to that specific
6463 // project. This includes public, private, or other project-specific locations
6464 // enabled for the project. For gRPC and client library implementations, the
6465 // resource name is passed as the `name` field. For direct service calls, the
6466 // resource name is incorporated into the request path based on the specific
6467 // service implementation and version.
6468 //
6469 // - name: The resource that owns the locations collection, if applicable.
6470 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
6471 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6472 c.name = name
6473 return c
6474 }
6475
6476 // ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not
6477 // use this field. It is unsupported and is ignored unless explicitly
6478 // documented otherwise. This is primarily for internal usage.
6479 func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall {
6480 c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...))
6481 return c
6482 }
6483
6484 // Filter sets the optional parameter "filter": A filter to narrow down results
6485 // to a preferred subset. The filtering language accepts strings like
6486 // "displayName=tokyo", and is documented in more detail in AIP-160
6487 // (https://google.aip.dev/160).
6488 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
6489 c.urlParams_.Set("filter", filter)
6490 return c
6491 }
6492
6493 // PageSize sets the optional parameter "pageSize": The maximum number of
6494 // results to return. If not set, the service selects a default.
6495 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
6496 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6497 return c
6498 }
6499
6500 // PageToken sets the optional parameter "pageToken": A page token received
6501 // from the `next_page_token` field in the response. Send that page token to
6502 // receive the subsequent page.
6503 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
6504 c.urlParams_.Set("pageToken", pageToken)
6505 return c
6506 }
6507
6508 // Fields allows partial responses to be retrieved. See
6509 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6510 // details.
6511 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
6512 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6513 return c
6514 }
6515
6516 // IfNoneMatch sets an optional parameter which makes the operation fail if the
6517 // object's ETag matches the given value. This is useful for getting updates
6518 // only after the object has changed since the last request.
6519 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
6520 c.ifNoneMatch_ = entityTag
6521 return c
6522 }
6523
6524 // Context sets the context to be used in this call's Do method.
6525 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
6526 c.ctx_ = ctx
6527 return c
6528 }
6529
6530 // Header returns a http.Header that can be modified by the caller to add
6531 // headers to the request.
6532 func (c *ProjectsLocationsListCall) Header() http.Header {
6533 if c.header_ == nil {
6534 c.header_ = make(http.Header)
6535 }
6536 return c.header_
6537 }
6538
6539 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
6540 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6541 if c.ifNoneMatch_ != "" {
6542 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6543 }
6544 c.urlParams_.Set("alt", alt)
6545 c.urlParams_.Set("prettyPrint", "false")
6546 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
6547 urls += "?" + c.urlParams_.Encode()
6548 req, err := http.NewRequest("GET", urls, nil)
6549 if err != nil {
6550 return nil, err
6551 }
6552 req.Header = reqHeaders
6553 googleapi.Expand(req.URL, map[string]string{
6554 "name": c.name,
6555 })
6556 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.list", "request", internallog.HTTPRequest(req, nil))
6557 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6558 }
6559
6560 // Do executes the "gkehub.projects.locations.list" call.
6561 // Any non-2xx status code is an error. Response headers are in either
6562 // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
6563 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6564 // check whether the returned error was because http.StatusNotModified was
6565 // returned.
6566 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
6567 gensupport.SetOptions(c.urlParams_, opts...)
6568 res, err := c.doRequest("json")
6569 if res != nil && res.StatusCode == http.StatusNotModified {
6570 if res.Body != nil {
6571 res.Body.Close()
6572 }
6573 return nil, gensupport.WrapError(&googleapi.Error{
6574 Code: res.StatusCode,
6575 Header: res.Header,
6576 })
6577 }
6578 if err != nil {
6579 return nil, err
6580 }
6581 defer googleapi.CloseBody(res)
6582 if err := googleapi.CheckResponse(res); err != nil {
6583 return nil, gensupport.WrapError(err)
6584 }
6585 ret := &ListLocationsResponse{
6586 ServerResponse: googleapi.ServerResponse{
6587 Header: res.Header,
6588 HTTPStatusCode: res.StatusCode,
6589 },
6590 }
6591 target := &ret
6592 b, err := gensupport.DecodeResponseBytes(target, res)
6593 if err != nil {
6594 return nil, err
6595 }
6596 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.list", "response", internallog.HTTPResponse(res, b))
6597 return ret, nil
6598 }
6599
6600 // Pages invokes f for each page of results.
6601 // A non-nil error returned from f will halt the iteration.
6602 // The provided context supersedes any context provided to the Context method.
6603 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
6604 c.ctx_ = ctx
6605 defer c.PageToken(c.urlParams_.Get("pageToken"))
6606 for {
6607 x, err := c.Do()
6608 if err != nil {
6609 return err
6610 }
6611 if err := f(x); err != nil {
6612 return err
6613 }
6614 if x.NextPageToken == "" {
6615 return nil
6616 }
6617 c.PageToken(x.NextPageToken)
6618 }
6619 }
6620
6621 type ProjectsLocationsFeaturesCreateCall struct {
6622 s *Service
6623 parent string
6624 feature *Feature
6625 urlParams_ gensupport.URLParams
6626 ctx_ context.Context
6627 header_ http.Header
6628 }
6629
6630 // Create: Adds a new Feature.
6631 //
6632 // - parent: The parent (project and location) where the Feature will be
6633 // created. Specified in the format `projects/*/locations/*`.
6634 func (r *ProjectsLocationsFeaturesService) Create(parent string, feature *Feature) *ProjectsLocationsFeaturesCreateCall {
6635 c := &ProjectsLocationsFeaturesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6636 c.parent = parent
6637 c.feature = feature
6638 return c
6639 }
6640
6641 // FeatureId sets the optional parameter "featureId": The ID of the feature to
6642 // create.
6643 func (c *ProjectsLocationsFeaturesCreateCall) FeatureId(featureId string) *ProjectsLocationsFeaturesCreateCall {
6644 c.urlParams_.Set("featureId", featureId)
6645 return c
6646 }
6647
6648 // RequestId sets the optional parameter "requestId": A request ID to identify
6649 // requests. Specify a unique request ID so that if you must retry your
6650 // request, the server will know to ignore the request if it has already been
6651 // completed. The server will guarantee that for at least 60 minutes after the
6652 // first request. For example, consider a situation where you make an initial
6653 // request and the request times out. If you make the request again with the
6654 // same request ID, the server can check if original operation with the same
6655 // request ID was received, and if so, will ignore the second request. This
6656 // prevents clients from accidentally creating duplicate commitments. The
6657 // request ID must be a valid UUID with the exception that zero UUID is not
6658 // supported (00000000-0000-0000-0000-000000000000).
6659 func (c *ProjectsLocationsFeaturesCreateCall) RequestId(requestId string) *ProjectsLocationsFeaturesCreateCall {
6660 c.urlParams_.Set("requestId", requestId)
6661 return c
6662 }
6663
6664 // Fields allows partial responses to be retrieved. See
6665 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6666 // details.
6667 func (c *ProjectsLocationsFeaturesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesCreateCall {
6668 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6669 return c
6670 }
6671
6672 // Context sets the context to be used in this call's Do method.
6673 func (c *ProjectsLocationsFeaturesCreateCall) Context(ctx context.Context) *ProjectsLocationsFeaturesCreateCall {
6674 c.ctx_ = ctx
6675 return c
6676 }
6677
6678 // Header returns a http.Header that can be modified by the caller to add
6679 // headers to the request.
6680 func (c *ProjectsLocationsFeaturesCreateCall) Header() http.Header {
6681 if c.header_ == nil {
6682 c.header_ = make(http.Header)
6683 }
6684 return c.header_
6685 }
6686
6687 func (c *ProjectsLocationsFeaturesCreateCall) doRequest(alt string) (*http.Response, error) {
6688 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6689 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.feature)
6690 if err != nil {
6691 return nil, err
6692 }
6693 c.urlParams_.Set("alt", alt)
6694 c.urlParams_.Set("prettyPrint", "false")
6695 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features")
6696 urls += "?" + c.urlParams_.Encode()
6697 req, err := http.NewRequest("POST", urls, body)
6698 if err != nil {
6699 return nil, err
6700 }
6701 req.Header = reqHeaders
6702 googleapi.Expand(req.URL, map[string]string{
6703 "parent": c.parent,
6704 })
6705 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.create", "request", internallog.HTTPRequest(req, body.Bytes()))
6706 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6707 }
6708
6709 // Do executes the "gkehub.projects.locations.features.create" call.
6710 // Any non-2xx status code is an error. Response headers are in either
6711 // *Operation.ServerResponse.Header or (if a response was returned at all) in
6712 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6713 // whether the returned error was because http.StatusNotModified was returned.
6714 func (c *ProjectsLocationsFeaturesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6715 gensupport.SetOptions(c.urlParams_, opts...)
6716 res, err := c.doRequest("json")
6717 if res != nil && res.StatusCode == http.StatusNotModified {
6718 if res.Body != nil {
6719 res.Body.Close()
6720 }
6721 return nil, gensupport.WrapError(&googleapi.Error{
6722 Code: res.StatusCode,
6723 Header: res.Header,
6724 })
6725 }
6726 if err != nil {
6727 return nil, err
6728 }
6729 defer googleapi.CloseBody(res)
6730 if err := googleapi.CheckResponse(res); err != nil {
6731 return nil, gensupport.WrapError(err)
6732 }
6733 ret := &Operation{
6734 ServerResponse: googleapi.ServerResponse{
6735 Header: res.Header,
6736 HTTPStatusCode: res.StatusCode,
6737 },
6738 }
6739 target := &ret
6740 b, err := gensupport.DecodeResponseBytes(target, res)
6741 if err != nil {
6742 return nil, err
6743 }
6744 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.create", "response", internallog.HTTPResponse(res, b))
6745 return ret, nil
6746 }
6747
6748 type ProjectsLocationsFeaturesDeleteCall struct {
6749 s *Service
6750 name string
6751 urlParams_ gensupport.URLParams
6752 ctx_ context.Context
6753 header_ http.Header
6754 }
6755
6756 // Delete: Removes a Feature.
6757 //
6758 // - name: The Feature resource name in the format
6759 // `projects/*/locations/*/features/*`.
6760 func (r *ProjectsLocationsFeaturesService) Delete(name string) *ProjectsLocationsFeaturesDeleteCall {
6761 c := &ProjectsLocationsFeaturesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6762 c.name = name
6763 return c
6764 }
6765
6766 // Force sets the optional parameter "force": If set to true, the delete will
6767 // ignore any outstanding resources for this Feature (that is,
6768 // `FeatureState.has_resources` is set to true). These resources will NOT be
6769 // cleaned up or modified in any way.
6770 func (c *ProjectsLocationsFeaturesDeleteCall) Force(force bool) *ProjectsLocationsFeaturesDeleteCall {
6771 c.urlParams_.Set("force", fmt.Sprint(force))
6772 return c
6773 }
6774
6775 // RequestId sets the optional parameter "requestId": A request ID to identify
6776 // requests. Specify a unique request ID so that if you must retry your
6777 // request, the server will know to ignore the request if it has already been
6778 // completed. The server will guarantee that for at least 60 minutes after the
6779 // first request. For example, consider a situation where you make an initial
6780 // request and the request times out. If you make the request again with the
6781 // same request ID, the server can check if original operation with the same
6782 // request ID was received, and if so, will ignore the second request. This
6783 // prevents clients from accidentally creating duplicate commitments. The
6784 // request ID must be a valid UUID with the exception that zero UUID is not
6785 // supported (00000000-0000-0000-0000-000000000000).
6786 func (c *ProjectsLocationsFeaturesDeleteCall) RequestId(requestId string) *ProjectsLocationsFeaturesDeleteCall {
6787 c.urlParams_.Set("requestId", requestId)
6788 return c
6789 }
6790
6791 // Fields allows partial responses to be retrieved. See
6792 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6793 // details.
6794 func (c *ProjectsLocationsFeaturesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesDeleteCall {
6795 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6796 return c
6797 }
6798
6799 // Context sets the context to be used in this call's Do method.
6800 func (c *ProjectsLocationsFeaturesDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturesDeleteCall {
6801 c.ctx_ = ctx
6802 return c
6803 }
6804
6805 // Header returns a http.Header that can be modified by the caller to add
6806 // headers to the request.
6807 func (c *ProjectsLocationsFeaturesDeleteCall) Header() http.Header {
6808 if c.header_ == nil {
6809 c.header_ = make(http.Header)
6810 }
6811 return c.header_
6812 }
6813
6814 func (c *ProjectsLocationsFeaturesDeleteCall) doRequest(alt string) (*http.Response, error) {
6815 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6816 c.urlParams_.Set("alt", alt)
6817 c.urlParams_.Set("prettyPrint", "false")
6818 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6819 urls += "?" + c.urlParams_.Encode()
6820 req, err := http.NewRequest("DELETE", urls, nil)
6821 if err != nil {
6822 return nil, err
6823 }
6824 req.Header = reqHeaders
6825 googleapi.Expand(req.URL, map[string]string{
6826 "name": c.name,
6827 })
6828 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.delete", "request", internallog.HTTPRequest(req, nil))
6829 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6830 }
6831
6832 // Do executes the "gkehub.projects.locations.features.delete" call.
6833 // Any non-2xx status code is an error. Response headers are in either
6834 // *Operation.ServerResponse.Header or (if a response was returned at all) in
6835 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6836 // whether the returned error was because http.StatusNotModified was returned.
6837 func (c *ProjectsLocationsFeaturesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6838 gensupport.SetOptions(c.urlParams_, opts...)
6839 res, err := c.doRequest("json")
6840 if res != nil && res.StatusCode == http.StatusNotModified {
6841 if res.Body != nil {
6842 res.Body.Close()
6843 }
6844 return nil, gensupport.WrapError(&googleapi.Error{
6845 Code: res.StatusCode,
6846 Header: res.Header,
6847 })
6848 }
6849 if err != nil {
6850 return nil, err
6851 }
6852 defer googleapi.CloseBody(res)
6853 if err := googleapi.CheckResponse(res); err != nil {
6854 return nil, gensupport.WrapError(err)
6855 }
6856 ret := &Operation{
6857 ServerResponse: googleapi.ServerResponse{
6858 Header: res.Header,
6859 HTTPStatusCode: res.StatusCode,
6860 },
6861 }
6862 target := &ret
6863 b, err := gensupport.DecodeResponseBytes(target, res)
6864 if err != nil {
6865 return nil, err
6866 }
6867 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.delete", "response", internallog.HTTPResponse(res, b))
6868 return ret, nil
6869 }
6870
6871 type ProjectsLocationsFeaturesGetCall struct {
6872 s *Service
6873 name string
6874 urlParams_ gensupport.URLParams
6875 ifNoneMatch_ string
6876 ctx_ context.Context
6877 header_ http.Header
6878 }
6879
6880 // Get: Gets details of a single Feature.
6881 //
6882 // - name: The Feature resource name in the format
6883 // `projects/*/locations/*/features/*`.
6884 func (r *ProjectsLocationsFeaturesService) Get(name string) *ProjectsLocationsFeaturesGetCall {
6885 c := &ProjectsLocationsFeaturesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6886 c.name = name
6887 return c
6888 }
6889
6890 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If
6891 // set to true, the response will return partial results when some regions are
6892 // unreachable and the unreachable field in Feature proto will be populated. If
6893 // set to false, the request will fail when some regions are unreachable.
6894 func (c *ProjectsLocationsFeaturesGetCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsFeaturesGetCall {
6895 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
6896 return c
6897 }
6898
6899 // Fields allows partial responses to be retrieved. See
6900 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6901 // details.
6902 func (c *ProjectsLocationsFeaturesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesGetCall {
6903 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6904 return c
6905 }
6906
6907 // IfNoneMatch sets an optional parameter which makes the operation fail if the
6908 // object's ETag matches the given value. This is useful for getting updates
6909 // only after the object has changed since the last request.
6910 func (c *ProjectsLocationsFeaturesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturesGetCall {
6911 c.ifNoneMatch_ = entityTag
6912 return c
6913 }
6914
6915 // Context sets the context to be used in this call's Do method.
6916 func (c *ProjectsLocationsFeaturesGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturesGetCall {
6917 c.ctx_ = ctx
6918 return c
6919 }
6920
6921 // Header returns a http.Header that can be modified by the caller to add
6922 // headers to the request.
6923 func (c *ProjectsLocationsFeaturesGetCall) Header() http.Header {
6924 if c.header_ == nil {
6925 c.header_ = make(http.Header)
6926 }
6927 return c.header_
6928 }
6929
6930 func (c *ProjectsLocationsFeaturesGetCall) doRequest(alt string) (*http.Response, error) {
6931 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6932 if c.ifNoneMatch_ != "" {
6933 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6934 }
6935 c.urlParams_.Set("alt", alt)
6936 c.urlParams_.Set("prettyPrint", "false")
6937 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6938 urls += "?" + c.urlParams_.Encode()
6939 req, err := http.NewRequest("GET", urls, nil)
6940 if err != nil {
6941 return nil, err
6942 }
6943 req.Header = reqHeaders
6944 googleapi.Expand(req.URL, map[string]string{
6945 "name": c.name,
6946 })
6947 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.get", "request", internallog.HTTPRequest(req, nil))
6948 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6949 }
6950
6951 // Do executes the "gkehub.projects.locations.features.get" call.
6952 // Any non-2xx status code is an error. Response headers are in either
6953 // *Feature.ServerResponse.Header or (if a response was returned at all) in
6954 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6955 // whether the returned error was because http.StatusNotModified was returned.
6956 func (c *ProjectsLocationsFeaturesGetCall) Do(opts ...googleapi.CallOption) (*Feature, error) {
6957 gensupport.SetOptions(c.urlParams_, opts...)
6958 res, err := c.doRequest("json")
6959 if res != nil && res.StatusCode == http.StatusNotModified {
6960 if res.Body != nil {
6961 res.Body.Close()
6962 }
6963 return nil, gensupport.WrapError(&googleapi.Error{
6964 Code: res.StatusCode,
6965 Header: res.Header,
6966 })
6967 }
6968 if err != nil {
6969 return nil, err
6970 }
6971 defer googleapi.CloseBody(res)
6972 if err := googleapi.CheckResponse(res); err != nil {
6973 return nil, gensupport.WrapError(err)
6974 }
6975 ret := &Feature{
6976 ServerResponse: googleapi.ServerResponse{
6977 Header: res.Header,
6978 HTTPStatusCode: res.StatusCode,
6979 },
6980 }
6981 target := &ret
6982 b, err := gensupport.DecodeResponseBytes(target, res)
6983 if err != nil {
6984 return nil, err
6985 }
6986 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.get", "response", internallog.HTTPResponse(res, b))
6987 return ret, nil
6988 }
6989
6990 type ProjectsLocationsFeaturesGetIamPolicyCall struct {
6991 s *Service
6992 resource string
6993 urlParams_ gensupport.URLParams
6994 ifNoneMatch_ string
6995 ctx_ context.Context
6996 header_ http.Header
6997 }
6998
6999 // GetIamPolicy: Gets the access control policy for a resource. Returns an
7000 // empty policy if the resource exists and does not have a policy set.
7001 //
7002 // - resource: REQUIRED: The resource for which the policy is being requested.
7003 // See Resource names (https://cloud.google.com/apis/design/resource_names)
7004 // for the appropriate value for this field.
7005 func (r *ProjectsLocationsFeaturesService) GetIamPolicy(resource string) *ProjectsLocationsFeaturesGetIamPolicyCall {
7006 c := &ProjectsLocationsFeaturesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7007 c.resource = resource
7008 return c
7009 }
7010
7011 // OptionsRequestedPolicyVersion sets the optional parameter
7012 // "options.requestedPolicyVersion": The maximum policy version that will be
7013 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
7014 // an invalid value will be rejected. Requests for policies with any
7015 // conditional role bindings must specify version 3. Policies with no
7016 // conditional role bindings may specify any valid value or leave the field
7017 // unset. The policy in the response might use the policy version that you
7018 // specified, or it might use a lower policy version. For example, if you
7019 // specify version 3, but the policy has no conditional role bindings, the
7020 // response uses version 1. To learn which resources support conditions in
7021 // their IAM policies, see the IAM documentation
7022 // (https://cloud.google.com/iam/help/conditions/resource-policies).
7023 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFeaturesGetIamPolicyCall {
7024 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
7025 return c
7026 }
7027
7028 // Fields allows partial responses to be retrieved. See
7029 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7030 // details.
7031 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesGetIamPolicyCall {
7032 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7033 return c
7034 }
7035
7036 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7037 // object's ETag matches the given value. This is useful for getting updates
7038 // only after the object has changed since the last request.
7039 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturesGetIamPolicyCall {
7040 c.ifNoneMatch_ = entityTag
7041 return c
7042 }
7043
7044 // Context sets the context to be used in this call's Do method.
7045 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturesGetIamPolicyCall {
7046 c.ctx_ = ctx
7047 return c
7048 }
7049
7050 // Header returns a http.Header that can be modified by the caller to add
7051 // headers to the request.
7052 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) Header() http.Header {
7053 if c.header_ == nil {
7054 c.header_ = make(http.Header)
7055 }
7056 return c.header_
7057 }
7058
7059 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7060 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7061 if c.ifNoneMatch_ != "" {
7062 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7063 }
7064 c.urlParams_.Set("alt", alt)
7065 c.urlParams_.Set("prettyPrint", "false")
7066 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
7067 urls += "?" + c.urlParams_.Encode()
7068 req, err := http.NewRequest("GET", urls, nil)
7069 if err != nil {
7070 return nil, err
7071 }
7072 req.Header = reqHeaders
7073 googleapi.Expand(req.URL, map[string]string{
7074 "resource": c.resource,
7075 })
7076 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
7077 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7078 }
7079
7080 // Do executes the "gkehub.projects.locations.features.getIamPolicy" call.
7081 // Any non-2xx status code is an error. Response headers are in either
7082 // *Policy.ServerResponse.Header or (if a response was returned at all) in
7083 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7084 // whether the returned error was because http.StatusNotModified was returned.
7085 func (c *ProjectsLocationsFeaturesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
7086 gensupport.SetOptions(c.urlParams_, opts...)
7087 res, err := c.doRequest("json")
7088 if res != nil && res.StatusCode == http.StatusNotModified {
7089 if res.Body != nil {
7090 res.Body.Close()
7091 }
7092 return nil, gensupport.WrapError(&googleapi.Error{
7093 Code: res.StatusCode,
7094 Header: res.Header,
7095 })
7096 }
7097 if err != nil {
7098 return nil, err
7099 }
7100 defer googleapi.CloseBody(res)
7101 if err := googleapi.CheckResponse(res); err != nil {
7102 return nil, gensupport.WrapError(err)
7103 }
7104 ret := &Policy{
7105 ServerResponse: googleapi.ServerResponse{
7106 Header: res.Header,
7107 HTTPStatusCode: res.StatusCode,
7108 },
7109 }
7110 target := &ret
7111 b, err := gensupport.DecodeResponseBytes(target, res)
7112 if err != nil {
7113 return nil, err
7114 }
7115 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.getIamPolicy", "response", internallog.HTTPResponse(res, b))
7116 return ret, nil
7117 }
7118
7119 type ProjectsLocationsFeaturesListCall struct {
7120 s *Service
7121 parent string
7122 urlParams_ gensupport.URLParams
7123 ifNoneMatch_ string
7124 ctx_ context.Context
7125 header_ http.Header
7126 }
7127
7128 // List: Lists Features in a given project and location.
7129 //
7130 // - parent: The parent (project and location) where the Features will be
7131 // listed. Specified in the format `projects/*/locations/*`.
7132 func (r *ProjectsLocationsFeaturesService) List(parent string) *ProjectsLocationsFeaturesListCall {
7133 c := &ProjectsLocationsFeaturesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7134 c.parent = parent
7135 return c
7136 }
7137
7138 // Filter sets the optional parameter "filter": Lists Features that match the
7139 // filter expression, following the syntax outlined in
7140 // https://google.aip.dev/160. Examples: - Feature with the name "servicemesh"
7141 // in project "foo-proj": name =
7142 // "projects/foo-proj/locations/global/features/servicemesh" - Features that
7143 // have a label called `foo`: labels.foo:* - Features that have a label called
7144 // `foo` whose value is `bar`: labels.foo = bar
7145 func (c *ProjectsLocationsFeaturesListCall) Filter(filter string) *ProjectsLocationsFeaturesListCall {
7146 c.urlParams_.Set("filter", filter)
7147 return c
7148 }
7149
7150 // OrderBy sets the optional parameter "orderBy": One or more fields to compare
7151 // and use to sort the output. See https://google.aip.dev/132#ordering.
7152 func (c *ProjectsLocationsFeaturesListCall) OrderBy(orderBy string) *ProjectsLocationsFeaturesListCall {
7153 c.urlParams_.Set("orderBy", orderBy)
7154 return c
7155 }
7156
7157 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
7158 // resources, `page_size` specifies number of resources to return. If
7159 // unspecified or set to 0, all resources will be returned.
7160 func (c *ProjectsLocationsFeaturesListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturesListCall {
7161 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7162 return c
7163 }
7164
7165 // PageToken sets the optional parameter "pageToken": Token returned by
7166 // previous call to `ListFeatures` which specifies the position in the list
7167 // from where to continue listing the resources.
7168 func (c *ProjectsLocationsFeaturesListCall) PageToken(pageToken string) *ProjectsLocationsFeaturesListCall {
7169 c.urlParams_.Set("pageToken", pageToken)
7170 return c
7171 }
7172
7173 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If
7174 // set to true, the response will return partial results when some regions are
7175 // unreachable and the unreachable field in Feature proto will be populated. If
7176 // set to false, the request will fail when some regions are unreachable.
7177 func (c *ProjectsLocationsFeaturesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsFeaturesListCall {
7178 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
7179 return c
7180 }
7181
7182 // Fields allows partial responses to be retrieved. See
7183 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7184 // details.
7185 func (c *ProjectsLocationsFeaturesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesListCall {
7186 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7187 return c
7188 }
7189
7190 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7191 // object's ETag matches the given value. This is useful for getting updates
7192 // only after the object has changed since the last request.
7193 func (c *ProjectsLocationsFeaturesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturesListCall {
7194 c.ifNoneMatch_ = entityTag
7195 return c
7196 }
7197
7198 // Context sets the context to be used in this call's Do method.
7199 func (c *ProjectsLocationsFeaturesListCall) Context(ctx context.Context) *ProjectsLocationsFeaturesListCall {
7200 c.ctx_ = ctx
7201 return c
7202 }
7203
7204 // Header returns a http.Header that can be modified by the caller to add
7205 // headers to the request.
7206 func (c *ProjectsLocationsFeaturesListCall) Header() http.Header {
7207 if c.header_ == nil {
7208 c.header_ = make(http.Header)
7209 }
7210 return c.header_
7211 }
7212
7213 func (c *ProjectsLocationsFeaturesListCall) doRequest(alt string) (*http.Response, error) {
7214 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7215 if c.ifNoneMatch_ != "" {
7216 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7217 }
7218 c.urlParams_.Set("alt", alt)
7219 c.urlParams_.Set("prettyPrint", "false")
7220 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features")
7221 urls += "?" + c.urlParams_.Encode()
7222 req, err := http.NewRequest("GET", urls, nil)
7223 if err != nil {
7224 return nil, err
7225 }
7226 req.Header = reqHeaders
7227 googleapi.Expand(req.URL, map[string]string{
7228 "parent": c.parent,
7229 })
7230 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.list", "request", internallog.HTTPRequest(req, nil))
7231 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7232 }
7233
7234 // Do executes the "gkehub.projects.locations.features.list" call.
7235 // Any non-2xx status code is an error. Response headers are in either
7236 // *ListFeaturesResponse.ServerResponse.Header or (if a response was returned
7237 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7238 // check whether the returned error was because http.StatusNotModified was
7239 // returned.
7240 func (c *ProjectsLocationsFeaturesListCall) Do(opts ...googleapi.CallOption) (*ListFeaturesResponse, error) {
7241 gensupport.SetOptions(c.urlParams_, opts...)
7242 res, err := c.doRequest("json")
7243 if res != nil && res.StatusCode == http.StatusNotModified {
7244 if res.Body != nil {
7245 res.Body.Close()
7246 }
7247 return nil, gensupport.WrapError(&googleapi.Error{
7248 Code: res.StatusCode,
7249 Header: res.Header,
7250 })
7251 }
7252 if err != nil {
7253 return nil, err
7254 }
7255 defer googleapi.CloseBody(res)
7256 if err := googleapi.CheckResponse(res); err != nil {
7257 return nil, gensupport.WrapError(err)
7258 }
7259 ret := &ListFeaturesResponse{
7260 ServerResponse: googleapi.ServerResponse{
7261 Header: res.Header,
7262 HTTPStatusCode: res.StatusCode,
7263 },
7264 }
7265 target := &ret
7266 b, err := gensupport.DecodeResponseBytes(target, res)
7267 if err != nil {
7268 return nil, err
7269 }
7270 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.list", "response", internallog.HTTPResponse(res, b))
7271 return ret, nil
7272 }
7273
7274 // Pages invokes f for each page of results.
7275 // A non-nil error returned from f will halt the iteration.
7276 // The provided context supersedes any context provided to the Context method.
7277 func (c *ProjectsLocationsFeaturesListCall) Pages(ctx context.Context, f func(*ListFeaturesResponse) error) error {
7278 c.ctx_ = ctx
7279 defer c.PageToken(c.urlParams_.Get("pageToken"))
7280 for {
7281 x, err := c.Do()
7282 if err != nil {
7283 return err
7284 }
7285 if err := f(x); err != nil {
7286 return err
7287 }
7288 if x.NextPageToken == "" {
7289 return nil
7290 }
7291 c.PageToken(x.NextPageToken)
7292 }
7293 }
7294
7295 type ProjectsLocationsFeaturesPatchCall struct {
7296 s *Service
7297 name string
7298 feature *Feature
7299 urlParams_ gensupport.URLParams
7300 ctx_ context.Context
7301 header_ http.Header
7302 }
7303
7304 // Patch: Updates an existing Feature.
7305 //
7306 // - name: The Feature resource name in the format
7307 // `projects/*/locations/*/features/*`.
7308 func (r *ProjectsLocationsFeaturesService) Patch(name string, feature *Feature) *ProjectsLocationsFeaturesPatchCall {
7309 c := &ProjectsLocationsFeaturesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7310 c.name = name
7311 c.feature = feature
7312 return c
7313 }
7314
7315 // RequestId sets the optional parameter "requestId": A request ID to identify
7316 // requests. Specify a unique request ID so that if you must retry your
7317 // request, the server will know to ignore the request if it has already been
7318 // completed. The server will guarantee that for at least 60 minutes after the
7319 // first request. For example, consider a situation where you make an initial
7320 // request and the request times out. If you make the request again with the
7321 // same request ID, the server can check if original operation with the same
7322 // request ID was received, and if so, will ignore the second request. This
7323 // prevents clients from accidentally creating duplicate commitments. The
7324 // request ID must be a valid UUID with the exception that zero UUID is not
7325 // supported (00000000-0000-0000-0000-000000000000).
7326 func (c *ProjectsLocationsFeaturesPatchCall) RequestId(requestId string) *ProjectsLocationsFeaturesPatchCall {
7327 c.urlParams_.Set("requestId", requestId)
7328 return c
7329 }
7330
7331 // UpdateMask sets the optional parameter "updateMask": Mask of fields to
7332 // update.
7333 func (c *ProjectsLocationsFeaturesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeaturesPatchCall {
7334 c.urlParams_.Set("updateMask", updateMask)
7335 return c
7336 }
7337
7338 // Fields allows partial responses to be retrieved. See
7339 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7340 // details.
7341 func (c *ProjectsLocationsFeaturesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesPatchCall {
7342 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7343 return c
7344 }
7345
7346 // Context sets the context to be used in this call's Do method.
7347 func (c *ProjectsLocationsFeaturesPatchCall) Context(ctx context.Context) *ProjectsLocationsFeaturesPatchCall {
7348 c.ctx_ = ctx
7349 return c
7350 }
7351
7352 // Header returns a http.Header that can be modified by the caller to add
7353 // headers to the request.
7354 func (c *ProjectsLocationsFeaturesPatchCall) Header() http.Header {
7355 if c.header_ == nil {
7356 c.header_ = make(http.Header)
7357 }
7358 return c.header_
7359 }
7360
7361 func (c *ProjectsLocationsFeaturesPatchCall) doRequest(alt string) (*http.Response, error) {
7362 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7363 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.feature)
7364 if err != nil {
7365 return nil, err
7366 }
7367 c.urlParams_.Set("alt", alt)
7368 c.urlParams_.Set("prettyPrint", "false")
7369 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7370 urls += "?" + c.urlParams_.Encode()
7371 req, err := http.NewRequest("PATCH", urls, body)
7372 if err != nil {
7373 return nil, err
7374 }
7375 req.Header = reqHeaders
7376 googleapi.Expand(req.URL, map[string]string{
7377 "name": c.name,
7378 })
7379 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
7380 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7381 }
7382
7383 // Do executes the "gkehub.projects.locations.features.patch" call.
7384 // Any non-2xx status code is an error. Response headers are in either
7385 // *Operation.ServerResponse.Header or (if a response was returned at all) in
7386 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7387 // whether the returned error was because http.StatusNotModified was returned.
7388 func (c *ProjectsLocationsFeaturesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7389 gensupport.SetOptions(c.urlParams_, opts...)
7390 res, err := c.doRequest("json")
7391 if res != nil && res.StatusCode == http.StatusNotModified {
7392 if res.Body != nil {
7393 res.Body.Close()
7394 }
7395 return nil, gensupport.WrapError(&googleapi.Error{
7396 Code: res.StatusCode,
7397 Header: res.Header,
7398 })
7399 }
7400 if err != nil {
7401 return nil, err
7402 }
7403 defer googleapi.CloseBody(res)
7404 if err := googleapi.CheckResponse(res); err != nil {
7405 return nil, gensupport.WrapError(err)
7406 }
7407 ret := &Operation{
7408 ServerResponse: googleapi.ServerResponse{
7409 Header: res.Header,
7410 HTTPStatusCode: res.StatusCode,
7411 },
7412 }
7413 target := &ret
7414 b, err := gensupport.DecodeResponseBytes(target, res)
7415 if err != nil {
7416 return nil, err
7417 }
7418 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.patch", "response", internallog.HTTPResponse(res, b))
7419 return ret, nil
7420 }
7421
7422 type ProjectsLocationsFeaturesSetIamPolicyCall struct {
7423 s *Service
7424 resource string
7425 setiampolicyrequest *SetIamPolicyRequest
7426 urlParams_ gensupport.URLParams
7427 ctx_ context.Context
7428 header_ http.Header
7429 }
7430
7431 // SetIamPolicy: Sets the access control policy on the specified resource.
7432 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
7433 // and `PERMISSION_DENIED` errors.
7434 //
7435 // - resource: REQUIRED: The resource for which the policy is being specified.
7436 // See Resource names (https://cloud.google.com/apis/design/resource_names)
7437 // for the appropriate value for this field.
7438 func (r *ProjectsLocationsFeaturesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsFeaturesSetIamPolicyCall {
7439 c := &ProjectsLocationsFeaturesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7440 c.resource = resource
7441 c.setiampolicyrequest = setiampolicyrequest
7442 return c
7443 }
7444
7445 // Fields allows partial responses to be retrieved. See
7446 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7447 // details.
7448 func (c *ProjectsLocationsFeaturesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesSetIamPolicyCall {
7449 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7450 return c
7451 }
7452
7453 // Context sets the context to be used in this call's Do method.
7454 func (c *ProjectsLocationsFeaturesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturesSetIamPolicyCall {
7455 c.ctx_ = ctx
7456 return c
7457 }
7458
7459 // Header returns a http.Header that can be modified by the caller to add
7460 // headers to the request.
7461 func (c *ProjectsLocationsFeaturesSetIamPolicyCall) Header() http.Header {
7462 if c.header_ == nil {
7463 c.header_ = make(http.Header)
7464 }
7465 return c.header_
7466 }
7467
7468 func (c *ProjectsLocationsFeaturesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7469 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7470 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
7471 if err != nil {
7472 return nil, err
7473 }
7474 c.urlParams_.Set("alt", alt)
7475 c.urlParams_.Set("prettyPrint", "false")
7476 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
7477 urls += "?" + c.urlParams_.Encode()
7478 req, err := http.NewRequest("POST", urls, body)
7479 if err != nil {
7480 return nil, err
7481 }
7482 req.Header = reqHeaders
7483 googleapi.Expand(req.URL, map[string]string{
7484 "resource": c.resource,
7485 })
7486 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
7487 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7488 }
7489
7490 // Do executes the "gkehub.projects.locations.features.setIamPolicy" call.
7491 // Any non-2xx status code is an error. Response headers are in either
7492 // *Policy.ServerResponse.Header or (if a response was returned at all) in
7493 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7494 // whether the returned error was because http.StatusNotModified was returned.
7495 func (c *ProjectsLocationsFeaturesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
7496 gensupport.SetOptions(c.urlParams_, opts...)
7497 res, err := c.doRequest("json")
7498 if res != nil && res.StatusCode == http.StatusNotModified {
7499 if res.Body != nil {
7500 res.Body.Close()
7501 }
7502 return nil, gensupport.WrapError(&googleapi.Error{
7503 Code: res.StatusCode,
7504 Header: res.Header,
7505 })
7506 }
7507 if err != nil {
7508 return nil, err
7509 }
7510 defer googleapi.CloseBody(res)
7511 if err := googleapi.CheckResponse(res); err != nil {
7512 return nil, gensupport.WrapError(err)
7513 }
7514 ret := &Policy{
7515 ServerResponse: googleapi.ServerResponse{
7516 Header: res.Header,
7517 HTTPStatusCode: res.StatusCode,
7518 },
7519 }
7520 target := &ret
7521 b, err := gensupport.DecodeResponseBytes(target, res)
7522 if err != nil {
7523 return nil, err
7524 }
7525 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.setIamPolicy", "response", internallog.HTTPResponse(res, b))
7526 return ret, nil
7527 }
7528
7529 type ProjectsLocationsFeaturesTestIamPermissionsCall struct {
7530 s *Service
7531 resource string
7532 testiampermissionsrequest *TestIamPermissionsRequest
7533 urlParams_ gensupport.URLParams
7534 ctx_ context.Context
7535 header_ http.Header
7536 }
7537
7538 // TestIamPermissions: Returns permissions that a caller has on the specified
7539 // resource. If the resource does not exist, this will return an empty set of
7540 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
7541 // used for building permission-aware UIs and command-line tools, not for
7542 // authorization checking. This operation may "fail open" without warning.
7543 //
7544 // - resource: REQUIRED: The resource for which the policy detail is being
7545 // requested. See Resource names
7546 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
7547 // value for this field.
7548 func (r *ProjectsLocationsFeaturesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsFeaturesTestIamPermissionsCall {
7549 c := &ProjectsLocationsFeaturesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7550 c.resource = resource
7551 c.testiampermissionsrequest = testiampermissionsrequest
7552 return c
7553 }
7554
7555 // Fields allows partial responses to be retrieved. See
7556 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7557 // details.
7558 func (c *ProjectsLocationsFeaturesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturesTestIamPermissionsCall {
7559 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7560 return c
7561 }
7562
7563 // Context sets the context to be used in this call's Do method.
7564 func (c *ProjectsLocationsFeaturesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFeaturesTestIamPermissionsCall {
7565 c.ctx_ = ctx
7566 return c
7567 }
7568
7569 // Header returns a http.Header that can be modified by the caller to add
7570 // headers to the request.
7571 func (c *ProjectsLocationsFeaturesTestIamPermissionsCall) Header() http.Header {
7572 if c.header_ == nil {
7573 c.header_ = make(http.Header)
7574 }
7575 return c.header_
7576 }
7577
7578 func (c *ProjectsLocationsFeaturesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
7579 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7580 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
7581 if err != nil {
7582 return nil, err
7583 }
7584 c.urlParams_.Set("alt", alt)
7585 c.urlParams_.Set("prettyPrint", "false")
7586 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
7587 urls += "?" + c.urlParams_.Encode()
7588 req, err := http.NewRequest("POST", urls, body)
7589 if err != nil {
7590 return nil, err
7591 }
7592 req.Header = reqHeaders
7593 googleapi.Expand(req.URL, map[string]string{
7594 "resource": c.resource,
7595 })
7596 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
7597 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7598 }
7599
7600 // Do executes the "gkehub.projects.locations.features.testIamPermissions" call.
7601 // Any non-2xx status code is an error. Response headers are in either
7602 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
7603 // returned at all) in error.(*googleapi.Error).Header. Use
7604 // googleapi.IsNotModified to check whether the returned error was because
7605 // http.StatusNotModified was returned.
7606 func (c *ProjectsLocationsFeaturesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
7607 gensupport.SetOptions(c.urlParams_, opts...)
7608 res, err := c.doRequest("json")
7609 if res != nil && res.StatusCode == http.StatusNotModified {
7610 if res.Body != nil {
7611 res.Body.Close()
7612 }
7613 return nil, gensupport.WrapError(&googleapi.Error{
7614 Code: res.StatusCode,
7615 Header: res.Header,
7616 })
7617 }
7618 if err != nil {
7619 return nil, err
7620 }
7621 defer googleapi.CloseBody(res)
7622 if err := googleapi.CheckResponse(res); err != nil {
7623 return nil, gensupport.WrapError(err)
7624 }
7625 ret := &TestIamPermissionsResponse{
7626 ServerResponse: googleapi.ServerResponse{
7627 Header: res.Header,
7628 HTTPStatusCode: res.StatusCode,
7629 },
7630 }
7631 target := &ret
7632 b, err := gensupport.DecodeResponseBytes(target, res)
7633 if err != nil {
7634 return nil, err
7635 }
7636 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.features.testIamPermissions", "response", internallog.HTTPResponse(res, b))
7637 return ret, nil
7638 }
7639
7640 type ProjectsLocationsFleetsCreateCall struct {
7641 s *Service
7642 parent string
7643 fleet *Fleet
7644 urlParams_ gensupport.URLParams
7645 ctx_ context.Context
7646 header_ http.Header
7647 }
7648
7649 // Create: Creates a fleet.
7650 //
7651 // - parent: The parent (project and location) where the Fleet will be created.
7652 // Specified in the format `projects/*/locations/*`.
7653 func (r *ProjectsLocationsFleetsService) Create(parent string, fleet *Fleet) *ProjectsLocationsFleetsCreateCall {
7654 c := &ProjectsLocationsFleetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7655 c.parent = parent
7656 c.fleet = fleet
7657 return c
7658 }
7659
7660 // Fields allows partial responses to be retrieved. See
7661 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7662 // details.
7663 func (c *ProjectsLocationsFleetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFleetsCreateCall {
7664 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7665 return c
7666 }
7667
7668 // Context sets the context to be used in this call's Do method.
7669 func (c *ProjectsLocationsFleetsCreateCall) Context(ctx context.Context) *ProjectsLocationsFleetsCreateCall {
7670 c.ctx_ = ctx
7671 return c
7672 }
7673
7674 // Header returns a http.Header that can be modified by the caller to add
7675 // headers to the request.
7676 func (c *ProjectsLocationsFleetsCreateCall) Header() http.Header {
7677 if c.header_ == nil {
7678 c.header_ = make(http.Header)
7679 }
7680 return c.header_
7681 }
7682
7683 func (c *ProjectsLocationsFleetsCreateCall) doRequest(alt string) (*http.Response, error) {
7684 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7685 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.fleet)
7686 if err != nil {
7687 return nil, err
7688 }
7689 c.urlParams_.Set("alt", alt)
7690 c.urlParams_.Set("prettyPrint", "false")
7691 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fleets")
7692 urls += "?" + c.urlParams_.Encode()
7693 req, err := http.NewRequest("POST", urls, body)
7694 if err != nil {
7695 return nil, err
7696 }
7697 req.Header = reqHeaders
7698 googleapi.Expand(req.URL, map[string]string{
7699 "parent": c.parent,
7700 })
7701 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.create", "request", internallog.HTTPRequest(req, body.Bytes()))
7702 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7703 }
7704
7705 // Do executes the "gkehub.projects.locations.fleets.create" call.
7706 // Any non-2xx status code is an error. Response headers are in either
7707 // *Operation.ServerResponse.Header or (if a response was returned at all) in
7708 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7709 // whether the returned error was because http.StatusNotModified was returned.
7710 func (c *ProjectsLocationsFleetsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7711 gensupport.SetOptions(c.urlParams_, opts...)
7712 res, err := c.doRequest("json")
7713 if res != nil && res.StatusCode == http.StatusNotModified {
7714 if res.Body != nil {
7715 res.Body.Close()
7716 }
7717 return nil, gensupport.WrapError(&googleapi.Error{
7718 Code: res.StatusCode,
7719 Header: res.Header,
7720 })
7721 }
7722 if err != nil {
7723 return nil, err
7724 }
7725 defer googleapi.CloseBody(res)
7726 if err := googleapi.CheckResponse(res); err != nil {
7727 return nil, gensupport.WrapError(err)
7728 }
7729 ret := &Operation{
7730 ServerResponse: googleapi.ServerResponse{
7731 Header: res.Header,
7732 HTTPStatusCode: res.StatusCode,
7733 },
7734 }
7735 target := &ret
7736 b, err := gensupport.DecodeResponseBytes(target, res)
7737 if err != nil {
7738 return nil, err
7739 }
7740 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.create", "response", internallog.HTTPResponse(res, b))
7741 return ret, nil
7742 }
7743
7744 type ProjectsLocationsFleetsDeleteCall struct {
7745 s *Service
7746 name string
7747 urlParams_ gensupport.URLParams
7748 ctx_ context.Context
7749 header_ http.Header
7750 }
7751
7752 // Delete: Removes a Fleet. There must be no memberships remaining in the
7753 // Fleet.
7754 //
7755 // - name: The Fleet resource name in the format
7756 // `projects/*/locations/*/fleets/*`.
7757 func (r *ProjectsLocationsFleetsService) Delete(name string) *ProjectsLocationsFleetsDeleteCall {
7758 c := &ProjectsLocationsFleetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7759 c.name = name
7760 return c
7761 }
7762
7763 // Fields allows partial responses to be retrieved. See
7764 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7765 // details.
7766 func (c *ProjectsLocationsFleetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFleetsDeleteCall {
7767 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7768 return c
7769 }
7770
7771 // Context sets the context to be used in this call's Do method.
7772 func (c *ProjectsLocationsFleetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFleetsDeleteCall {
7773 c.ctx_ = ctx
7774 return c
7775 }
7776
7777 // Header returns a http.Header that can be modified by the caller to add
7778 // headers to the request.
7779 func (c *ProjectsLocationsFleetsDeleteCall) Header() http.Header {
7780 if c.header_ == nil {
7781 c.header_ = make(http.Header)
7782 }
7783 return c.header_
7784 }
7785
7786 func (c *ProjectsLocationsFleetsDeleteCall) doRequest(alt string) (*http.Response, error) {
7787 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7788 c.urlParams_.Set("alt", alt)
7789 c.urlParams_.Set("prettyPrint", "false")
7790 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7791 urls += "?" + c.urlParams_.Encode()
7792 req, err := http.NewRequest("DELETE", urls, nil)
7793 if err != nil {
7794 return nil, err
7795 }
7796 req.Header = reqHeaders
7797 googleapi.Expand(req.URL, map[string]string{
7798 "name": c.name,
7799 })
7800 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.delete", "request", internallog.HTTPRequest(req, nil))
7801 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7802 }
7803
7804 // Do executes the "gkehub.projects.locations.fleets.delete" call.
7805 // Any non-2xx status code is an error. Response headers are in either
7806 // *Operation.ServerResponse.Header or (if a response was returned at all) in
7807 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7808 // whether the returned error was because http.StatusNotModified was returned.
7809 func (c *ProjectsLocationsFleetsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7810 gensupport.SetOptions(c.urlParams_, opts...)
7811 res, err := c.doRequest("json")
7812 if res != nil && res.StatusCode == http.StatusNotModified {
7813 if res.Body != nil {
7814 res.Body.Close()
7815 }
7816 return nil, gensupport.WrapError(&googleapi.Error{
7817 Code: res.StatusCode,
7818 Header: res.Header,
7819 })
7820 }
7821 if err != nil {
7822 return nil, err
7823 }
7824 defer googleapi.CloseBody(res)
7825 if err := googleapi.CheckResponse(res); err != nil {
7826 return nil, gensupport.WrapError(err)
7827 }
7828 ret := &Operation{
7829 ServerResponse: googleapi.ServerResponse{
7830 Header: res.Header,
7831 HTTPStatusCode: res.StatusCode,
7832 },
7833 }
7834 target := &ret
7835 b, err := gensupport.DecodeResponseBytes(target, res)
7836 if err != nil {
7837 return nil, err
7838 }
7839 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.delete", "response", internallog.HTTPResponse(res, b))
7840 return ret, nil
7841 }
7842
7843 type ProjectsLocationsFleetsGetCall struct {
7844 s *Service
7845 name string
7846 urlParams_ gensupport.URLParams
7847 ifNoneMatch_ string
7848 ctx_ context.Context
7849 header_ http.Header
7850 }
7851
7852 // Get: Returns the details of a fleet.
7853 //
7854 // - name: The Fleet resource name in the format
7855 // `projects/*/locations/*/fleets/*`.
7856 func (r *ProjectsLocationsFleetsService) Get(name string) *ProjectsLocationsFleetsGetCall {
7857 c := &ProjectsLocationsFleetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7858 c.name = name
7859 return c
7860 }
7861
7862 // Fields allows partial responses to be retrieved. See
7863 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7864 // details.
7865 func (c *ProjectsLocationsFleetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFleetsGetCall {
7866 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7867 return c
7868 }
7869
7870 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7871 // object's ETag matches the given value. This is useful for getting updates
7872 // only after the object has changed since the last request.
7873 func (c *ProjectsLocationsFleetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFleetsGetCall {
7874 c.ifNoneMatch_ = entityTag
7875 return c
7876 }
7877
7878 // Context sets the context to be used in this call's Do method.
7879 func (c *ProjectsLocationsFleetsGetCall) Context(ctx context.Context) *ProjectsLocationsFleetsGetCall {
7880 c.ctx_ = ctx
7881 return c
7882 }
7883
7884 // Header returns a http.Header that can be modified by the caller to add
7885 // headers to the request.
7886 func (c *ProjectsLocationsFleetsGetCall) Header() http.Header {
7887 if c.header_ == nil {
7888 c.header_ = make(http.Header)
7889 }
7890 return c.header_
7891 }
7892
7893 func (c *ProjectsLocationsFleetsGetCall) doRequest(alt string) (*http.Response, error) {
7894 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7895 if c.ifNoneMatch_ != "" {
7896 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7897 }
7898 c.urlParams_.Set("alt", alt)
7899 c.urlParams_.Set("prettyPrint", "false")
7900 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7901 urls += "?" + c.urlParams_.Encode()
7902 req, err := http.NewRequest("GET", urls, nil)
7903 if err != nil {
7904 return nil, err
7905 }
7906 req.Header = reqHeaders
7907 googleapi.Expand(req.URL, map[string]string{
7908 "name": c.name,
7909 })
7910 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.get", "request", internallog.HTTPRequest(req, nil))
7911 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7912 }
7913
7914 // Do executes the "gkehub.projects.locations.fleets.get" call.
7915 // Any non-2xx status code is an error. Response headers are in either
7916 // *Fleet.ServerResponse.Header or (if a response was returned at all) in
7917 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7918 // whether the returned error was because http.StatusNotModified was returned.
7919 func (c *ProjectsLocationsFleetsGetCall) Do(opts ...googleapi.CallOption) (*Fleet, error) {
7920 gensupport.SetOptions(c.urlParams_, opts...)
7921 res, err := c.doRequest("json")
7922 if res != nil && res.StatusCode == http.StatusNotModified {
7923 if res.Body != nil {
7924 res.Body.Close()
7925 }
7926 return nil, gensupport.WrapError(&googleapi.Error{
7927 Code: res.StatusCode,
7928 Header: res.Header,
7929 })
7930 }
7931 if err != nil {
7932 return nil, err
7933 }
7934 defer googleapi.CloseBody(res)
7935 if err := googleapi.CheckResponse(res); err != nil {
7936 return nil, gensupport.WrapError(err)
7937 }
7938 ret := &Fleet{
7939 ServerResponse: googleapi.ServerResponse{
7940 Header: res.Header,
7941 HTTPStatusCode: res.StatusCode,
7942 },
7943 }
7944 target := &ret
7945 b, err := gensupport.DecodeResponseBytes(target, res)
7946 if err != nil {
7947 return nil, err
7948 }
7949 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.get", "response", internallog.HTTPResponse(res, b))
7950 return ret, nil
7951 }
7952
7953 type ProjectsLocationsFleetsListCall struct {
7954 s *Service
7955 parent string
7956 urlParams_ gensupport.URLParams
7957 ifNoneMatch_ string
7958 ctx_ context.Context
7959 header_ http.Header
7960 }
7961
7962 // List: Returns all fleets within an organization or a project that the caller
7963 // has access to.
7964 //
7965 // - parent: The organization or project to list for Fleets under, in the
7966 // format `organizations/*/locations/*` or `projects/*/locations/*`.
7967 func (r *ProjectsLocationsFleetsService) List(parent string) *ProjectsLocationsFleetsListCall {
7968 c := &ProjectsLocationsFleetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7969 c.parent = parent
7970 return c
7971 }
7972
7973 // PageSize sets the optional parameter "pageSize": The maximum number of
7974 // fleets to return. The service may return fewer than this value. If
7975 // unspecified, at most 200 fleets will be returned. The maximum value is 1000;
7976 // values above 1000 will be coerced to 1000.
7977 func (c *ProjectsLocationsFleetsListCall) PageSize(pageSize int64) *ProjectsLocationsFleetsListCall {
7978 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7979 return c
7980 }
7981
7982 // PageToken sets the optional parameter "pageToken": A page token, received
7983 // from a previous `ListFleets` call. Provide this to retrieve the subsequent
7984 // page. When paginating, all other parameters provided to `ListFleets` must
7985 // match the call that provided the page token.
7986 func (c *ProjectsLocationsFleetsListCall) PageToken(pageToken string) *ProjectsLocationsFleetsListCall {
7987 c.urlParams_.Set("pageToken", pageToken)
7988 return c
7989 }
7990
7991 // Fields allows partial responses to be retrieved. See
7992 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7993 // details.
7994 func (c *ProjectsLocationsFleetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFleetsListCall {
7995 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7996 return c
7997 }
7998
7999 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8000 // object's ETag matches the given value. This is useful for getting updates
8001 // only after the object has changed since the last request.
8002 func (c *ProjectsLocationsFleetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFleetsListCall {
8003 c.ifNoneMatch_ = entityTag
8004 return c
8005 }
8006
8007 // Context sets the context to be used in this call's Do method.
8008 func (c *ProjectsLocationsFleetsListCall) Context(ctx context.Context) *ProjectsLocationsFleetsListCall {
8009 c.ctx_ = ctx
8010 return c
8011 }
8012
8013 // Header returns a http.Header that can be modified by the caller to add
8014 // headers to the request.
8015 func (c *ProjectsLocationsFleetsListCall) Header() http.Header {
8016 if c.header_ == nil {
8017 c.header_ = make(http.Header)
8018 }
8019 return c.header_
8020 }
8021
8022 func (c *ProjectsLocationsFleetsListCall) doRequest(alt string) (*http.Response, error) {
8023 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8024 if c.ifNoneMatch_ != "" {
8025 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8026 }
8027 c.urlParams_.Set("alt", alt)
8028 c.urlParams_.Set("prettyPrint", "false")
8029 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fleets")
8030 urls += "?" + c.urlParams_.Encode()
8031 req, err := http.NewRequest("GET", urls, nil)
8032 if err != nil {
8033 return nil, err
8034 }
8035 req.Header = reqHeaders
8036 googleapi.Expand(req.URL, map[string]string{
8037 "parent": c.parent,
8038 })
8039 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.list", "request", internallog.HTTPRequest(req, nil))
8040 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8041 }
8042
8043 // Do executes the "gkehub.projects.locations.fleets.list" call.
8044 // Any non-2xx status code is an error. Response headers are in either
8045 // *ListFleetsResponse.ServerResponse.Header or (if a response was returned at
8046 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8047 // check whether the returned error was because http.StatusNotModified was
8048 // returned.
8049 func (c *ProjectsLocationsFleetsListCall) Do(opts ...googleapi.CallOption) (*ListFleetsResponse, error) {
8050 gensupport.SetOptions(c.urlParams_, opts...)
8051 res, err := c.doRequest("json")
8052 if res != nil && res.StatusCode == http.StatusNotModified {
8053 if res.Body != nil {
8054 res.Body.Close()
8055 }
8056 return nil, gensupport.WrapError(&googleapi.Error{
8057 Code: res.StatusCode,
8058 Header: res.Header,
8059 })
8060 }
8061 if err != nil {
8062 return nil, err
8063 }
8064 defer googleapi.CloseBody(res)
8065 if err := googleapi.CheckResponse(res); err != nil {
8066 return nil, gensupport.WrapError(err)
8067 }
8068 ret := &ListFleetsResponse{
8069 ServerResponse: googleapi.ServerResponse{
8070 Header: res.Header,
8071 HTTPStatusCode: res.StatusCode,
8072 },
8073 }
8074 target := &ret
8075 b, err := gensupport.DecodeResponseBytes(target, res)
8076 if err != nil {
8077 return nil, err
8078 }
8079 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.list", "response", internallog.HTTPResponse(res, b))
8080 return ret, nil
8081 }
8082
8083 // Pages invokes f for each page of results.
8084 // A non-nil error returned from f will halt the iteration.
8085 // The provided context supersedes any context provided to the Context method.
8086 func (c *ProjectsLocationsFleetsListCall) Pages(ctx context.Context, f func(*ListFleetsResponse) error) error {
8087 c.ctx_ = ctx
8088 defer c.PageToken(c.urlParams_.Get("pageToken"))
8089 for {
8090 x, err := c.Do()
8091 if err != nil {
8092 return err
8093 }
8094 if err := f(x); err != nil {
8095 return err
8096 }
8097 if x.NextPageToken == "" {
8098 return nil
8099 }
8100 c.PageToken(x.NextPageToken)
8101 }
8102 }
8103
8104 type ProjectsLocationsFleetsPatchCall struct {
8105 s *Service
8106 name string
8107 fleet *Fleet
8108 urlParams_ gensupport.URLParams
8109 ctx_ context.Context
8110 header_ http.Header
8111 }
8112
8113 // Patch: Updates a fleet.
8114 //
8115 // - name: Output only. The full, unique resource name of this fleet in the
8116 // format of `projects/{project}/locations/{location}/fleets/{fleet}`. Each
8117 // Google Cloud project can have at most one fleet resource, named "default".
8118 func (r *ProjectsLocationsFleetsService) Patch(name string, fleet *Fleet) *ProjectsLocationsFleetsPatchCall {
8119 c := &ProjectsLocationsFleetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8120 c.name = name
8121 c.fleet = fleet
8122 return c
8123 }
8124
8125 // UpdateMask sets the optional parameter "updateMask": Required. The fields to
8126 // be updated;
8127 func (c *ProjectsLocationsFleetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFleetsPatchCall {
8128 c.urlParams_.Set("updateMask", updateMask)
8129 return c
8130 }
8131
8132 // Fields allows partial responses to be retrieved. See
8133 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8134 // details.
8135 func (c *ProjectsLocationsFleetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFleetsPatchCall {
8136 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8137 return c
8138 }
8139
8140 // Context sets the context to be used in this call's Do method.
8141 func (c *ProjectsLocationsFleetsPatchCall) Context(ctx context.Context) *ProjectsLocationsFleetsPatchCall {
8142 c.ctx_ = ctx
8143 return c
8144 }
8145
8146 // Header returns a http.Header that can be modified by the caller to add
8147 // headers to the request.
8148 func (c *ProjectsLocationsFleetsPatchCall) Header() http.Header {
8149 if c.header_ == nil {
8150 c.header_ = make(http.Header)
8151 }
8152 return c.header_
8153 }
8154
8155 func (c *ProjectsLocationsFleetsPatchCall) doRequest(alt string) (*http.Response, error) {
8156 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8157 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.fleet)
8158 if err != nil {
8159 return nil, err
8160 }
8161 c.urlParams_.Set("alt", alt)
8162 c.urlParams_.Set("prettyPrint", "false")
8163 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8164 urls += "?" + c.urlParams_.Encode()
8165 req, err := http.NewRequest("PATCH", urls, body)
8166 if err != nil {
8167 return nil, err
8168 }
8169 req.Header = reqHeaders
8170 googleapi.Expand(req.URL, map[string]string{
8171 "name": c.name,
8172 })
8173 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
8174 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8175 }
8176
8177 // Do executes the "gkehub.projects.locations.fleets.patch" call.
8178 // Any non-2xx status code is an error. Response headers are in either
8179 // *Operation.ServerResponse.Header or (if a response was returned at all) in
8180 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8181 // whether the returned error was because http.StatusNotModified was returned.
8182 func (c *ProjectsLocationsFleetsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8183 gensupport.SetOptions(c.urlParams_, opts...)
8184 res, err := c.doRequest("json")
8185 if res != nil && res.StatusCode == http.StatusNotModified {
8186 if res.Body != nil {
8187 res.Body.Close()
8188 }
8189 return nil, gensupport.WrapError(&googleapi.Error{
8190 Code: res.StatusCode,
8191 Header: res.Header,
8192 })
8193 }
8194 if err != nil {
8195 return nil, err
8196 }
8197 defer googleapi.CloseBody(res)
8198 if err := googleapi.CheckResponse(res); err != nil {
8199 return nil, gensupport.WrapError(err)
8200 }
8201 ret := &Operation{
8202 ServerResponse: googleapi.ServerResponse{
8203 Header: res.Header,
8204 HTTPStatusCode: res.StatusCode,
8205 },
8206 }
8207 target := &ret
8208 b, err := gensupport.DecodeResponseBytes(target, res)
8209 if err != nil {
8210 return nil, err
8211 }
8212 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.fleets.patch", "response", internallog.HTTPResponse(res, b))
8213 return ret, nil
8214 }
8215
8216 type ProjectsLocationsMembershipsCreateCall struct {
8217 s *Service
8218 parent string
8219 membership *Membership
8220 urlParams_ gensupport.URLParams
8221 ctx_ context.Context
8222 header_ http.Header
8223 }
8224
8225 // Create: Creates a new Membership. **This is currently only supported for GKE
8226 // clusters on Google Cloud**. To register other clusters, follow the
8227 // instructions at
8228 // https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
8229 //
8230 // - parent: The parent (project and location) where the Memberships will be
8231 // created. Specified in the format `projects/*/locations/*`.
8232 func (r *ProjectsLocationsMembershipsService) Create(parent string, membership *Membership) *ProjectsLocationsMembershipsCreateCall {
8233 c := &ProjectsLocationsMembershipsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8234 c.parent = parent
8235 c.membership = membership
8236 return c
8237 }
8238
8239 // MembershipId sets the optional parameter "membershipId": Required. Client
8240 // chosen ID for the membership. `membership_id` must be a valid RFC 1123
8241 // compliant DNS label: 1. At most 63 characters in length 2. It must consist
8242 // of lower case alphanumeric characters or `-` 3. It must start and end with
8243 // an alphanumeric character Which can be expressed as the regex:
8244 // `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
8245 func (c *ProjectsLocationsMembershipsCreateCall) MembershipId(membershipId string) *ProjectsLocationsMembershipsCreateCall {
8246 c.urlParams_.Set("membershipId", membershipId)
8247 return c
8248 }
8249
8250 // RequestId sets the optional parameter "requestId": A request ID to identify
8251 // requests. Specify a unique request ID so that if you must retry your
8252 // request, the server will know to ignore the request if it has already been
8253 // completed. The server will guarantee that for at least 60 minutes after the
8254 // first request. For example, consider a situation where you make an initial
8255 // request and the request times out. If you make the request again with the
8256 // same request ID, the server can check if original operation with the same
8257 // request ID was received, and if so, will ignore the second request. This
8258 // prevents clients from accidentally creating duplicate commitments. The
8259 // request ID must be a valid UUID with the exception that zero UUID is not
8260 // supported (00000000-0000-0000-0000-000000000000).
8261 func (c *ProjectsLocationsMembershipsCreateCall) RequestId(requestId string) *ProjectsLocationsMembershipsCreateCall {
8262 c.urlParams_.Set("requestId", requestId)
8263 return c
8264 }
8265
8266 // Fields allows partial responses to be retrieved. See
8267 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8268 // details.
8269 func (c *ProjectsLocationsMembershipsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsCreateCall {
8270 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8271 return c
8272 }
8273
8274 // Context sets the context to be used in this call's Do method.
8275 func (c *ProjectsLocationsMembershipsCreateCall) Context(ctx context.Context) *ProjectsLocationsMembershipsCreateCall {
8276 c.ctx_ = ctx
8277 return c
8278 }
8279
8280 // Header returns a http.Header that can be modified by the caller to add
8281 // headers to the request.
8282 func (c *ProjectsLocationsMembershipsCreateCall) Header() http.Header {
8283 if c.header_ == nil {
8284 c.header_ = make(http.Header)
8285 }
8286 return c.header_
8287 }
8288
8289 func (c *ProjectsLocationsMembershipsCreateCall) doRequest(alt string) (*http.Response, error) {
8290 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8291 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.membership)
8292 if err != nil {
8293 return nil, err
8294 }
8295 c.urlParams_.Set("alt", alt)
8296 c.urlParams_.Set("prettyPrint", "false")
8297 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/memberships")
8298 urls += "?" + c.urlParams_.Encode()
8299 req, err := http.NewRequest("POST", urls, body)
8300 if err != nil {
8301 return nil, err
8302 }
8303 req.Header = reqHeaders
8304 googleapi.Expand(req.URL, map[string]string{
8305 "parent": c.parent,
8306 })
8307 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.create", "request", internallog.HTTPRequest(req, body.Bytes()))
8308 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8309 }
8310
8311 // Do executes the "gkehub.projects.locations.memberships.create" call.
8312 // Any non-2xx status code is an error. Response headers are in either
8313 // *Operation.ServerResponse.Header or (if a response was returned at all) in
8314 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8315 // whether the returned error was because http.StatusNotModified was returned.
8316 func (c *ProjectsLocationsMembershipsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8317 gensupport.SetOptions(c.urlParams_, opts...)
8318 res, err := c.doRequest("json")
8319 if res != nil && res.StatusCode == http.StatusNotModified {
8320 if res.Body != nil {
8321 res.Body.Close()
8322 }
8323 return nil, gensupport.WrapError(&googleapi.Error{
8324 Code: res.StatusCode,
8325 Header: res.Header,
8326 })
8327 }
8328 if err != nil {
8329 return nil, err
8330 }
8331 defer googleapi.CloseBody(res)
8332 if err := googleapi.CheckResponse(res); err != nil {
8333 return nil, gensupport.WrapError(err)
8334 }
8335 ret := &Operation{
8336 ServerResponse: googleapi.ServerResponse{
8337 Header: res.Header,
8338 HTTPStatusCode: res.StatusCode,
8339 },
8340 }
8341 target := &ret
8342 b, err := gensupport.DecodeResponseBytes(target, res)
8343 if err != nil {
8344 return nil, err
8345 }
8346 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.create", "response", internallog.HTTPResponse(res, b))
8347 return ret, nil
8348 }
8349
8350 type ProjectsLocationsMembershipsDeleteCall struct {
8351 s *Service
8352 name string
8353 urlParams_ gensupport.URLParams
8354 ctx_ context.Context
8355 header_ http.Header
8356 }
8357
8358 // Delete: Removes a Membership. **This is currently only supported for GKE
8359 // clusters on Google Cloud**. To unregister other clusters, follow the
8360 // instructions at
8361 // https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
8362 //
8363 // - name: The Membership resource name in the format
8364 // `projects/*/locations/*/memberships/*`.
8365 func (r *ProjectsLocationsMembershipsService) Delete(name string) *ProjectsLocationsMembershipsDeleteCall {
8366 c := &ProjectsLocationsMembershipsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8367 c.name = name
8368 return c
8369 }
8370
8371 // Force sets the optional parameter "force": If set to true, any subresource
8372 // from this Membership will also be deleted. Otherwise, the request will only
8373 // work if the Membership has no subresource.
8374 func (c *ProjectsLocationsMembershipsDeleteCall) Force(force bool) *ProjectsLocationsMembershipsDeleteCall {
8375 c.urlParams_.Set("force", fmt.Sprint(force))
8376 return c
8377 }
8378
8379 // RequestId sets the optional parameter "requestId": A request ID to identify
8380 // requests. Specify a unique request ID so that if you must retry your
8381 // request, the server will know to ignore the request if it has already been
8382 // completed. The server will guarantee that for at least 60 minutes after the
8383 // first request. For example, consider a situation where you make an initial
8384 // request and the request times out. If you make the request again with the
8385 // same request ID, the server can check if original operation with the same
8386 // request ID was received, and if so, will ignore the second request. This
8387 // prevents clients from accidentally creating duplicate commitments. The
8388 // request ID must be a valid UUID with the exception that zero UUID is not
8389 // supported (00000000-0000-0000-0000-000000000000).
8390 func (c *ProjectsLocationsMembershipsDeleteCall) RequestId(requestId string) *ProjectsLocationsMembershipsDeleteCall {
8391 c.urlParams_.Set("requestId", requestId)
8392 return c
8393 }
8394
8395 // Fields allows partial responses to be retrieved. See
8396 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8397 // details.
8398 func (c *ProjectsLocationsMembershipsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsDeleteCall {
8399 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8400 return c
8401 }
8402
8403 // Context sets the context to be used in this call's Do method.
8404 func (c *ProjectsLocationsMembershipsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMembershipsDeleteCall {
8405 c.ctx_ = ctx
8406 return c
8407 }
8408
8409 // Header returns a http.Header that can be modified by the caller to add
8410 // headers to the request.
8411 func (c *ProjectsLocationsMembershipsDeleteCall) Header() http.Header {
8412 if c.header_ == nil {
8413 c.header_ = make(http.Header)
8414 }
8415 return c.header_
8416 }
8417
8418 func (c *ProjectsLocationsMembershipsDeleteCall) doRequest(alt string) (*http.Response, error) {
8419 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8420 c.urlParams_.Set("alt", alt)
8421 c.urlParams_.Set("prettyPrint", "false")
8422 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8423 urls += "?" + c.urlParams_.Encode()
8424 req, err := http.NewRequest("DELETE", urls, nil)
8425 if err != nil {
8426 return nil, err
8427 }
8428 req.Header = reqHeaders
8429 googleapi.Expand(req.URL, map[string]string{
8430 "name": c.name,
8431 })
8432 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.delete", "request", internallog.HTTPRequest(req, nil))
8433 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8434 }
8435
8436 // Do executes the "gkehub.projects.locations.memberships.delete" call.
8437 // Any non-2xx status code is an error. Response headers are in either
8438 // *Operation.ServerResponse.Header or (if a response was returned at all) in
8439 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8440 // whether the returned error was because http.StatusNotModified was returned.
8441 func (c *ProjectsLocationsMembershipsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8442 gensupport.SetOptions(c.urlParams_, opts...)
8443 res, err := c.doRequest("json")
8444 if res != nil && res.StatusCode == http.StatusNotModified {
8445 if res.Body != nil {
8446 res.Body.Close()
8447 }
8448 return nil, gensupport.WrapError(&googleapi.Error{
8449 Code: res.StatusCode,
8450 Header: res.Header,
8451 })
8452 }
8453 if err != nil {
8454 return nil, err
8455 }
8456 defer googleapi.CloseBody(res)
8457 if err := googleapi.CheckResponse(res); err != nil {
8458 return nil, gensupport.WrapError(err)
8459 }
8460 ret := &Operation{
8461 ServerResponse: googleapi.ServerResponse{
8462 Header: res.Header,
8463 HTTPStatusCode: res.StatusCode,
8464 },
8465 }
8466 target := &ret
8467 b, err := gensupport.DecodeResponseBytes(target, res)
8468 if err != nil {
8469 return nil, err
8470 }
8471 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.delete", "response", internallog.HTTPResponse(res, b))
8472 return ret, nil
8473 }
8474
8475 type ProjectsLocationsMembershipsGenerateConnectManifestCall struct {
8476 s *Service
8477 name string
8478 urlParams_ gensupport.URLParams
8479 ifNoneMatch_ string
8480 ctx_ context.Context
8481 header_ http.Header
8482 }
8483
8484 // GenerateConnectManifest: Generates the manifest for deployment of the GKE
8485 // connect agent. **This method is used internally by Google-provided
8486 // libraries.** Most clients should not need to call this method directly.
8487 //
8488 // - name: The Membership resource name the Agent will associate with, in the
8489 // format `projects/*/locations/*/memberships/*`.
8490 func (r *ProjectsLocationsMembershipsService) GenerateConnectManifest(name string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
8491 c := &ProjectsLocationsMembershipsGenerateConnectManifestCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8492 c.name = name
8493 return c
8494 }
8495
8496 // ImagePullSecretContent sets the optional parameter "imagePullSecretContent":
8497 // The image pull secret content for the registry, if not public.
8498 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) ImagePullSecretContent(imagePullSecretContent string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
8499 c.urlParams_.Set("imagePullSecretContent", imagePullSecretContent)
8500 return c
8501 }
8502
8503 // IsUpgrade sets the optional parameter "isUpgrade": If true, generate the
8504 // resources for upgrade only. Some resources generated only for installation
8505 // (e.g. secrets) will be excluded.
8506 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) IsUpgrade(isUpgrade bool) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
8507 c.urlParams_.Set("isUpgrade", fmt.Sprint(isUpgrade))
8508 return c
8509 }
8510
8511 // Namespace sets the optional parameter "namespace": Namespace for GKE Connect
8512 // agent resources. Defaults to `gke-connect`. The Connect Agent is authorized
8513 // automatically when run in the default namespace. Otherwise, explicit
8514 // authorization must be granted with an additional IAM binding.
8515 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Namespace(namespace string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
8516 c.urlParams_.Set("namespace", namespace)
8517 return c
8518 }
8519
8520 // Proxy sets the optional parameter "proxy": URI of a proxy if connectivity
8521 // from the agent to gkeconnect.googleapis.com requires the use of a proxy.
8522 // Format must be in the form `http(s)://{proxy_address}`, depending on the
8523 // HTTP/HTTPS protocol supported by the proxy. This will direct the connect
8524 // agent's outbound traffic through a HTTP(S) proxy.
8525 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Proxy(proxy string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
8526 c.urlParams_.Set("proxy", proxy)
8527 return c
8528 }
8529
8530 // Registry sets the optional parameter "registry": The registry to fetch the
8531 // connect agent image from. Defaults to gcr.io/gkeconnect.
8532 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Registry(registry string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
8533 c.urlParams_.Set("registry", registry)
8534 return c
8535 }
8536
8537 // Version sets the optional parameter "version": The Connect agent version to
8538 // use. Defaults to the most current version.
8539 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Version(version string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
8540 c.urlParams_.Set("version", version)
8541 return c
8542 }
8543
8544 // Fields allows partial responses to be retrieved. See
8545 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8546 // details.
8547 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
8548 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8549 return c
8550 }
8551
8552 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8553 // object's ETag matches the given value. This is useful for getting updates
8554 // only after the object has changed since the last request.
8555 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
8556 c.ifNoneMatch_ = entityTag
8557 return c
8558 }
8559
8560 // Context sets the context to be used in this call's Do method.
8561 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Context(ctx context.Context) *ProjectsLocationsMembershipsGenerateConnectManifestCall {
8562 c.ctx_ = ctx
8563 return c
8564 }
8565
8566 // Header returns a http.Header that can be modified by the caller to add
8567 // headers to the request.
8568 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Header() http.Header {
8569 if c.header_ == nil {
8570 c.header_ = make(http.Header)
8571 }
8572 return c.header_
8573 }
8574
8575 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) doRequest(alt string) (*http.Response, error) {
8576 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8577 if c.ifNoneMatch_ != "" {
8578 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8579 }
8580 c.urlParams_.Set("alt", alt)
8581 c.urlParams_.Set("prettyPrint", "false")
8582 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:generateConnectManifest")
8583 urls += "?" + c.urlParams_.Encode()
8584 req, err := http.NewRequest("GET", urls, nil)
8585 if err != nil {
8586 return nil, err
8587 }
8588 req.Header = reqHeaders
8589 googleapi.Expand(req.URL, map[string]string{
8590 "name": c.name,
8591 })
8592 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.generateConnectManifest", "request", internallog.HTTPRequest(req, nil))
8593 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8594 }
8595
8596 // Do executes the "gkehub.projects.locations.memberships.generateConnectManifest" call.
8597 // Any non-2xx status code is an error. Response headers are in either
8598 // *GenerateConnectManifestResponse.ServerResponse.Header or (if a response was
8599 // returned at all) in error.(*googleapi.Error).Header. Use
8600 // googleapi.IsNotModified to check whether the returned error was because
8601 // http.StatusNotModified was returned.
8602 func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Do(opts ...googleapi.CallOption) (*GenerateConnectManifestResponse, error) {
8603 gensupport.SetOptions(c.urlParams_, opts...)
8604 res, err := c.doRequest("json")
8605 if res != nil && res.StatusCode == http.StatusNotModified {
8606 if res.Body != nil {
8607 res.Body.Close()
8608 }
8609 return nil, gensupport.WrapError(&googleapi.Error{
8610 Code: res.StatusCode,
8611 Header: res.Header,
8612 })
8613 }
8614 if err != nil {
8615 return nil, err
8616 }
8617 defer googleapi.CloseBody(res)
8618 if err := googleapi.CheckResponse(res); err != nil {
8619 return nil, gensupport.WrapError(err)
8620 }
8621 ret := &GenerateConnectManifestResponse{
8622 ServerResponse: googleapi.ServerResponse{
8623 Header: res.Header,
8624 HTTPStatusCode: res.StatusCode,
8625 },
8626 }
8627 target := &ret
8628 b, err := gensupport.DecodeResponseBytes(target, res)
8629 if err != nil {
8630 return nil, err
8631 }
8632 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.generateConnectManifest", "response", internallog.HTTPResponse(res, b))
8633 return ret, nil
8634 }
8635
8636 type ProjectsLocationsMembershipsGetCall struct {
8637 s *Service
8638 name string
8639 urlParams_ gensupport.URLParams
8640 ifNoneMatch_ string
8641 ctx_ context.Context
8642 header_ http.Header
8643 }
8644
8645 // Get: Gets the details of a Membership.
8646 //
8647 // - name: The Membership resource name in the format
8648 // `projects/*/locations/*/memberships/*`.
8649 func (r *ProjectsLocationsMembershipsService) Get(name string) *ProjectsLocationsMembershipsGetCall {
8650 c := &ProjectsLocationsMembershipsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8651 c.name = name
8652 return c
8653 }
8654
8655 // Fields allows partial responses to be retrieved. See
8656 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8657 // details.
8658 func (c *ProjectsLocationsMembershipsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsGetCall {
8659 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8660 return c
8661 }
8662
8663 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8664 // object's ETag matches the given value. This is useful for getting updates
8665 // only after the object has changed since the last request.
8666 func (c *ProjectsLocationsMembershipsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsGetCall {
8667 c.ifNoneMatch_ = entityTag
8668 return c
8669 }
8670
8671 // Context sets the context to be used in this call's Do method.
8672 func (c *ProjectsLocationsMembershipsGetCall) Context(ctx context.Context) *ProjectsLocationsMembershipsGetCall {
8673 c.ctx_ = ctx
8674 return c
8675 }
8676
8677 // Header returns a http.Header that can be modified by the caller to add
8678 // headers to the request.
8679 func (c *ProjectsLocationsMembershipsGetCall) Header() http.Header {
8680 if c.header_ == nil {
8681 c.header_ = make(http.Header)
8682 }
8683 return c.header_
8684 }
8685
8686 func (c *ProjectsLocationsMembershipsGetCall) doRequest(alt string) (*http.Response, error) {
8687 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8688 if c.ifNoneMatch_ != "" {
8689 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8690 }
8691 c.urlParams_.Set("alt", alt)
8692 c.urlParams_.Set("prettyPrint", "false")
8693 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8694 urls += "?" + c.urlParams_.Encode()
8695 req, err := http.NewRequest("GET", urls, nil)
8696 if err != nil {
8697 return nil, err
8698 }
8699 req.Header = reqHeaders
8700 googleapi.Expand(req.URL, map[string]string{
8701 "name": c.name,
8702 })
8703 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.get", "request", internallog.HTTPRequest(req, nil))
8704 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8705 }
8706
8707 // Do executes the "gkehub.projects.locations.memberships.get" call.
8708 // Any non-2xx status code is an error. Response headers are in either
8709 // *Membership.ServerResponse.Header or (if a response was returned at all) in
8710 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8711 // whether the returned error was because http.StatusNotModified was returned.
8712 func (c *ProjectsLocationsMembershipsGetCall) Do(opts ...googleapi.CallOption) (*Membership, error) {
8713 gensupport.SetOptions(c.urlParams_, opts...)
8714 res, err := c.doRequest("json")
8715 if res != nil && res.StatusCode == http.StatusNotModified {
8716 if res.Body != nil {
8717 res.Body.Close()
8718 }
8719 return nil, gensupport.WrapError(&googleapi.Error{
8720 Code: res.StatusCode,
8721 Header: res.Header,
8722 })
8723 }
8724 if err != nil {
8725 return nil, err
8726 }
8727 defer googleapi.CloseBody(res)
8728 if err := googleapi.CheckResponse(res); err != nil {
8729 return nil, gensupport.WrapError(err)
8730 }
8731 ret := &Membership{
8732 ServerResponse: googleapi.ServerResponse{
8733 Header: res.Header,
8734 HTTPStatusCode: res.StatusCode,
8735 },
8736 }
8737 target := &ret
8738 b, err := gensupport.DecodeResponseBytes(target, res)
8739 if err != nil {
8740 return nil, err
8741 }
8742 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.get", "response", internallog.HTTPResponse(res, b))
8743 return ret, nil
8744 }
8745
8746 type ProjectsLocationsMembershipsGetIamPolicyCall struct {
8747 s *Service
8748 resource string
8749 urlParams_ gensupport.URLParams
8750 ifNoneMatch_ string
8751 ctx_ context.Context
8752 header_ http.Header
8753 }
8754
8755 // GetIamPolicy: Gets the access control policy for a resource. Returns an
8756 // empty policy if the resource exists and does not have a policy set.
8757 //
8758 // - resource: REQUIRED: The resource for which the policy is being requested.
8759 // See Resource names (https://cloud.google.com/apis/design/resource_names)
8760 // for the appropriate value for this field.
8761 func (r *ProjectsLocationsMembershipsService) GetIamPolicy(resource string) *ProjectsLocationsMembershipsGetIamPolicyCall {
8762 c := &ProjectsLocationsMembershipsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8763 c.resource = resource
8764 return c
8765 }
8766
8767 // OptionsRequestedPolicyVersion sets the optional parameter
8768 // "options.requestedPolicyVersion": The maximum policy version that will be
8769 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
8770 // an invalid value will be rejected. Requests for policies with any
8771 // conditional role bindings must specify version 3. Policies with no
8772 // conditional role bindings may specify any valid value or leave the field
8773 // unset. The policy in the response might use the policy version that you
8774 // specified, or it might use a lower policy version. For example, if you
8775 // specify version 3, but the policy has no conditional role bindings, the
8776 // response uses version 1. To learn which resources support conditions in
8777 // their IAM policies, see the IAM documentation
8778 // (https://cloud.google.com/iam/help/conditions/resource-policies).
8779 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsMembershipsGetIamPolicyCall {
8780 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
8781 return c
8782 }
8783
8784 // Fields allows partial responses to be retrieved. See
8785 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8786 // details.
8787 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsGetIamPolicyCall {
8788 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8789 return c
8790 }
8791
8792 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8793 // object's ETag matches the given value. This is useful for getting updates
8794 // only after the object has changed since the last request.
8795 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsGetIamPolicyCall {
8796 c.ifNoneMatch_ = entityTag
8797 return c
8798 }
8799
8800 // Context sets the context to be used in this call's Do method.
8801 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMembershipsGetIamPolicyCall {
8802 c.ctx_ = ctx
8803 return c
8804 }
8805
8806 // Header returns a http.Header that can be modified by the caller to add
8807 // headers to the request.
8808 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) Header() http.Header {
8809 if c.header_ == nil {
8810 c.header_ = make(http.Header)
8811 }
8812 return c.header_
8813 }
8814
8815 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8816 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8817 if c.ifNoneMatch_ != "" {
8818 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8819 }
8820 c.urlParams_.Set("alt", alt)
8821 c.urlParams_.Set("prettyPrint", "false")
8822 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
8823 urls += "?" + c.urlParams_.Encode()
8824 req, err := http.NewRequest("GET", urls, nil)
8825 if err != nil {
8826 return nil, err
8827 }
8828 req.Header = reqHeaders
8829 googleapi.Expand(req.URL, map[string]string{
8830 "resource": c.resource,
8831 })
8832 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
8833 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8834 }
8835
8836 // Do executes the "gkehub.projects.locations.memberships.getIamPolicy" call.
8837 // Any non-2xx status code is an error. Response headers are in either
8838 // *Policy.ServerResponse.Header or (if a response was returned at all) in
8839 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8840 // whether the returned error was because http.StatusNotModified was returned.
8841 func (c *ProjectsLocationsMembershipsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8842 gensupport.SetOptions(c.urlParams_, opts...)
8843 res, err := c.doRequest("json")
8844 if res != nil && res.StatusCode == http.StatusNotModified {
8845 if res.Body != nil {
8846 res.Body.Close()
8847 }
8848 return nil, gensupport.WrapError(&googleapi.Error{
8849 Code: res.StatusCode,
8850 Header: res.Header,
8851 })
8852 }
8853 if err != nil {
8854 return nil, err
8855 }
8856 defer googleapi.CloseBody(res)
8857 if err := googleapi.CheckResponse(res); err != nil {
8858 return nil, gensupport.WrapError(err)
8859 }
8860 ret := &Policy{
8861 ServerResponse: googleapi.ServerResponse{
8862 Header: res.Header,
8863 HTTPStatusCode: res.StatusCode,
8864 },
8865 }
8866 target := &ret
8867 b, err := gensupport.DecodeResponseBytes(target, res)
8868 if err != nil {
8869 return nil, err
8870 }
8871 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.getIamPolicy", "response", internallog.HTTPResponse(res, b))
8872 return ret, nil
8873 }
8874
8875 type ProjectsLocationsMembershipsListCall struct {
8876 s *Service
8877 parent string
8878 urlParams_ gensupport.URLParams
8879 ifNoneMatch_ string
8880 ctx_ context.Context
8881 header_ http.Header
8882 }
8883
8884 // List: Lists Memberships in a given project and location.
8885 //
8886 // - parent: The parent (project and location) where the Memberships will be
8887 // listed. Specified in the format `projects/*/locations/*`.
8888 // `projects/*/locations/-` list memberships in all the regions.
8889 func (r *ProjectsLocationsMembershipsService) List(parent string) *ProjectsLocationsMembershipsListCall {
8890 c := &ProjectsLocationsMembershipsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8891 c.parent = parent
8892 return c
8893 }
8894
8895 // Filter sets the optional parameter "filter": Lists Memberships that match
8896 // the filter expression, following the syntax outlined in
8897 // https://google.aip.dev/160. Examples: - Name is `bar` in project `foo-proj`
8898 // and location `global`: name =
8899 // "projects/foo-proj/locations/global/membership/bar" - Memberships that have
8900 // a label called `foo`: labels.foo:* - Memberships that have a label called
8901 // `foo` whose value is `bar`: labels.foo = bar - Memberships in the CREATING
8902 // state: state = CREATING
8903 func (c *ProjectsLocationsMembershipsListCall) Filter(filter string) *ProjectsLocationsMembershipsListCall {
8904 c.urlParams_.Set("filter", filter)
8905 return c
8906 }
8907
8908 // OrderBy sets the optional parameter "orderBy": One or more fields to compare
8909 // and use to sort the output. See https://google.aip.dev/132#ordering.
8910 func (c *ProjectsLocationsMembershipsListCall) OrderBy(orderBy string) *ProjectsLocationsMembershipsListCall {
8911 c.urlParams_.Set("orderBy", orderBy)
8912 return c
8913 }
8914
8915 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
8916 // resources, `page_size` specifies number of resources to return. If
8917 // unspecified or set to 0, all resources will be returned.
8918 func (c *ProjectsLocationsMembershipsListCall) PageSize(pageSize int64) *ProjectsLocationsMembershipsListCall {
8919 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8920 return c
8921 }
8922
8923 // PageToken sets the optional parameter "pageToken": Token returned by
8924 // previous call to `ListMemberships` which specifies the position in the list
8925 // from where to continue listing the resources.
8926 func (c *ProjectsLocationsMembershipsListCall) PageToken(pageToken string) *ProjectsLocationsMembershipsListCall {
8927 c.urlParams_.Set("pageToken", pageToken)
8928 return c
8929 }
8930
8931 // Fields allows partial responses to be retrieved. See
8932 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8933 // details.
8934 func (c *ProjectsLocationsMembershipsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsListCall {
8935 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8936 return c
8937 }
8938
8939 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8940 // object's ETag matches the given value. This is useful for getting updates
8941 // only after the object has changed since the last request.
8942 func (c *ProjectsLocationsMembershipsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsListCall {
8943 c.ifNoneMatch_ = entityTag
8944 return c
8945 }
8946
8947 // Context sets the context to be used in this call's Do method.
8948 func (c *ProjectsLocationsMembershipsListCall) Context(ctx context.Context) *ProjectsLocationsMembershipsListCall {
8949 c.ctx_ = ctx
8950 return c
8951 }
8952
8953 // Header returns a http.Header that can be modified by the caller to add
8954 // headers to the request.
8955 func (c *ProjectsLocationsMembershipsListCall) Header() http.Header {
8956 if c.header_ == nil {
8957 c.header_ = make(http.Header)
8958 }
8959 return c.header_
8960 }
8961
8962 func (c *ProjectsLocationsMembershipsListCall) doRequest(alt string) (*http.Response, error) {
8963 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8964 if c.ifNoneMatch_ != "" {
8965 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8966 }
8967 c.urlParams_.Set("alt", alt)
8968 c.urlParams_.Set("prettyPrint", "false")
8969 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/memberships")
8970 urls += "?" + c.urlParams_.Encode()
8971 req, err := http.NewRequest("GET", urls, nil)
8972 if err != nil {
8973 return nil, err
8974 }
8975 req.Header = reqHeaders
8976 googleapi.Expand(req.URL, map[string]string{
8977 "parent": c.parent,
8978 })
8979 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.list", "request", internallog.HTTPRequest(req, nil))
8980 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8981 }
8982
8983 // Do executes the "gkehub.projects.locations.memberships.list" call.
8984 // Any non-2xx status code is an error. Response headers are in either
8985 // *ListMembershipsResponse.ServerResponse.Header or (if a response was
8986 // returned at all) in error.(*googleapi.Error).Header. Use
8987 // googleapi.IsNotModified to check whether the returned error was because
8988 // http.StatusNotModified was returned.
8989 func (c *ProjectsLocationsMembershipsListCall) Do(opts ...googleapi.CallOption) (*ListMembershipsResponse, error) {
8990 gensupport.SetOptions(c.urlParams_, opts...)
8991 res, err := c.doRequest("json")
8992 if res != nil && res.StatusCode == http.StatusNotModified {
8993 if res.Body != nil {
8994 res.Body.Close()
8995 }
8996 return nil, gensupport.WrapError(&googleapi.Error{
8997 Code: res.StatusCode,
8998 Header: res.Header,
8999 })
9000 }
9001 if err != nil {
9002 return nil, err
9003 }
9004 defer googleapi.CloseBody(res)
9005 if err := googleapi.CheckResponse(res); err != nil {
9006 return nil, gensupport.WrapError(err)
9007 }
9008 ret := &ListMembershipsResponse{
9009 ServerResponse: googleapi.ServerResponse{
9010 Header: res.Header,
9011 HTTPStatusCode: res.StatusCode,
9012 },
9013 }
9014 target := &ret
9015 b, err := gensupport.DecodeResponseBytes(target, res)
9016 if err != nil {
9017 return nil, err
9018 }
9019 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.list", "response", internallog.HTTPResponse(res, b))
9020 return ret, nil
9021 }
9022
9023 // Pages invokes f for each page of results.
9024 // A non-nil error returned from f will halt the iteration.
9025 // The provided context supersedes any context provided to the Context method.
9026 func (c *ProjectsLocationsMembershipsListCall) Pages(ctx context.Context, f func(*ListMembershipsResponse) error) error {
9027 c.ctx_ = ctx
9028 defer c.PageToken(c.urlParams_.Get("pageToken"))
9029 for {
9030 x, err := c.Do()
9031 if err != nil {
9032 return err
9033 }
9034 if err := f(x); err != nil {
9035 return err
9036 }
9037 if x.NextPageToken == "" {
9038 return nil
9039 }
9040 c.PageToken(x.NextPageToken)
9041 }
9042 }
9043
9044 type ProjectsLocationsMembershipsPatchCall struct {
9045 s *Service
9046 name string
9047 membership *Membership
9048 urlParams_ gensupport.URLParams
9049 ctx_ context.Context
9050 header_ http.Header
9051 }
9052
9053 // Patch: Updates an existing Membership.
9054 //
9055 // - name: The Membership resource name in the format
9056 // `projects/*/locations/*/memberships/*`.
9057 func (r *ProjectsLocationsMembershipsService) Patch(name string, membership *Membership) *ProjectsLocationsMembershipsPatchCall {
9058 c := &ProjectsLocationsMembershipsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9059 c.name = name
9060 c.membership = membership
9061 return c
9062 }
9063
9064 // RequestId sets the optional parameter "requestId": A request ID to identify
9065 // requests. Specify a unique request ID so that if you must retry your
9066 // request, the server will know to ignore the request if it has already been
9067 // completed. The server will guarantee that for at least 60 minutes after the
9068 // first request. For example, consider a situation where you make an initial
9069 // request and the request times out. If you make the request again with the
9070 // same request ID, the server can check if original operation with the same
9071 // request ID was received, and if so, will ignore the second request. This
9072 // prevents clients from accidentally creating duplicate commitments. The
9073 // request ID must be a valid UUID with the exception that zero UUID is not
9074 // supported (00000000-0000-0000-0000-000000000000).
9075 func (c *ProjectsLocationsMembershipsPatchCall) RequestId(requestId string) *ProjectsLocationsMembershipsPatchCall {
9076 c.urlParams_.Set("requestId", requestId)
9077 return c
9078 }
9079
9080 // UpdateMask sets the optional parameter "updateMask": Required. Mask of
9081 // fields to update.
9082 func (c *ProjectsLocationsMembershipsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMembershipsPatchCall {
9083 c.urlParams_.Set("updateMask", updateMask)
9084 return c
9085 }
9086
9087 // Fields allows partial responses to be retrieved. See
9088 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9089 // details.
9090 func (c *ProjectsLocationsMembershipsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsPatchCall {
9091 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9092 return c
9093 }
9094
9095 // Context sets the context to be used in this call's Do method.
9096 func (c *ProjectsLocationsMembershipsPatchCall) Context(ctx context.Context) *ProjectsLocationsMembershipsPatchCall {
9097 c.ctx_ = ctx
9098 return c
9099 }
9100
9101 // Header returns a http.Header that can be modified by the caller to add
9102 // headers to the request.
9103 func (c *ProjectsLocationsMembershipsPatchCall) Header() http.Header {
9104 if c.header_ == nil {
9105 c.header_ = make(http.Header)
9106 }
9107 return c.header_
9108 }
9109
9110 func (c *ProjectsLocationsMembershipsPatchCall) doRequest(alt string) (*http.Response, error) {
9111 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9112 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.membership)
9113 if err != nil {
9114 return nil, err
9115 }
9116 c.urlParams_.Set("alt", alt)
9117 c.urlParams_.Set("prettyPrint", "false")
9118 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9119 urls += "?" + c.urlParams_.Encode()
9120 req, err := http.NewRequest("PATCH", urls, body)
9121 if err != nil {
9122 return nil, err
9123 }
9124 req.Header = reqHeaders
9125 googleapi.Expand(req.URL, map[string]string{
9126 "name": c.name,
9127 })
9128 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
9129 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9130 }
9131
9132 // Do executes the "gkehub.projects.locations.memberships.patch" call.
9133 // Any non-2xx status code is an error. Response headers are in either
9134 // *Operation.ServerResponse.Header or (if a response was returned at all) in
9135 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9136 // whether the returned error was because http.StatusNotModified was returned.
9137 func (c *ProjectsLocationsMembershipsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9138 gensupport.SetOptions(c.urlParams_, opts...)
9139 res, err := c.doRequest("json")
9140 if res != nil && res.StatusCode == http.StatusNotModified {
9141 if res.Body != nil {
9142 res.Body.Close()
9143 }
9144 return nil, gensupport.WrapError(&googleapi.Error{
9145 Code: res.StatusCode,
9146 Header: res.Header,
9147 })
9148 }
9149 if err != nil {
9150 return nil, err
9151 }
9152 defer googleapi.CloseBody(res)
9153 if err := googleapi.CheckResponse(res); err != nil {
9154 return nil, gensupport.WrapError(err)
9155 }
9156 ret := &Operation{
9157 ServerResponse: googleapi.ServerResponse{
9158 Header: res.Header,
9159 HTTPStatusCode: res.StatusCode,
9160 },
9161 }
9162 target := &ret
9163 b, err := gensupport.DecodeResponseBytes(target, res)
9164 if err != nil {
9165 return nil, err
9166 }
9167 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.patch", "response", internallog.HTTPResponse(res, b))
9168 return ret, nil
9169 }
9170
9171 type ProjectsLocationsMembershipsSetIamPolicyCall struct {
9172 s *Service
9173 resource string
9174 setiampolicyrequest *SetIamPolicyRequest
9175 urlParams_ gensupport.URLParams
9176 ctx_ context.Context
9177 header_ http.Header
9178 }
9179
9180 // SetIamPolicy: Sets the access control policy on the specified resource.
9181 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
9182 // and `PERMISSION_DENIED` errors.
9183 //
9184 // - resource: REQUIRED: The resource for which the policy is being specified.
9185 // See Resource names (https://cloud.google.com/apis/design/resource_names)
9186 // for the appropriate value for this field.
9187 func (r *ProjectsLocationsMembershipsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsMembershipsSetIamPolicyCall {
9188 c := &ProjectsLocationsMembershipsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9189 c.resource = resource
9190 c.setiampolicyrequest = setiampolicyrequest
9191 return c
9192 }
9193
9194 // Fields allows partial responses to be retrieved. See
9195 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9196 // details.
9197 func (c *ProjectsLocationsMembershipsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsSetIamPolicyCall {
9198 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9199 return c
9200 }
9201
9202 // Context sets the context to be used in this call's Do method.
9203 func (c *ProjectsLocationsMembershipsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMembershipsSetIamPolicyCall {
9204 c.ctx_ = ctx
9205 return c
9206 }
9207
9208 // Header returns a http.Header that can be modified by the caller to add
9209 // headers to the request.
9210 func (c *ProjectsLocationsMembershipsSetIamPolicyCall) Header() http.Header {
9211 if c.header_ == nil {
9212 c.header_ = make(http.Header)
9213 }
9214 return c.header_
9215 }
9216
9217 func (c *ProjectsLocationsMembershipsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9218 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9219 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
9220 if err != nil {
9221 return nil, err
9222 }
9223 c.urlParams_.Set("alt", alt)
9224 c.urlParams_.Set("prettyPrint", "false")
9225 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
9226 urls += "?" + c.urlParams_.Encode()
9227 req, err := http.NewRequest("POST", urls, body)
9228 if err != nil {
9229 return nil, err
9230 }
9231 req.Header = reqHeaders
9232 googleapi.Expand(req.URL, map[string]string{
9233 "resource": c.resource,
9234 })
9235 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
9236 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9237 }
9238
9239 // Do executes the "gkehub.projects.locations.memberships.setIamPolicy" call.
9240 // Any non-2xx status code is an error. Response headers are in either
9241 // *Policy.ServerResponse.Header or (if a response was returned at all) in
9242 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9243 // whether the returned error was because http.StatusNotModified was returned.
9244 func (c *ProjectsLocationsMembershipsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
9245 gensupport.SetOptions(c.urlParams_, opts...)
9246 res, err := c.doRequest("json")
9247 if res != nil && res.StatusCode == http.StatusNotModified {
9248 if res.Body != nil {
9249 res.Body.Close()
9250 }
9251 return nil, gensupport.WrapError(&googleapi.Error{
9252 Code: res.StatusCode,
9253 Header: res.Header,
9254 })
9255 }
9256 if err != nil {
9257 return nil, err
9258 }
9259 defer googleapi.CloseBody(res)
9260 if err := googleapi.CheckResponse(res); err != nil {
9261 return nil, gensupport.WrapError(err)
9262 }
9263 ret := &Policy{
9264 ServerResponse: googleapi.ServerResponse{
9265 Header: res.Header,
9266 HTTPStatusCode: res.StatusCode,
9267 },
9268 }
9269 target := &ret
9270 b, err := gensupport.DecodeResponseBytes(target, res)
9271 if err != nil {
9272 return nil, err
9273 }
9274 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.setIamPolicy", "response", internallog.HTTPResponse(res, b))
9275 return ret, nil
9276 }
9277
9278 type ProjectsLocationsMembershipsTestIamPermissionsCall struct {
9279 s *Service
9280 resource string
9281 testiampermissionsrequest *TestIamPermissionsRequest
9282 urlParams_ gensupport.URLParams
9283 ctx_ context.Context
9284 header_ http.Header
9285 }
9286
9287 // TestIamPermissions: Returns permissions that a caller has on the specified
9288 // resource. If the resource does not exist, this will return an empty set of
9289 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
9290 // used for building permission-aware UIs and command-line tools, not for
9291 // authorization checking. This operation may "fail open" without warning.
9292 //
9293 // - resource: REQUIRED: The resource for which the policy detail is being
9294 // requested. See Resource names
9295 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
9296 // value for this field.
9297 func (r *ProjectsLocationsMembershipsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsMembershipsTestIamPermissionsCall {
9298 c := &ProjectsLocationsMembershipsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9299 c.resource = resource
9300 c.testiampermissionsrequest = testiampermissionsrequest
9301 return c
9302 }
9303
9304 // Fields allows partial responses to be retrieved. See
9305 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9306 // details.
9307 func (c *ProjectsLocationsMembershipsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsTestIamPermissionsCall {
9308 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9309 return c
9310 }
9311
9312 // Context sets the context to be used in this call's Do method.
9313 func (c *ProjectsLocationsMembershipsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsMembershipsTestIamPermissionsCall {
9314 c.ctx_ = ctx
9315 return c
9316 }
9317
9318 // Header returns a http.Header that can be modified by the caller to add
9319 // headers to the request.
9320 func (c *ProjectsLocationsMembershipsTestIamPermissionsCall) Header() http.Header {
9321 if c.header_ == nil {
9322 c.header_ = make(http.Header)
9323 }
9324 return c.header_
9325 }
9326
9327 func (c *ProjectsLocationsMembershipsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
9328 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9329 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
9330 if err != nil {
9331 return nil, err
9332 }
9333 c.urlParams_.Set("alt", alt)
9334 c.urlParams_.Set("prettyPrint", "false")
9335 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
9336 urls += "?" + c.urlParams_.Encode()
9337 req, err := http.NewRequest("POST", urls, body)
9338 if err != nil {
9339 return nil, err
9340 }
9341 req.Header = reqHeaders
9342 googleapi.Expand(req.URL, map[string]string{
9343 "resource": c.resource,
9344 })
9345 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
9346 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9347 }
9348
9349 // Do executes the "gkehub.projects.locations.memberships.testIamPermissions" call.
9350 // Any non-2xx status code is an error. Response headers are in either
9351 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
9352 // returned at all) in error.(*googleapi.Error).Header. Use
9353 // googleapi.IsNotModified to check whether the returned error was because
9354 // http.StatusNotModified was returned.
9355 func (c *ProjectsLocationsMembershipsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
9356 gensupport.SetOptions(c.urlParams_, opts...)
9357 res, err := c.doRequest("json")
9358 if res != nil && res.StatusCode == http.StatusNotModified {
9359 if res.Body != nil {
9360 res.Body.Close()
9361 }
9362 return nil, gensupport.WrapError(&googleapi.Error{
9363 Code: res.StatusCode,
9364 Header: res.Header,
9365 })
9366 }
9367 if err != nil {
9368 return nil, err
9369 }
9370 defer googleapi.CloseBody(res)
9371 if err := googleapi.CheckResponse(res); err != nil {
9372 return nil, gensupport.WrapError(err)
9373 }
9374 ret := &TestIamPermissionsResponse{
9375 ServerResponse: googleapi.ServerResponse{
9376 Header: res.Header,
9377 HTTPStatusCode: res.StatusCode,
9378 },
9379 }
9380 target := &ret
9381 b, err := gensupport.DecodeResponseBytes(target, res)
9382 if err != nil {
9383 return nil, err
9384 }
9385 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.testIamPermissions", "response", internallog.HTTPResponse(res, b))
9386 return ret, nil
9387 }
9388
9389 type ProjectsLocationsMembershipsBindingsCreateCall struct {
9390 s *Service
9391 parent string
9392 membershipbinding *MembershipBinding
9393 urlParams_ gensupport.URLParams
9394 ctx_ context.Context
9395 header_ http.Header
9396 }
9397
9398 // Create: Creates a MembershipBinding.
9399 //
9400 // - parent: The parent (project and location) where the MembershipBinding will
9401 // be created. Specified in the format
9402 // `projects/*/locations/*/memberships/*`.
9403 func (r *ProjectsLocationsMembershipsBindingsService) Create(parent string, membershipbinding *MembershipBinding) *ProjectsLocationsMembershipsBindingsCreateCall {
9404 c := &ProjectsLocationsMembershipsBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9405 c.parent = parent
9406 c.membershipbinding = membershipbinding
9407 return c
9408 }
9409
9410 // MembershipBindingId sets the optional parameter "membershipBindingId":
9411 // Required. The ID to use for the MembershipBinding.
9412 func (c *ProjectsLocationsMembershipsBindingsCreateCall) MembershipBindingId(membershipBindingId string) *ProjectsLocationsMembershipsBindingsCreateCall {
9413 c.urlParams_.Set("membershipBindingId", membershipBindingId)
9414 return c
9415 }
9416
9417 // Fields allows partial responses to be retrieved. See
9418 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9419 // details.
9420 func (c *ProjectsLocationsMembershipsBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsBindingsCreateCall {
9421 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9422 return c
9423 }
9424
9425 // Context sets the context to be used in this call's Do method.
9426 func (c *ProjectsLocationsMembershipsBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsMembershipsBindingsCreateCall {
9427 c.ctx_ = ctx
9428 return c
9429 }
9430
9431 // Header returns a http.Header that can be modified by the caller to add
9432 // headers to the request.
9433 func (c *ProjectsLocationsMembershipsBindingsCreateCall) Header() http.Header {
9434 if c.header_ == nil {
9435 c.header_ = make(http.Header)
9436 }
9437 return c.header_
9438 }
9439
9440 func (c *ProjectsLocationsMembershipsBindingsCreateCall) doRequest(alt string) (*http.Response, error) {
9441 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9442 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.membershipbinding)
9443 if err != nil {
9444 return nil, err
9445 }
9446 c.urlParams_.Set("alt", alt)
9447 c.urlParams_.Set("prettyPrint", "false")
9448 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/bindings")
9449 urls += "?" + c.urlParams_.Encode()
9450 req, err := http.NewRequest("POST", urls, body)
9451 if err != nil {
9452 return nil, err
9453 }
9454 req.Header = reqHeaders
9455 googleapi.Expand(req.URL, map[string]string{
9456 "parent": c.parent,
9457 })
9458 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.create", "request", internallog.HTTPRequest(req, body.Bytes()))
9459 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9460 }
9461
9462 // Do executes the "gkehub.projects.locations.memberships.bindings.create" call.
9463 // Any non-2xx status code is an error. Response headers are in either
9464 // *Operation.ServerResponse.Header or (if a response was returned at all) in
9465 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9466 // whether the returned error was because http.StatusNotModified was returned.
9467 func (c *ProjectsLocationsMembershipsBindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9468 gensupport.SetOptions(c.urlParams_, opts...)
9469 res, err := c.doRequest("json")
9470 if res != nil && res.StatusCode == http.StatusNotModified {
9471 if res.Body != nil {
9472 res.Body.Close()
9473 }
9474 return nil, gensupport.WrapError(&googleapi.Error{
9475 Code: res.StatusCode,
9476 Header: res.Header,
9477 })
9478 }
9479 if err != nil {
9480 return nil, err
9481 }
9482 defer googleapi.CloseBody(res)
9483 if err := googleapi.CheckResponse(res); err != nil {
9484 return nil, gensupport.WrapError(err)
9485 }
9486 ret := &Operation{
9487 ServerResponse: googleapi.ServerResponse{
9488 Header: res.Header,
9489 HTTPStatusCode: res.StatusCode,
9490 },
9491 }
9492 target := &ret
9493 b, err := gensupport.DecodeResponseBytes(target, res)
9494 if err != nil {
9495 return nil, err
9496 }
9497 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.create", "response", internallog.HTTPResponse(res, b))
9498 return ret, nil
9499 }
9500
9501 type ProjectsLocationsMembershipsBindingsDeleteCall struct {
9502 s *Service
9503 name string
9504 urlParams_ gensupport.URLParams
9505 ctx_ context.Context
9506 header_ http.Header
9507 }
9508
9509 // Delete: Deletes a MembershipBinding.
9510 //
9511 // - name: The MembershipBinding resource name in the format
9512 // `projects/*/locations/*/memberships/*/bindings/*`.
9513 func (r *ProjectsLocationsMembershipsBindingsService) Delete(name string) *ProjectsLocationsMembershipsBindingsDeleteCall {
9514 c := &ProjectsLocationsMembershipsBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9515 c.name = name
9516 return c
9517 }
9518
9519 // Fields allows partial responses to be retrieved. See
9520 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9521 // details.
9522 func (c *ProjectsLocationsMembershipsBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsBindingsDeleteCall {
9523 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9524 return c
9525 }
9526
9527 // Context sets the context to be used in this call's Do method.
9528 func (c *ProjectsLocationsMembershipsBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMembershipsBindingsDeleteCall {
9529 c.ctx_ = ctx
9530 return c
9531 }
9532
9533 // Header returns a http.Header that can be modified by the caller to add
9534 // headers to the request.
9535 func (c *ProjectsLocationsMembershipsBindingsDeleteCall) Header() http.Header {
9536 if c.header_ == nil {
9537 c.header_ = make(http.Header)
9538 }
9539 return c.header_
9540 }
9541
9542 func (c *ProjectsLocationsMembershipsBindingsDeleteCall) doRequest(alt string) (*http.Response, error) {
9543 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9544 c.urlParams_.Set("alt", alt)
9545 c.urlParams_.Set("prettyPrint", "false")
9546 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9547 urls += "?" + c.urlParams_.Encode()
9548 req, err := http.NewRequest("DELETE", urls, nil)
9549 if err != nil {
9550 return nil, err
9551 }
9552 req.Header = reqHeaders
9553 googleapi.Expand(req.URL, map[string]string{
9554 "name": c.name,
9555 })
9556 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.delete", "request", internallog.HTTPRequest(req, nil))
9557 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9558 }
9559
9560 // Do executes the "gkehub.projects.locations.memberships.bindings.delete" call.
9561 // Any non-2xx status code is an error. Response headers are in either
9562 // *Operation.ServerResponse.Header or (if a response was returned at all) in
9563 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9564 // whether the returned error was because http.StatusNotModified was returned.
9565 func (c *ProjectsLocationsMembershipsBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9566 gensupport.SetOptions(c.urlParams_, opts...)
9567 res, err := c.doRequest("json")
9568 if res != nil && res.StatusCode == http.StatusNotModified {
9569 if res.Body != nil {
9570 res.Body.Close()
9571 }
9572 return nil, gensupport.WrapError(&googleapi.Error{
9573 Code: res.StatusCode,
9574 Header: res.Header,
9575 })
9576 }
9577 if err != nil {
9578 return nil, err
9579 }
9580 defer googleapi.CloseBody(res)
9581 if err := googleapi.CheckResponse(res); err != nil {
9582 return nil, gensupport.WrapError(err)
9583 }
9584 ret := &Operation{
9585 ServerResponse: googleapi.ServerResponse{
9586 Header: res.Header,
9587 HTTPStatusCode: res.StatusCode,
9588 },
9589 }
9590 target := &ret
9591 b, err := gensupport.DecodeResponseBytes(target, res)
9592 if err != nil {
9593 return nil, err
9594 }
9595 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.delete", "response", internallog.HTTPResponse(res, b))
9596 return ret, nil
9597 }
9598
9599 type ProjectsLocationsMembershipsBindingsGetCall struct {
9600 s *Service
9601 name string
9602 urlParams_ gensupport.URLParams
9603 ifNoneMatch_ string
9604 ctx_ context.Context
9605 header_ http.Header
9606 }
9607
9608 // Get: Returns the details of a MembershipBinding.
9609 //
9610 // - name: The MembershipBinding resource name in the format
9611 // `projects/*/locations/*/memberships/*/bindings/*`.
9612 func (r *ProjectsLocationsMembershipsBindingsService) Get(name string) *ProjectsLocationsMembershipsBindingsGetCall {
9613 c := &ProjectsLocationsMembershipsBindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9614 c.name = name
9615 return c
9616 }
9617
9618 // Fields allows partial responses to be retrieved. See
9619 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9620 // details.
9621 func (c *ProjectsLocationsMembershipsBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsBindingsGetCall {
9622 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9623 return c
9624 }
9625
9626 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9627 // object's ETag matches the given value. This is useful for getting updates
9628 // only after the object has changed since the last request.
9629 func (c *ProjectsLocationsMembershipsBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsBindingsGetCall {
9630 c.ifNoneMatch_ = entityTag
9631 return c
9632 }
9633
9634 // Context sets the context to be used in this call's Do method.
9635 func (c *ProjectsLocationsMembershipsBindingsGetCall) Context(ctx context.Context) *ProjectsLocationsMembershipsBindingsGetCall {
9636 c.ctx_ = ctx
9637 return c
9638 }
9639
9640 // Header returns a http.Header that can be modified by the caller to add
9641 // headers to the request.
9642 func (c *ProjectsLocationsMembershipsBindingsGetCall) Header() http.Header {
9643 if c.header_ == nil {
9644 c.header_ = make(http.Header)
9645 }
9646 return c.header_
9647 }
9648
9649 func (c *ProjectsLocationsMembershipsBindingsGetCall) doRequest(alt string) (*http.Response, error) {
9650 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9651 if c.ifNoneMatch_ != "" {
9652 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9653 }
9654 c.urlParams_.Set("alt", alt)
9655 c.urlParams_.Set("prettyPrint", "false")
9656 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9657 urls += "?" + c.urlParams_.Encode()
9658 req, err := http.NewRequest("GET", urls, nil)
9659 if err != nil {
9660 return nil, err
9661 }
9662 req.Header = reqHeaders
9663 googleapi.Expand(req.URL, map[string]string{
9664 "name": c.name,
9665 })
9666 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.get", "request", internallog.HTTPRequest(req, nil))
9667 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9668 }
9669
9670 // Do executes the "gkehub.projects.locations.memberships.bindings.get" call.
9671 // Any non-2xx status code is an error. Response headers are in either
9672 // *MembershipBinding.ServerResponse.Header or (if a response was returned at
9673 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9674 // check whether the returned error was because http.StatusNotModified was
9675 // returned.
9676 func (c *ProjectsLocationsMembershipsBindingsGetCall) Do(opts ...googleapi.CallOption) (*MembershipBinding, error) {
9677 gensupport.SetOptions(c.urlParams_, opts...)
9678 res, err := c.doRequest("json")
9679 if res != nil && res.StatusCode == http.StatusNotModified {
9680 if res.Body != nil {
9681 res.Body.Close()
9682 }
9683 return nil, gensupport.WrapError(&googleapi.Error{
9684 Code: res.StatusCode,
9685 Header: res.Header,
9686 })
9687 }
9688 if err != nil {
9689 return nil, err
9690 }
9691 defer googleapi.CloseBody(res)
9692 if err := googleapi.CheckResponse(res); err != nil {
9693 return nil, gensupport.WrapError(err)
9694 }
9695 ret := &MembershipBinding{
9696 ServerResponse: googleapi.ServerResponse{
9697 Header: res.Header,
9698 HTTPStatusCode: res.StatusCode,
9699 },
9700 }
9701 target := &ret
9702 b, err := gensupport.DecodeResponseBytes(target, res)
9703 if err != nil {
9704 return nil, err
9705 }
9706 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.get", "response", internallog.HTTPResponse(res, b))
9707 return ret, nil
9708 }
9709
9710 type ProjectsLocationsMembershipsBindingsListCall struct {
9711 s *Service
9712 parent string
9713 urlParams_ gensupport.URLParams
9714 ifNoneMatch_ string
9715 ctx_ context.Context
9716 header_ http.Header
9717 }
9718
9719 // List: Lists MembershipBindings.
9720 //
9721 // - parent: The parent Membership for which the MembershipBindings will be
9722 // listed. Specified in the format `projects/*/locations/*/memberships/*`.
9723 func (r *ProjectsLocationsMembershipsBindingsService) List(parent string) *ProjectsLocationsMembershipsBindingsListCall {
9724 c := &ProjectsLocationsMembershipsBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9725 c.parent = parent
9726 return c
9727 }
9728
9729 // Filter sets the optional parameter "filter": Lists MembershipBindings that
9730 // match the filter expression, following the syntax outlined in
9731 // https://google.aip.dev/160.
9732 func (c *ProjectsLocationsMembershipsBindingsListCall) Filter(filter string) *ProjectsLocationsMembershipsBindingsListCall {
9733 c.urlParams_.Set("filter", filter)
9734 return c
9735 }
9736
9737 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
9738 // resources, `page_size` specifies number of resources to return. If
9739 // unspecified or set to 0, all resources will be returned.
9740 func (c *ProjectsLocationsMembershipsBindingsListCall) PageSize(pageSize int64) *ProjectsLocationsMembershipsBindingsListCall {
9741 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9742 return c
9743 }
9744
9745 // PageToken sets the optional parameter "pageToken": Token returned by
9746 // previous call to `ListMembershipBindings` which specifies the position in
9747 // the list from where to continue listing the resources.
9748 func (c *ProjectsLocationsMembershipsBindingsListCall) PageToken(pageToken string) *ProjectsLocationsMembershipsBindingsListCall {
9749 c.urlParams_.Set("pageToken", pageToken)
9750 return c
9751 }
9752
9753 // Fields allows partial responses to be retrieved. See
9754 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9755 // details.
9756 func (c *ProjectsLocationsMembershipsBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsBindingsListCall {
9757 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9758 return c
9759 }
9760
9761 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9762 // object's ETag matches the given value. This is useful for getting updates
9763 // only after the object has changed since the last request.
9764 func (c *ProjectsLocationsMembershipsBindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsBindingsListCall {
9765 c.ifNoneMatch_ = entityTag
9766 return c
9767 }
9768
9769 // Context sets the context to be used in this call's Do method.
9770 func (c *ProjectsLocationsMembershipsBindingsListCall) Context(ctx context.Context) *ProjectsLocationsMembershipsBindingsListCall {
9771 c.ctx_ = ctx
9772 return c
9773 }
9774
9775 // Header returns a http.Header that can be modified by the caller to add
9776 // headers to the request.
9777 func (c *ProjectsLocationsMembershipsBindingsListCall) Header() http.Header {
9778 if c.header_ == nil {
9779 c.header_ = make(http.Header)
9780 }
9781 return c.header_
9782 }
9783
9784 func (c *ProjectsLocationsMembershipsBindingsListCall) doRequest(alt string) (*http.Response, error) {
9785 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9786 if c.ifNoneMatch_ != "" {
9787 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9788 }
9789 c.urlParams_.Set("alt", alt)
9790 c.urlParams_.Set("prettyPrint", "false")
9791 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/bindings")
9792 urls += "?" + c.urlParams_.Encode()
9793 req, err := http.NewRequest("GET", urls, nil)
9794 if err != nil {
9795 return nil, err
9796 }
9797 req.Header = reqHeaders
9798 googleapi.Expand(req.URL, map[string]string{
9799 "parent": c.parent,
9800 })
9801 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.list", "request", internallog.HTTPRequest(req, nil))
9802 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9803 }
9804
9805 // Do executes the "gkehub.projects.locations.memberships.bindings.list" call.
9806 // Any non-2xx status code is an error. Response headers are in either
9807 // *ListMembershipBindingsResponse.ServerResponse.Header or (if a response was
9808 // returned at all) in error.(*googleapi.Error).Header. Use
9809 // googleapi.IsNotModified to check whether the returned error was because
9810 // http.StatusNotModified was returned.
9811 func (c *ProjectsLocationsMembershipsBindingsListCall) Do(opts ...googleapi.CallOption) (*ListMembershipBindingsResponse, error) {
9812 gensupport.SetOptions(c.urlParams_, opts...)
9813 res, err := c.doRequest("json")
9814 if res != nil && res.StatusCode == http.StatusNotModified {
9815 if res.Body != nil {
9816 res.Body.Close()
9817 }
9818 return nil, gensupport.WrapError(&googleapi.Error{
9819 Code: res.StatusCode,
9820 Header: res.Header,
9821 })
9822 }
9823 if err != nil {
9824 return nil, err
9825 }
9826 defer googleapi.CloseBody(res)
9827 if err := googleapi.CheckResponse(res); err != nil {
9828 return nil, gensupport.WrapError(err)
9829 }
9830 ret := &ListMembershipBindingsResponse{
9831 ServerResponse: googleapi.ServerResponse{
9832 Header: res.Header,
9833 HTTPStatusCode: res.StatusCode,
9834 },
9835 }
9836 target := &ret
9837 b, err := gensupport.DecodeResponseBytes(target, res)
9838 if err != nil {
9839 return nil, err
9840 }
9841 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.list", "response", internallog.HTTPResponse(res, b))
9842 return ret, nil
9843 }
9844
9845 // Pages invokes f for each page of results.
9846 // A non-nil error returned from f will halt the iteration.
9847 // The provided context supersedes any context provided to the Context method.
9848 func (c *ProjectsLocationsMembershipsBindingsListCall) Pages(ctx context.Context, f func(*ListMembershipBindingsResponse) error) error {
9849 c.ctx_ = ctx
9850 defer c.PageToken(c.urlParams_.Get("pageToken"))
9851 for {
9852 x, err := c.Do()
9853 if err != nil {
9854 return err
9855 }
9856 if err := f(x); err != nil {
9857 return err
9858 }
9859 if x.NextPageToken == "" {
9860 return nil
9861 }
9862 c.PageToken(x.NextPageToken)
9863 }
9864 }
9865
9866 type ProjectsLocationsMembershipsBindingsPatchCall struct {
9867 s *Service
9868 name string
9869 membershipbinding *MembershipBinding
9870 urlParams_ gensupport.URLParams
9871 ctx_ context.Context
9872 header_ http.Header
9873 }
9874
9875 // Patch: Updates a MembershipBinding.
9876 //
9877 // - name: The resource name for the membershipbinding itself
9878 // `projects/{project}/locations/{location}/memberships/{membership}/bindings/
9879 // {membershipbinding}`.
9880 func (r *ProjectsLocationsMembershipsBindingsService) Patch(name string, membershipbinding *MembershipBinding) *ProjectsLocationsMembershipsBindingsPatchCall {
9881 c := &ProjectsLocationsMembershipsBindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9882 c.name = name
9883 c.membershipbinding = membershipbinding
9884 return c
9885 }
9886
9887 // UpdateMask sets the optional parameter "updateMask": Required. The fields to
9888 // be updated.
9889 func (c *ProjectsLocationsMembershipsBindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMembershipsBindingsPatchCall {
9890 c.urlParams_.Set("updateMask", updateMask)
9891 return c
9892 }
9893
9894 // Fields allows partial responses to be retrieved. See
9895 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9896 // details.
9897 func (c *ProjectsLocationsMembershipsBindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsBindingsPatchCall {
9898 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9899 return c
9900 }
9901
9902 // Context sets the context to be used in this call's Do method.
9903 func (c *ProjectsLocationsMembershipsBindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsMembershipsBindingsPatchCall {
9904 c.ctx_ = ctx
9905 return c
9906 }
9907
9908 // Header returns a http.Header that can be modified by the caller to add
9909 // headers to the request.
9910 func (c *ProjectsLocationsMembershipsBindingsPatchCall) Header() http.Header {
9911 if c.header_ == nil {
9912 c.header_ = make(http.Header)
9913 }
9914 return c.header_
9915 }
9916
9917 func (c *ProjectsLocationsMembershipsBindingsPatchCall) doRequest(alt string) (*http.Response, error) {
9918 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9919 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.membershipbinding)
9920 if err != nil {
9921 return nil, err
9922 }
9923 c.urlParams_.Set("alt", alt)
9924 c.urlParams_.Set("prettyPrint", "false")
9925 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9926 urls += "?" + c.urlParams_.Encode()
9927 req, err := http.NewRequest("PATCH", urls, body)
9928 if err != nil {
9929 return nil, err
9930 }
9931 req.Header = reqHeaders
9932 googleapi.Expand(req.URL, map[string]string{
9933 "name": c.name,
9934 })
9935 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
9936 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9937 }
9938
9939 // Do executes the "gkehub.projects.locations.memberships.bindings.patch" call.
9940 // Any non-2xx status code is an error. Response headers are in either
9941 // *Operation.ServerResponse.Header or (if a response was returned at all) in
9942 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9943 // whether the returned error was because http.StatusNotModified was returned.
9944 func (c *ProjectsLocationsMembershipsBindingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9945 gensupport.SetOptions(c.urlParams_, opts...)
9946 res, err := c.doRequest("json")
9947 if res != nil && res.StatusCode == http.StatusNotModified {
9948 if res.Body != nil {
9949 res.Body.Close()
9950 }
9951 return nil, gensupport.WrapError(&googleapi.Error{
9952 Code: res.StatusCode,
9953 Header: res.Header,
9954 })
9955 }
9956 if err != nil {
9957 return nil, err
9958 }
9959 defer googleapi.CloseBody(res)
9960 if err := googleapi.CheckResponse(res); err != nil {
9961 return nil, gensupport.WrapError(err)
9962 }
9963 ret := &Operation{
9964 ServerResponse: googleapi.ServerResponse{
9965 Header: res.Header,
9966 HTTPStatusCode: res.StatusCode,
9967 },
9968 }
9969 target := &ret
9970 b, err := gensupport.DecodeResponseBytes(target, res)
9971 if err != nil {
9972 return nil, err
9973 }
9974 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.bindings.patch", "response", internallog.HTTPResponse(res, b))
9975 return ret, nil
9976 }
9977
9978 type ProjectsLocationsMembershipsRbacrolebindingsCreateCall struct {
9979 s *Service
9980 parent string
9981 rbacrolebinding *RBACRoleBinding
9982 urlParams_ gensupport.URLParams
9983 ctx_ context.Context
9984 header_ http.Header
9985 }
9986
9987 // Create: Creates a Membership RBACRoleBinding.
9988 //
9989 // - parent: The parent (project and location) where the RBACRoleBinding will
9990 // be created. Specified in the format
9991 // `projects/*/locations/*/memberships/*`.
9992 func (r *ProjectsLocationsMembershipsRbacrolebindingsService) Create(parent string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsMembershipsRbacrolebindingsCreateCall {
9993 c := &ProjectsLocationsMembershipsRbacrolebindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9994 c.parent = parent
9995 c.rbacrolebinding = rbacrolebinding
9996 return c
9997 }
9998
9999 // RbacrolebindingId sets the optional parameter "rbacrolebindingId": Required.
10000 // Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a
10001 // valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It
10002 // must consist of lower case alphanumeric characters or `-` 3. It must start
10003 // and end with an alphanumeric character Which can be expressed as the regex:
10004 // `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
10005 func (c *ProjectsLocationsMembershipsRbacrolebindingsCreateCall) RbacrolebindingId(rbacrolebindingId string) *ProjectsLocationsMembershipsRbacrolebindingsCreateCall {
10006 c.urlParams_.Set("rbacrolebindingId", rbacrolebindingId)
10007 return c
10008 }
10009
10010 // Fields allows partial responses to be retrieved. See
10011 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10012 // details.
10013 func (c *ProjectsLocationsMembershipsRbacrolebindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsRbacrolebindingsCreateCall {
10014 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10015 return c
10016 }
10017
10018 // Context sets the context to be used in this call's Do method.
10019 func (c *ProjectsLocationsMembershipsRbacrolebindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsMembershipsRbacrolebindingsCreateCall {
10020 c.ctx_ = ctx
10021 return c
10022 }
10023
10024 // Header returns a http.Header that can be modified by the caller to add
10025 // headers to the request.
10026 func (c *ProjectsLocationsMembershipsRbacrolebindingsCreateCall) Header() http.Header {
10027 if c.header_ == nil {
10028 c.header_ = make(http.Header)
10029 }
10030 return c.header_
10031 }
10032
10033 func (c *ProjectsLocationsMembershipsRbacrolebindingsCreateCall) doRequest(alt string) (*http.Response, error) {
10034 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10035 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rbacrolebinding)
10036 if err != nil {
10037 return nil, err
10038 }
10039 c.urlParams_.Set("alt", alt)
10040 c.urlParams_.Set("prettyPrint", "false")
10041 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/rbacrolebindings")
10042 urls += "?" + c.urlParams_.Encode()
10043 req, err := http.NewRequest("POST", urls, body)
10044 if err != nil {
10045 return nil, err
10046 }
10047 req.Header = reqHeaders
10048 googleapi.Expand(req.URL, map[string]string{
10049 "parent": c.parent,
10050 })
10051 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.create", "request", internallog.HTTPRequest(req, body.Bytes()))
10052 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10053 }
10054
10055 // Do executes the "gkehub.projects.locations.memberships.rbacrolebindings.create" call.
10056 // Any non-2xx status code is an error. Response headers are in either
10057 // *Operation.ServerResponse.Header or (if a response was returned at all) in
10058 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10059 // whether the returned error was because http.StatusNotModified was returned.
10060 func (c *ProjectsLocationsMembershipsRbacrolebindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10061 gensupport.SetOptions(c.urlParams_, opts...)
10062 res, err := c.doRequest("json")
10063 if res != nil && res.StatusCode == http.StatusNotModified {
10064 if res.Body != nil {
10065 res.Body.Close()
10066 }
10067 return nil, gensupport.WrapError(&googleapi.Error{
10068 Code: res.StatusCode,
10069 Header: res.Header,
10070 })
10071 }
10072 if err != nil {
10073 return nil, err
10074 }
10075 defer googleapi.CloseBody(res)
10076 if err := googleapi.CheckResponse(res); err != nil {
10077 return nil, gensupport.WrapError(err)
10078 }
10079 ret := &Operation{
10080 ServerResponse: googleapi.ServerResponse{
10081 Header: res.Header,
10082 HTTPStatusCode: res.StatusCode,
10083 },
10084 }
10085 target := &ret
10086 b, err := gensupport.DecodeResponseBytes(target, res)
10087 if err != nil {
10088 return nil, err
10089 }
10090 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.create", "response", internallog.HTTPResponse(res, b))
10091 return ret, nil
10092 }
10093
10094 type ProjectsLocationsMembershipsRbacrolebindingsDeleteCall struct {
10095 s *Service
10096 name string
10097 urlParams_ gensupport.URLParams
10098 ctx_ context.Context
10099 header_ http.Header
10100 }
10101
10102 // Delete: Deletes a Membership RBACRoleBinding.
10103 //
10104 // - name: The RBACRoleBinding resource name in the format
10105 // `projects/*/locations/*/memberships/*/rbacrolebindings/*`.
10106 func (r *ProjectsLocationsMembershipsRbacrolebindingsService) Delete(name string) *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall {
10107 c := &ProjectsLocationsMembershipsRbacrolebindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10108 c.name = name
10109 return c
10110 }
10111
10112 // Fields allows partial responses to be retrieved. See
10113 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10114 // details.
10115 func (c *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall {
10116 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10117 return c
10118 }
10119
10120 // Context sets the context to be used in this call's Do method.
10121 func (c *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall {
10122 c.ctx_ = ctx
10123 return c
10124 }
10125
10126 // Header returns a http.Header that can be modified by the caller to add
10127 // headers to the request.
10128 func (c *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall) Header() http.Header {
10129 if c.header_ == nil {
10130 c.header_ = make(http.Header)
10131 }
10132 return c.header_
10133 }
10134
10135 func (c *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall) doRequest(alt string) (*http.Response, error) {
10136 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10137 c.urlParams_.Set("alt", alt)
10138 c.urlParams_.Set("prettyPrint", "false")
10139 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10140 urls += "?" + c.urlParams_.Encode()
10141 req, err := http.NewRequest("DELETE", urls, nil)
10142 if err != nil {
10143 return nil, err
10144 }
10145 req.Header = reqHeaders
10146 googleapi.Expand(req.URL, map[string]string{
10147 "name": c.name,
10148 })
10149 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.delete", "request", internallog.HTTPRequest(req, nil))
10150 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10151 }
10152
10153 // Do executes the "gkehub.projects.locations.memberships.rbacrolebindings.delete" call.
10154 // Any non-2xx status code is an error. Response headers are in either
10155 // *Operation.ServerResponse.Header or (if a response was returned at all) in
10156 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10157 // whether the returned error was because http.StatusNotModified was returned.
10158 func (c *ProjectsLocationsMembershipsRbacrolebindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10159 gensupport.SetOptions(c.urlParams_, opts...)
10160 res, err := c.doRequest("json")
10161 if res != nil && res.StatusCode == http.StatusNotModified {
10162 if res.Body != nil {
10163 res.Body.Close()
10164 }
10165 return nil, gensupport.WrapError(&googleapi.Error{
10166 Code: res.StatusCode,
10167 Header: res.Header,
10168 })
10169 }
10170 if err != nil {
10171 return nil, err
10172 }
10173 defer googleapi.CloseBody(res)
10174 if err := googleapi.CheckResponse(res); err != nil {
10175 return nil, gensupport.WrapError(err)
10176 }
10177 ret := &Operation{
10178 ServerResponse: googleapi.ServerResponse{
10179 Header: res.Header,
10180 HTTPStatusCode: res.StatusCode,
10181 },
10182 }
10183 target := &ret
10184 b, err := gensupport.DecodeResponseBytes(target, res)
10185 if err != nil {
10186 return nil, err
10187 }
10188 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.delete", "response", internallog.HTTPResponse(res, b))
10189 return ret, nil
10190 }
10191
10192 type ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall struct {
10193 s *Service
10194 parent string
10195 rbacrolebinding *RBACRoleBinding
10196 urlParams_ gensupport.URLParams
10197 ctx_ context.Context
10198 header_ http.Header
10199 }
10200
10201 // GenerateMembershipRBACRoleBindingYAML: Generates a YAML of the RBAC policies
10202 // for the specified RoleBinding and its associated impersonation resources.
10203 //
10204 // - parent: The parent (project and location) where the RBACRoleBinding will
10205 // be created. Specified in the format
10206 // `projects/*/locations/*/memberships/*`.
10207 func (r *ProjectsLocationsMembershipsRbacrolebindingsService) GenerateMembershipRBACRoleBindingYAML(parent string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall {
10208 c := &ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10209 c.parent = parent
10210 c.rbacrolebinding = rbacrolebinding
10211 return c
10212 }
10213
10214 // RbacrolebindingId sets the optional parameter "rbacrolebindingId": Required.
10215 // Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a
10216 // valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It
10217 // must consist of lower case alphanumeric characters or `-` 3. It must start
10218 // and end with an alphanumeric character Which can be expressed as the regex:
10219 // `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
10220 func (c *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall) RbacrolebindingId(rbacrolebindingId string) *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall {
10221 c.urlParams_.Set("rbacrolebindingId", rbacrolebindingId)
10222 return c
10223 }
10224
10225 // Fields allows partial responses to be retrieved. See
10226 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10227 // details.
10228 func (c *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall {
10229 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10230 return c
10231 }
10232
10233 // Context sets the context to be used in this call's Do method.
10234 func (c *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall) Context(ctx context.Context) *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall {
10235 c.ctx_ = ctx
10236 return c
10237 }
10238
10239 // Header returns a http.Header that can be modified by the caller to add
10240 // headers to the request.
10241 func (c *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall) Header() http.Header {
10242 if c.header_ == nil {
10243 c.header_ = make(http.Header)
10244 }
10245 return c.header_
10246 }
10247
10248 func (c *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall) doRequest(alt string) (*http.Response, error) {
10249 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10250 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rbacrolebinding)
10251 if err != nil {
10252 return nil, err
10253 }
10254 c.urlParams_.Set("alt", alt)
10255 c.urlParams_.Set("prettyPrint", "false")
10256 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/rbacrolebindings:generateMembershipRBACRoleBindingYAML")
10257 urls += "?" + c.urlParams_.Encode()
10258 req, err := http.NewRequest("POST", urls, body)
10259 if err != nil {
10260 return nil, err
10261 }
10262 req.Header = reqHeaders
10263 googleapi.Expand(req.URL, map[string]string{
10264 "parent": c.parent,
10265 })
10266 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.generateMembershipRBACRoleBindingYAML", "request", internallog.HTTPRequest(req, body.Bytes()))
10267 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10268 }
10269
10270 // Do executes the "gkehub.projects.locations.memberships.rbacrolebindings.generateMembershipRBACRoleBindingYAML" call.
10271 // Any non-2xx status code is an error. Response headers are in either
10272 // *GenerateMembershipRBACRoleBindingYAMLResponse.ServerResponse.Header or (if
10273 // a response was returned at all) in error.(*googleapi.Error).Header. Use
10274 // googleapi.IsNotModified to check whether the returned error was because
10275 // http.StatusNotModified was returned.
10276 func (c *ProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLCall) Do(opts ...googleapi.CallOption) (*GenerateMembershipRBACRoleBindingYAMLResponse, error) {
10277 gensupport.SetOptions(c.urlParams_, opts...)
10278 res, err := c.doRequest("json")
10279 if res != nil && res.StatusCode == http.StatusNotModified {
10280 if res.Body != nil {
10281 res.Body.Close()
10282 }
10283 return nil, gensupport.WrapError(&googleapi.Error{
10284 Code: res.StatusCode,
10285 Header: res.Header,
10286 })
10287 }
10288 if err != nil {
10289 return nil, err
10290 }
10291 defer googleapi.CloseBody(res)
10292 if err := googleapi.CheckResponse(res); err != nil {
10293 return nil, gensupport.WrapError(err)
10294 }
10295 ret := &GenerateMembershipRBACRoleBindingYAMLResponse{
10296 ServerResponse: googleapi.ServerResponse{
10297 Header: res.Header,
10298 HTTPStatusCode: res.StatusCode,
10299 },
10300 }
10301 target := &ret
10302 b, err := gensupport.DecodeResponseBytes(target, res)
10303 if err != nil {
10304 return nil, err
10305 }
10306 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.generateMembershipRBACRoleBindingYAML", "response", internallog.HTTPResponse(res, b))
10307 return ret, nil
10308 }
10309
10310 type ProjectsLocationsMembershipsRbacrolebindingsGetCall struct {
10311 s *Service
10312 name string
10313 urlParams_ gensupport.URLParams
10314 ifNoneMatch_ string
10315 ctx_ context.Context
10316 header_ http.Header
10317 }
10318
10319 // Get: Returns the details of a Membership RBACRoleBinding.
10320 //
10321 // - name: The RBACRoleBinding resource name in the format
10322 // `projects/*/locations/*/memberships/*/rbacrolebindings/*`.
10323 func (r *ProjectsLocationsMembershipsRbacrolebindingsService) Get(name string) *ProjectsLocationsMembershipsRbacrolebindingsGetCall {
10324 c := &ProjectsLocationsMembershipsRbacrolebindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10325 c.name = name
10326 return c
10327 }
10328
10329 // Fields allows partial responses to be retrieved. See
10330 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10331 // details.
10332 func (c *ProjectsLocationsMembershipsRbacrolebindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsRbacrolebindingsGetCall {
10333 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10334 return c
10335 }
10336
10337 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10338 // object's ETag matches the given value. This is useful for getting updates
10339 // only after the object has changed since the last request.
10340 func (c *ProjectsLocationsMembershipsRbacrolebindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsRbacrolebindingsGetCall {
10341 c.ifNoneMatch_ = entityTag
10342 return c
10343 }
10344
10345 // Context sets the context to be used in this call's Do method.
10346 func (c *ProjectsLocationsMembershipsRbacrolebindingsGetCall) Context(ctx context.Context) *ProjectsLocationsMembershipsRbacrolebindingsGetCall {
10347 c.ctx_ = ctx
10348 return c
10349 }
10350
10351 // Header returns a http.Header that can be modified by the caller to add
10352 // headers to the request.
10353 func (c *ProjectsLocationsMembershipsRbacrolebindingsGetCall) Header() http.Header {
10354 if c.header_ == nil {
10355 c.header_ = make(http.Header)
10356 }
10357 return c.header_
10358 }
10359
10360 func (c *ProjectsLocationsMembershipsRbacrolebindingsGetCall) doRequest(alt string) (*http.Response, error) {
10361 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10362 if c.ifNoneMatch_ != "" {
10363 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10364 }
10365 c.urlParams_.Set("alt", alt)
10366 c.urlParams_.Set("prettyPrint", "false")
10367 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10368 urls += "?" + c.urlParams_.Encode()
10369 req, err := http.NewRequest("GET", urls, nil)
10370 if err != nil {
10371 return nil, err
10372 }
10373 req.Header = reqHeaders
10374 googleapi.Expand(req.URL, map[string]string{
10375 "name": c.name,
10376 })
10377 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.get", "request", internallog.HTTPRequest(req, nil))
10378 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10379 }
10380
10381 // Do executes the "gkehub.projects.locations.memberships.rbacrolebindings.get" call.
10382 // Any non-2xx status code is an error. Response headers are in either
10383 // *RBACRoleBinding.ServerResponse.Header or (if a response was returned at
10384 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10385 // check whether the returned error was because http.StatusNotModified was
10386 // returned.
10387 func (c *ProjectsLocationsMembershipsRbacrolebindingsGetCall) Do(opts ...googleapi.CallOption) (*RBACRoleBinding, error) {
10388 gensupport.SetOptions(c.urlParams_, opts...)
10389 res, err := c.doRequest("json")
10390 if res != nil && res.StatusCode == http.StatusNotModified {
10391 if res.Body != nil {
10392 res.Body.Close()
10393 }
10394 return nil, gensupport.WrapError(&googleapi.Error{
10395 Code: res.StatusCode,
10396 Header: res.Header,
10397 })
10398 }
10399 if err != nil {
10400 return nil, err
10401 }
10402 defer googleapi.CloseBody(res)
10403 if err := googleapi.CheckResponse(res); err != nil {
10404 return nil, gensupport.WrapError(err)
10405 }
10406 ret := &RBACRoleBinding{
10407 ServerResponse: googleapi.ServerResponse{
10408 Header: res.Header,
10409 HTTPStatusCode: res.StatusCode,
10410 },
10411 }
10412 target := &ret
10413 b, err := gensupport.DecodeResponseBytes(target, res)
10414 if err != nil {
10415 return nil, err
10416 }
10417 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.get", "response", internallog.HTTPResponse(res, b))
10418 return ret, nil
10419 }
10420
10421 type ProjectsLocationsMembershipsRbacrolebindingsListCall struct {
10422 s *Service
10423 parent string
10424 urlParams_ gensupport.URLParams
10425 ifNoneMatch_ string
10426 ctx_ context.Context
10427 header_ http.Header
10428 }
10429
10430 // List: Lists all Membership RBACRoleBindings.
10431 //
10432 // - parent: The parent (project and location) where the Features will be
10433 // listed. Specified in the format `projects/*/locations/*/memberships/*`.
10434 func (r *ProjectsLocationsMembershipsRbacrolebindingsService) List(parent string) *ProjectsLocationsMembershipsRbacrolebindingsListCall {
10435 c := &ProjectsLocationsMembershipsRbacrolebindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10436 c.parent = parent
10437 return c
10438 }
10439
10440 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
10441 // resources, `page_size` specifies number of resources to return. If
10442 // unspecified or set to 0, all resources will be returned.
10443 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) PageSize(pageSize int64) *ProjectsLocationsMembershipsRbacrolebindingsListCall {
10444 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10445 return c
10446 }
10447
10448 // PageToken sets the optional parameter "pageToken": Token returned by
10449 // previous call to `ListMembershipRBACRoleBindings` which specifies the
10450 // position in the list from where to continue listing the resources.
10451 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) PageToken(pageToken string) *ProjectsLocationsMembershipsRbacrolebindingsListCall {
10452 c.urlParams_.Set("pageToken", pageToken)
10453 return c
10454 }
10455
10456 // Fields allows partial responses to be retrieved. See
10457 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10458 // details.
10459 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsRbacrolebindingsListCall {
10460 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10461 return c
10462 }
10463
10464 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10465 // object's ETag matches the given value. This is useful for getting updates
10466 // only after the object has changed since the last request.
10467 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsRbacrolebindingsListCall {
10468 c.ifNoneMatch_ = entityTag
10469 return c
10470 }
10471
10472 // Context sets the context to be used in this call's Do method.
10473 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) Context(ctx context.Context) *ProjectsLocationsMembershipsRbacrolebindingsListCall {
10474 c.ctx_ = ctx
10475 return c
10476 }
10477
10478 // Header returns a http.Header that can be modified by the caller to add
10479 // headers to the request.
10480 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) Header() http.Header {
10481 if c.header_ == nil {
10482 c.header_ = make(http.Header)
10483 }
10484 return c.header_
10485 }
10486
10487 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) doRequest(alt string) (*http.Response, error) {
10488 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10489 if c.ifNoneMatch_ != "" {
10490 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10491 }
10492 c.urlParams_.Set("alt", alt)
10493 c.urlParams_.Set("prettyPrint", "false")
10494 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/rbacrolebindings")
10495 urls += "?" + c.urlParams_.Encode()
10496 req, err := http.NewRequest("GET", urls, nil)
10497 if err != nil {
10498 return nil, err
10499 }
10500 req.Header = reqHeaders
10501 googleapi.Expand(req.URL, map[string]string{
10502 "parent": c.parent,
10503 })
10504 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.list", "request", internallog.HTTPRequest(req, nil))
10505 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10506 }
10507
10508 // Do executes the "gkehub.projects.locations.memberships.rbacrolebindings.list" call.
10509 // Any non-2xx status code is an error. Response headers are in either
10510 // *ListMembershipRBACRoleBindingsResponse.ServerResponse.Header or (if a
10511 // response was returned at all) in error.(*googleapi.Error).Header. Use
10512 // googleapi.IsNotModified to check whether the returned error was because
10513 // http.StatusNotModified was returned.
10514 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) Do(opts ...googleapi.CallOption) (*ListMembershipRBACRoleBindingsResponse, error) {
10515 gensupport.SetOptions(c.urlParams_, opts...)
10516 res, err := c.doRequest("json")
10517 if res != nil && res.StatusCode == http.StatusNotModified {
10518 if res.Body != nil {
10519 res.Body.Close()
10520 }
10521 return nil, gensupport.WrapError(&googleapi.Error{
10522 Code: res.StatusCode,
10523 Header: res.Header,
10524 })
10525 }
10526 if err != nil {
10527 return nil, err
10528 }
10529 defer googleapi.CloseBody(res)
10530 if err := googleapi.CheckResponse(res); err != nil {
10531 return nil, gensupport.WrapError(err)
10532 }
10533 ret := &ListMembershipRBACRoleBindingsResponse{
10534 ServerResponse: googleapi.ServerResponse{
10535 Header: res.Header,
10536 HTTPStatusCode: res.StatusCode,
10537 },
10538 }
10539 target := &ret
10540 b, err := gensupport.DecodeResponseBytes(target, res)
10541 if err != nil {
10542 return nil, err
10543 }
10544 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.list", "response", internallog.HTTPResponse(res, b))
10545 return ret, nil
10546 }
10547
10548 // Pages invokes f for each page of results.
10549 // A non-nil error returned from f will halt the iteration.
10550 // The provided context supersedes any context provided to the Context method.
10551 func (c *ProjectsLocationsMembershipsRbacrolebindingsListCall) Pages(ctx context.Context, f func(*ListMembershipRBACRoleBindingsResponse) error) error {
10552 c.ctx_ = ctx
10553 defer c.PageToken(c.urlParams_.Get("pageToken"))
10554 for {
10555 x, err := c.Do()
10556 if err != nil {
10557 return err
10558 }
10559 if err := f(x); err != nil {
10560 return err
10561 }
10562 if x.NextPageToken == "" {
10563 return nil
10564 }
10565 c.PageToken(x.NextPageToken)
10566 }
10567 }
10568
10569 type ProjectsLocationsMembershipsRbacrolebindingsPatchCall struct {
10570 s *Service
10571 name string
10572 rbacrolebinding *RBACRoleBinding
10573 urlParams_ gensupport.URLParams
10574 ctx_ context.Context
10575 header_ http.Header
10576 }
10577
10578 // Patch: Updates a Membership RBACRoleBinding.
10579 //
10580 // - name: The resource name for the rbacrolebinding
10581 // `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{r
10582 // bacrolebinding}` or
10583 // `projects/{project}/locations/{location}/memberships/{membership}/rbacroleb
10584 // indings/{rbacrolebinding}`.
10585 func (r *ProjectsLocationsMembershipsRbacrolebindingsService) Patch(name string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsMembershipsRbacrolebindingsPatchCall {
10586 c := &ProjectsLocationsMembershipsRbacrolebindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10587 c.name = name
10588 c.rbacrolebinding = rbacrolebinding
10589 return c
10590 }
10591
10592 // UpdateMask sets the optional parameter "updateMask": Required. The fields to
10593 // be updated.
10594 func (c *ProjectsLocationsMembershipsRbacrolebindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMembershipsRbacrolebindingsPatchCall {
10595 c.urlParams_.Set("updateMask", updateMask)
10596 return c
10597 }
10598
10599 // Fields allows partial responses to be retrieved. See
10600 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10601 // details.
10602 func (c *ProjectsLocationsMembershipsRbacrolebindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsRbacrolebindingsPatchCall {
10603 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10604 return c
10605 }
10606
10607 // Context sets the context to be used in this call's Do method.
10608 func (c *ProjectsLocationsMembershipsRbacrolebindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsMembershipsRbacrolebindingsPatchCall {
10609 c.ctx_ = ctx
10610 return c
10611 }
10612
10613 // Header returns a http.Header that can be modified by the caller to add
10614 // headers to the request.
10615 func (c *ProjectsLocationsMembershipsRbacrolebindingsPatchCall) Header() http.Header {
10616 if c.header_ == nil {
10617 c.header_ = make(http.Header)
10618 }
10619 return c.header_
10620 }
10621
10622 func (c *ProjectsLocationsMembershipsRbacrolebindingsPatchCall) doRequest(alt string) (*http.Response, error) {
10623 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10624 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rbacrolebinding)
10625 if err != nil {
10626 return nil, err
10627 }
10628 c.urlParams_.Set("alt", alt)
10629 c.urlParams_.Set("prettyPrint", "false")
10630 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10631 urls += "?" + c.urlParams_.Encode()
10632 req, err := http.NewRequest("PATCH", urls, body)
10633 if err != nil {
10634 return nil, err
10635 }
10636 req.Header = reqHeaders
10637 googleapi.Expand(req.URL, map[string]string{
10638 "name": c.name,
10639 })
10640 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
10641 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10642 }
10643
10644 // Do executes the "gkehub.projects.locations.memberships.rbacrolebindings.patch" call.
10645 // Any non-2xx status code is an error. Response headers are in either
10646 // *Operation.ServerResponse.Header or (if a response was returned at all) in
10647 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10648 // whether the returned error was because http.StatusNotModified was returned.
10649 func (c *ProjectsLocationsMembershipsRbacrolebindingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10650 gensupport.SetOptions(c.urlParams_, opts...)
10651 res, err := c.doRequest("json")
10652 if res != nil && res.StatusCode == http.StatusNotModified {
10653 if res.Body != nil {
10654 res.Body.Close()
10655 }
10656 return nil, gensupport.WrapError(&googleapi.Error{
10657 Code: res.StatusCode,
10658 Header: res.Header,
10659 })
10660 }
10661 if err != nil {
10662 return nil, err
10663 }
10664 defer googleapi.CloseBody(res)
10665 if err := googleapi.CheckResponse(res); err != nil {
10666 return nil, gensupport.WrapError(err)
10667 }
10668 ret := &Operation{
10669 ServerResponse: googleapi.ServerResponse{
10670 Header: res.Header,
10671 HTTPStatusCode: res.StatusCode,
10672 },
10673 }
10674 target := &ret
10675 b, err := gensupport.DecodeResponseBytes(target, res)
10676 if err != nil {
10677 return nil, err
10678 }
10679 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.rbacrolebindings.patch", "response", internallog.HTTPResponse(res, b))
10680 return ret, nil
10681 }
10682
10683 type ProjectsLocationsOperationsCancelCall struct {
10684 s *Service
10685 name string
10686 canceloperationrequest *CancelOperationRequest
10687 urlParams_ gensupport.URLParams
10688 ctx_ context.Context
10689 header_ http.Header
10690 }
10691
10692 // Cancel: Starts asynchronous cancellation on a long-running operation. The
10693 // server makes a best effort to cancel the operation, but success is not
10694 // guaranteed. If the server doesn't support this method, it returns
10695 // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
10696 // other methods to check whether the cancellation succeeded or whether the
10697 // operation completed despite cancellation. On successful cancellation, the
10698 // operation is not deleted; instead, it becomes an operation with an
10699 // Operation.error value with a google.rpc.Status.code of `1`, corresponding to
10700 // `Code.CANCELLED`.
10701 //
10702 // - name: The name of the operation resource to be cancelled.
10703 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
10704 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10705 c.name = name
10706 c.canceloperationrequest = canceloperationrequest
10707 return c
10708 }
10709
10710 // Fields allows partial responses to be retrieved. See
10711 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10712 // details.
10713 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
10714 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10715 return c
10716 }
10717
10718 // Context sets the context to be used in this call's Do method.
10719 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
10720 c.ctx_ = ctx
10721 return c
10722 }
10723
10724 // Header returns a http.Header that can be modified by the caller to add
10725 // headers to the request.
10726 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
10727 if c.header_ == nil {
10728 c.header_ = make(http.Header)
10729 }
10730 return c.header_
10731 }
10732
10733 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
10734 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10735 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.canceloperationrequest)
10736 if err != nil {
10737 return nil, err
10738 }
10739 c.urlParams_.Set("alt", alt)
10740 c.urlParams_.Set("prettyPrint", "false")
10741 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
10742 urls += "?" + c.urlParams_.Encode()
10743 req, err := http.NewRequest("POST", urls, body)
10744 if err != nil {
10745 return nil, err
10746 }
10747 req.Header = reqHeaders
10748 googleapi.Expand(req.URL, map[string]string{
10749 "name": c.name,
10750 })
10751 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.cancel", "request", internallog.HTTPRequest(req, body.Bytes()))
10752 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10753 }
10754
10755 // Do executes the "gkehub.projects.locations.operations.cancel" call.
10756 // Any non-2xx status code is an error. Response headers are in either
10757 // *Empty.ServerResponse.Header or (if a response was returned at all) in
10758 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10759 // whether the returned error was because http.StatusNotModified was returned.
10760 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10761 gensupport.SetOptions(c.urlParams_, opts...)
10762 res, err := c.doRequest("json")
10763 if res != nil && res.StatusCode == http.StatusNotModified {
10764 if res.Body != nil {
10765 res.Body.Close()
10766 }
10767 return nil, gensupport.WrapError(&googleapi.Error{
10768 Code: res.StatusCode,
10769 Header: res.Header,
10770 })
10771 }
10772 if err != nil {
10773 return nil, err
10774 }
10775 defer googleapi.CloseBody(res)
10776 if err := googleapi.CheckResponse(res); err != nil {
10777 return nil, gensupport.WrapError(err)
10778 }
10779 ret := &Empty{
10780 ServerResponse: googleapi.ServerResponse{
10781 Header: res.Header,
10782 HTTPStatusCode: res.StatusCode,
10783 },
10784 }
10785 target := &ret
10786 b, err := gensupport.DecodeResponseBytes(target, res)
10787 if err != nil {
10788 return nil, err
10789 }
10790 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.cancel", "response", internallog.HTTPResponse(res, b))
10791 return ret, nil
10792 }
10793
10794 type ProjectsLocationsOperationsDeleteCall struct {
10795 s *Service
10796 name string
10797 urlParams_ gensupport.URLParams
10798 ctx_ context.Context
10799 header_ http.Header
10800 }
10801
10802 // Delete: Deletes a long-running operation. This method indicates that the
10803 // client is no longer interested in the operation result. It does not cancel
10804 // the operation. If the server doesn't support this method, it returns
10805 // `google.rpc.Code.UNIMPLEMENTED`.
10806 //
10807 // - name: The name of the operation resource to be deleted.
10808 func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
10809 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10810 c.name = name
10811 return c
10812 }
10813
10814 // Fields allows partial responses to be retrieved. See
10815 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10816 // details.
10817 func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
10818 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10819 return c
10820 }
10821
10822 // Context sets the context to be used in this call's Do method.
10823 func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
10824 c.ctx_ = ctx
10825 return c
10826 }
10827
10828 // Header returns a http.Header that can be modified by the caller to add
10829 // headers to the request.
10830 func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
10831 if c.header_ == nil {
10832 c.header_ = make(http.Header)
10833 }
10834 return c.header_
10835 }
10836
10837 func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
10838 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10839 c.urlParams_.Set("alt", alt)
10840 c.urlParams_.Set("prettyPrint", "false")
10841 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10842 urls += "?" + c.urlParams_.Encode()
10843 req, err := http.NewRequest("DELETE", urls, nil)
10844 if err != nil {
10845 return nil, err
10846 }
10847 req.Header = reqHeaders
10848 googleapi.Expand(req.URL, map[string]string{
10849 "name": c.name,
10850 })
10851 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.delete", "request", internallog.HTTPRequest(req, nil))
10852 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10853 }
10854
10855 // Do executes the "gkehub.projects.locations.operations.delete" call.
10856 // Any non-2xx status code is an error. Response headers are in either
10857 // *Empty.ServerResponse.Header or (if a response was returned at all) in
10858 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10859 // whether the returned error was because http.StatusNotModified was returned.
10860 func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10861 gensupport.SetOptions(c.urlParams_, opts...)
10862 res, err := c.doRequest("json")
10863 if res != nil && res.StatusCode == http.StatusNotModified {
10864 if res.Body != nil {
10865 res.Body.Close()
10866 }
10867 return nil, gensupport.WrapError(&googleapi.Error{
10868 Code: res.StatusCode,
10869 Header: res.Header,
10870 })
10871 }
10872 if err != nil {
10873 return nil, err
10874 }
10875 defer googleapi.CloseBody(res)
10876 if err := googleapi.CheckResponse(res); err != nil {
10877 return nil, gensupport.WrapError(err)
10878 }
10879 ret := &Empty{
10880 ServerResponse: googleapi.ServerResponse{
10881 Header: res.Header,
10882 HTTPStatusCode: res.StatusCode,
10883 },
10884 }
10885 target := &ret
10886 b, err := gensupport.DecodeResponseBytes(target, res)
10887 if err != nil {
10888 return nil, err
10889 }
10890 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.delete", "response", internallog.HTTPResponse(res, b))
10891 return ret, nil
10892 }
10893
10894 type ProjectsLocationsOperationsGetCall struct {
10895 s *Service
10896 name string
10897 urlParams_ gensupport.URLParams
10898 ifNoneMatch_ string
10899 ctx_ context.Context
10900 header_ http.Header
10901 }
10902
10903 // Get: Gets the latest state of a long-running operation. Clients can use this
10904 // method to poll the operation result at intervals as recommended by the API
10905 // service.
10906 //
10907 // - name: The name of the operation resource.
10908 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
10909 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10910 c.name = name
10911 return c
10912 }
10913
10914 // Fields allows partial responses to be retrieved. See
10915 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
10916 // details.
10917 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
10918 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10919 return c
10920 }
10921
10922 // IfNoneMatch sets an optional parameter which makes the operation fail if the
10923 // object's ETag matches the given value. This is useful for getting updates
10924 // only after the object has changed since the last request.
10925 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
10926 c.ifNoneMatch_ = entityTag
10927 return c
10928 }
10929
10930 // Context sets the context to be used in this call's Do method.
10931 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
10932 c.ctx_ = ctx
10933 return c
10934 }
10935
10936 // Header returns a http.Header that can be modified by the caller to add
10937 // headers to the request.
10938 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
10939 if c.header_ == nil {
10940 c.header_ = make(http.Header)
10941 }
10942 return c.header_
10943 }
10944
10945 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
10946 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10947 if c.ifNoneMatch_ != "" {
10948 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10949 }
10950 c.urlParams_.Set("alt", alt)
10951 c.urlParams_.Set("prettyPrint", "false")
10952 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10953 urls += "?" + c.urlParams_.Encode()
10954 req, err := http.NewRequest("GET", urls, nil)
10955 if err != nil {
10956 return nil, err
10957 }
10958 req.Header = reqHeaders
10959 googleapi.Expand(req.URL, map[string]string{
10960 "name": c.name,
10961 })
10962 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.get", "request", internallog.HTTPRequest(req, nil))
10963 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10964 }
10965
10966 // Do executes the "gkehub.projects.locations.operations.get" call.
10967 // Any non-2xx status code is an error. Response headers are in either
10968 // *Operation.ServerResponse.Header or (if a response was returned at all) in
10969 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10970 // whether the returned error was because http.StatusNotModified was returned.
10971 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10972 gensupport.SetOptions(c.urlParams_, opts...)
10973 res, err := c.doRequest("json")
10974 if res != nil && res.StatusCode == http.StatusNotModified {
10975 if res.Body != nil {
10976 res.Body.Close()
10977 }
10978 return nil, gensupport.WrapError(&googleapi.Error{
10979 Code: res.StatusCode,
10980 Header: res.Header,
10981 })
10982 }
10983 if err != nil {
10984 return nil, err
10985 }
10986 defer googleapi.CloseBody(res)
10987 if err := googleapi.CheckResponse(res); err != nil {
10988 return nil, gensupport.WrapError(err)
10989 }
10990 ret := &Operation{
10991 ServerResponse: googleapi.ServerResponse{
10992 Header: res.Header,
10993 HTTPStatusCode: res.StatusCode,
10994 },
10995 }
10996 target := &ret
10997 b, err := gensupport.DecodeResponseBytes(target, res)
10998 if err != nil {
10999 return nil, err
11000 }
11001 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.get", "response", internallog.HTTPResponse(res, b))
11002 return ret, nil
11003 }
11004
11005 type ProjectsLocationsOperationsListCall struct {
11006 s *Service
11007 name string
11008 urlParams_ gensupport.URLParams
11009 ifNoneMatch_ string
11010 ctx_ context.Context
11011 header_ http.Header
11012 }
11013
11014 // List: Lists operations that match the specified filter in the request. If
11015 // the server doesn't support this method, it returns `UNIMPLEMENTED`.
11016 //
11017 // - name: The name of the operation's parent resource.
11018 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
11019 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11020 c.name = name
11021 return c
11022 }
11023
11024 // Filter sets the optional parameter "filter": The standard list filter.
11025 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
11026 c.urlParams_.Set("filter", filter)
11027 return c
11028 }
11029
11030 // PageSize sets the optional parameter "pageSize": The standard list page
11031 // size.
11032 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
11033 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11034 return c
11035 }
11036
11037 // PageToken sets the optional parameter "pageToken": The standard list page
11038 // token.
11039 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
11040 c.urlParams_.Set("pageToken", pageToken)
11041 return c
11042 }
11043
11044 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess":
11045 // When set to `true`, operations that are reachable are returned as normal,
11046 // and those that are unreachable are returned in the
11047 // ListOperationsResponse.unreachable field. This can only be `true` when
11048 // reading across collections. For example, when `parent` is set to
11049 // "projects/example/locations/-". This field is not supported by default and
11050 // will result in an `UNIMPLEMENTED` error if set unless explicitly documented
11051 // otherwise in service or product specific documentation.
11052 func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall {
11053 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
11054 return c
11055 }
11056
11057 // Fields allows partial responses to be retrieved. See
11058 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11059 // details.
11060 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
11061 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11062 return c
11063 }
11064
11065 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11066 // object's ETag matches the given value. This is useful for getting updates
11067 // only after the object has changed since the last request.
11068 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
11069 c.ifNoneMatch_ = entityTag
11070 return c
11071 }
11072
11073 // Context sets the context to be used in this call's Do method.
11074 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
11075 c.ctx_ = ctx
11076 return c
11077 }
11078
11079 // Header returns a http.Header that can be modified by the caller to add
11080 // headers to the request.
11081 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
11082 if c.header_ == nil {
11083 c.header_ = make(http.Header)
11084 }
11085 return c.header_
11086 }
11087
11088 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
11089 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11090 if c.ifNoneMatch_ != "" {
11091 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11092 }
11093 c.urlParams_.Set("alt", alt)
11094 c.urlParams_.Set("prettyPrint", "false")
11095 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
11096 urls += "?" + c.urlParams_.Encode()
11097 req, err := http.NewRequest("GET", urls, nil)
11098 if err != nil {
11099 return nil, err
11100 }
11101 req.Header = reqHeaders
11102 googleapi.Expand(req.URL, map[string]string{
11103 "name": c.name,
11104 })
11105 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.list", "request", internallog.HTTPRequest(req, nil))
11106 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11107 }
11108
11109 // Do executes the "gkehub.projects.locations.operations.list" call.
11110 // Any non-2xx status code is an error. Response headers are in either
11111 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
11112 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11113 // check whether the returned error was because http.StatusNotModified was
11114 // returned.
11115 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
11116 gensupport.SetOptions(c.urlParams_, opts...)
11117 res, err := c.doRequest("json")
11118 if res != nil && res.StatusCode == http.StatusNotModified {
11119 if res.Body != nil {
11120 res.Body.Close()
11121 }
11122 return nil, gensupport.WrapError(&googleapi.Error{
11123 Code: res.StatusCode,
11124 Header: res.Header,
11125 })
11126 }
11127 if err != nil {
11128 return nil, err
11129 }
11130 defer googleapi.CloseBody(res)
11131 if err := googleapi.CheckResponse(res); err != nil {
11132 return nil, gensupport.WrapError(err)
11133 }
11134 ret := &ListOperationsResponse{
11135 ServerResponse: googleapi.ServerResponse{
11136 Header: res.Header,
11137 HTTPStatusCode: res.StatusCode,
11138 },
11139 }
11140 target := &ret
11141 b, err := gensupport.DecodeResponseBytes(target, res)
11142 if err != nil {
11143 return nil, err
11144 }
11145 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.list", "response", internallog.HTTPResponse(res, b))
11146 return ret, nil
11147 }
11148
11149 // Pages invokes f for each page of results.
11150 // A non-nil error returned from f will halt the iteration.
11151 // The provided context supersedes any context provided to the Context method.
11152 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
11153 c.ctx_ = ctx
11154 defer c.PageToken(c.urlParams_.Get("pageToken"))
11155 for {
11156 x, err := c.Do()
11157 if err != nil {
11158 return err
11159 }
11160 if err := f(x); err != nil {
11161 return err
11162 }
11163 if x.NextPageToken == "" {
11164 return nil
11165 }
11166 c.PageToken(x.NextPageToken)
11167 }
11168 }
11169
11170 type ProjectsLocationsScopesCreateCall struct {
11171 s *Service
11172 parent string
11173 scope *Scope
11174 urlParams_ gensupport.URLParams
11175 ctx_ context.Context
11176 header_ http.Header
11177 }
11178
11179 // Create: Creates a Scope.
11180 //
11181 // - parent: The parent (project and location) where the Scope will be created.
11182 // Specified in the format `projects/*/locations/*`.
11183 func (r *ProjectsLocationsScopesService) Create(parent string, scope *Scope) *ProjectsLocationsScopesCreateCall {
11184 c := &ProjectsLocationsScopesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11185 c.parent = parent
11186 c.scope = scope
11187 return c
11188 }
11189
11190 // ScopeId sets the optional parameter "scopeId": Required. Client chosen ID
11191 // for the Scope. `scope_id` must be a ????
11192 func (c *ProjectsLocationsScopesCreateCall) ScopeId(scopeId string) *ProjectsLocationsScopesCreateCall {
11193 c.urlParams_.Set("scopeId", scopeId)
11194 return c
11195 }
11196
11197 // Fields allows partial responses to be retrieved. See
11198 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11199 // details.
11200 func (c *ProjectsLocationsScopesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesCreateCall {
11201 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11202 return c
11203 }
11204
11205 // Context sets the context to be used in this call's Do method.
11206 func (c *ProjectsLocationsScopesCreateCall) Context(ctx context.Context) *ProjectsLocationsScopesCreateCall {
11207 c.ctx_ = ctx
11208 return c
11209 }
11210
11211 // Header returns a http.Header that can be modified by the caller to add
11212 // headers to the request.
11213 func (c *ProjectsLocationsScopesCreateCall) Header() http.Header {
11214 if c.header_ == nil {
11215 c.header_ = make(http.Header)
11216 }
11217 return c.header_
11218 }
11219
11220 func (c *ProjectsLocationsScopesCreateCall) doRequest(alt string) (*http.Response, error) {
11221 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11222 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.scope)
11223 if err != nil {
11224 return nil, err
11225 }
11226 c.urlParams_.Set("alt", alt)
11227 c.urlParams_.Set("prettyPrint", "false")
11228 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/scopes")
11229 urls += "?" + c.urlParams_.Encode()
11230 req, err := http.NewRequest("POST", urls, body)
11231 if err != nil {
11232 return nil, err
11233 }
11234 req.Header = reqHeaders
11235 googleapi.Expand(req.URL, map[string]string{
11236 "parent": c.parent,
11237 })
11238 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.create", "request", internallog.HTTPRequest(req, body.Bytes()))
11239 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11240 }
11241
11242 // Do executes the "gkehub.projects.locations.scopes.create" call.
11243 // Any non-2xx status code is an error. Response headers are in either
11244 // *Operation.ServerResponse.Header or (if a response was returned at all) in
11245 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11246 // whether the returned error was because http.StatusNotModified was returned.
11247 func (c *ProjectsLocationsScopesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11248 gensupport.SetOptions(c.urlParams_, opts...)
11249 res, err := c.doRequest("json")
11250 if res != nil && res.StatusCode == http.StatusNotModified {
11251 if res.Body != nil {
11252 res.Body.Close()
11253 }
11254 return nil, gensupport.WrapError(&googleapi.Error{
11255 Code: res.StatusCode,
11256 Header: res.Header,
11257 })
11258 }
11259 if err != nil {
11260 return nil, err
11261 }
11262 defer googleapi.CloseBody(res)
11263 if err := googleapi.CheckResponse(res); err != nil {
11264 return nil, gensupport.WrapError(err)
11265 }
11266 ret := &Operation{
11267 ServerResponse: googleapi.ServerResponse{
11268 Header: res.Header,
11269 HTTPStatusCode: res.StatusCode,
11270 },
11271 }
11272 target := &ret
11273 b, err := gensupport.DecodeResponseBytes(target, res)
11274 if err != nil {
11275 return nil, err
11276 }
11277 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.create", "response", internallog.HTTPResponse(res, b))
11278 return ret, nil
11279 }
11280
11281 type ProjectsLocationsScopesDeleteCall struct {
11282 s *Service
11283 name string
11284 urlParams_ gensupport.URLParams
11285 ctx_ context.Context
11286 header_ http.Header
11287 }
11288
11289 // Delete: Deletes a Scope.
11290 //
11291 // - name: The Scope resource name in the format
11292 // `projects/*/locations/*/scopes/*`.
11293 func (r *ProjectsLocationsScopesService) Delete(name string) *ProjectsLocationsScopesDeleteCall {
11294 c := &ProjectsLocationsScopesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11295 c.name = name
11296 return c
11297 }
11298
11299 // Fields allows partial responses to be retrieved. See
11300 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11301 // details.
11302 func (c *ProjectsLocationsScopesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesDeleteCall {
11303 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11304 return c
11305 }
11306
11307 // Context sets the context to be used in this call's Do method.
11308 func (c *ProjectsLocationsScopesDeleteCall) Context(ctx context.Context) *ProjectsLocationsScopesDeleteCall {
11309 c.ctx_ = ctx
11310 return c
11311 }
11312
11313 // Header returns a http.Header that can be modified by the caller to add
11314 // headers to the request.
11315 func (c *ProjectsLocationsScopesDeleteCall) Header() http.Header {
11316 if c.header_ == nil {
11317 c.header_ = make(http.Header)
11318 }
11319 return c.header_
11320 }
11321
11322 func (c *ProjectsLocationsScopesDeleteCall) doRequest(alt string) (*http.Response, error) {
11323 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11324 c.urlParams_.Set("alt", alt)
11325 c.urlParams_.Set("prettyPrint", "false")
11326 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
11327 urls += "?" + c.urlParams_.Encode()
11328 req, err := http.NewRequest("DELETE", urls, nil)
11329 if err != nil {
11330 return nil, err
11331 }
11332 req.Header = reqHeaders
11333 googleapi.Expand(req.URL, map[string]string{
11334 "name": c.name,
11335 })
11336 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.delete", "request", internallog.HTTPRequest(req, nil))
11337 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11338 }
11339
11340 // Do executes the "gkehub.projects.locations.scopes.delete" call.
11341 // Any non-2xx status code is an error. Response headers are in either
11342 // *Operation.ServerResponse.Header or (if a response was returned at all) in
11343 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11344 // whether the returned error was because http.StatusNotModified was returned.
11345 func (c *ProjectsLocationsScopesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11346 gensupport.SetOptions(c.urlParams_, opts...)
11347 res, err := c.doRequest("json")
11348 if res != nil && res.StatusCode == http.StatusNotModified {
11349 if res.Body != nil {
11350 res.Body.Close()
11351 }
11352 return nil, gensupport.WrapError(&googleapi.Error{
11353 Code: res.StatusCode,
11354 Header: res.Header,
11355 })
11356 }
11357 if err != nil {
11358 return nil, err
11359 }
11360 defer googleapi.CloseBody(res)
11361 if err := googleapi.CheckResponse(res); err != nil {
11362 return nil, gensupport.WrapError(err)
11363 }
11364 ret := &Operation{
11365 ServerResponse: googleapi.ServerResponse{
11366 Header: res.Header,
11367 HTTPStatusCode: res.StatusCode,
11368 },
11369 }
11370 target := &ret
11371 b, err := gensupport.DecodeResponseBytes(target, res)
11372 if err != nil {
11373 return nil, err
11374 }
11375 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.delete", "response", internallog.HTTPResponse(res, b))
11376 return ret, nil
11377 }
11378
11379 type ProjectsLocationsScopesGetCall struct {
11380 s *Service
11381 name string
11382 urlParams_ gensupport.URLParams
11383 ifNoneMatch_ string
11384 ctx_ context.Context
11385 header_ http.Header
11386 }
11387
11388 // Get: Returns the details of a Scope.
11389 //
11390 // - name: The Scope resource name in the format
11391 // `projects/*/locations/*/scopes/*`.
11392 func (r *ProjectsLocationsScopesService) Get(name string) *ProjectsLocationsScopesGetCall {
11393 c := &ProjectsLocationsScopesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11394 c.name = name
11395 return c
11396 }
11397
11398 // Fields allows partial responses to be retrieved. See
11399 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11400 // details.
11401 func (c *ProjectsLocationsScopesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesGetCall {
11402 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11403 return c
11404 }
11405
11406 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11407 // object's ETag matches the given value. This is useful for getting updates
11408 // only after the object has changed since the last request.
11409 func (c *ProjectsLocationsScopesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesGetCall {
11410 c.ifNoneMatch_ = entityTag
11411 return c
11412 }
11413
11414 // Context sets the context to be used in this call's Do method.
11415 func (c *ProjectsLocationsScopesGetCall) Context(ctx context.Context) *ProjectsLocationsScopesGetCall {
11416 c.ctx_ = ctx
11417 return c
11418 }
11419
11420 // Header returns a http.Header that can be modified by the caller to add
11421 // headers to the request.
11422 func (c *ProjectsLocationsScopesGetCall) Header() http.Header {
11423 if c.header_ == nil {
11424 c.header_ = make(http.Header)
11425 }
11426 return c.header_
11427 }
11428
11429 func (c *ProjectsLocationsScopesGetCall) doRequest(alt string) (*http.Response, error) {
11430 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11431 if c.ifNoneMatch_ != "" {
11432 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11433 }
11434 c.urlParams_.Set("alt", alt)
11435 c.urlParams_.Set("prettyPrint", "false")
11436 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
11437 urls += "?" + c.urlParams_.Encode()
11438 req, err := http.NewRequest("GET", urls, nil)
11439 if err != nil {
11440 return nil, err
11441 }
11442 req.Header = reqHeaders
11443 googleapi.Expand(req.URL, map[string]string{
11444 "name": c.name,
11445 })
11446 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.get", "request", internallog.HTTPRequest(req, nil))
11447 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11448 }
11449
11450 // Do executes the "gkehub.projects.locations.scopes.get" call.
11451 // Any non-2xx status code is an error. Response headers are in either
11452 // *Scope.ServerResponse.Header or (if a response was returned at all) in
11453 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11454 // whether the returned error was because http.StatusNotModified was returned.
11455 func (c *ProjectsLocationsScopesGetCall) Do(opts ...googleapi.CallOption) (*Scope, error) {
11456 gensupport.SetOptions(c.urlParams_, opts...)
11457 res, err := c.doRequest("json")
11458 if res != nil && res.StatusCode == http.StatusNotModified {
11459 if res.Body != nil {
11460 res.Body.Close()
11461 }
11462 return nil, gensupport.WrapError(&googleapi.Error{
11463 Code: res.StatusCode,
11464 Header: res.Header,
11465 })
11466 }
11467 if err != nil {
11468 return nil, err
11469 }
11470 defer googleapi.CloseBody(res)
11471 if err := googleapi.CheckResponse(res); err != nil {
11472 return nil, gensupport.WrapError(err)
11473 }
11474 ret := &Scope{
11475 ServerResponse: googleapi.ServerResponse{
11476 Header: res.Header,
11477 HTTPStatusCode: res.StatusCode,
11478 },
11479 }
11480 target := &ret
11481 b, err := gensupport.DecodeResponseBytes(target, res)
11482 if err != nil {
11483 return nil, err
11484 }
11485 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.get", "response", internallog.HTTPResponse(res, b))
11486 return ret, nil
11487 }
11488
11489 type ProjectsLocationsScopesGetIamPolicyCall struct {
11490 s *Service
11491 resource string
11492 urlParams_ gensupport.URLParams
11493 ifNoneMatch_ string
11494 ctx_ context.Context
11495 header_ http.Header
11496 }
11497
11498 // GetIamPolicy: Gets the access control policy for a resource. Returns an
11499 // empty policy if the resource exists and does not have a policy set.
11500 //
11501 // - resource: REQUIRED: The resource for which the policy is being requested.
11502 // See Resource names (https://cloud.google.com/apis/design/resource_names)
11503 // for the appropriate value for this field.
11504 func (r *ProjectsLocationsScopesService) GetIamPolicy(resource string) *ProjectsLocationsScopesGetIamPolicyCall {
11505 c := &ProjectsLocationsScopesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11506 c.resource = resource
11507 return c
11508 }
11509
11510 // OptionsRequestedPolicyVersion sets the optional parameter
11511 // "options.requestedPolicyVersion": The maximum policy version that will be
11512 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
11513 // an invalid value will be rejected. Requests for policies with any
11514 // conditional role bindings must specify version 3. Policies with no
11515 // conditional role bindings may specify any valid value or leave the field
11516 // unset. The policy in the response might use the policy version that you
11517 // specified, or it might use a lower policy version. For example, if you
11518 // specify version 3, but the policy has no conditional role bindings, the
11519 // response uses version 1. To learn which resources support conditions in
11520 // their IAM policies, see the IAM documentation
11521 // (https://cloud.google.com/iam/help/conditions/resource-policies).
11522 func (c *ProjectsLocationsScopesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsScopesGetIamPolicyCall {
11523 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
11524 return c
11525 }
11526
11527 // Fields allows partial responses to be retrieved. See
11528 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11529 // details.
11530 func (c *ProjectsLocationsScopesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesGetIamPolicyCall {
11531 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11532 return c
11533 }
11534
11535 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11536 // object's ETag matches the given value. This is useful for getting updates
11537 // only after the object has changed since the last request.
11538 func (c *ProjectsLocationsScopesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesGetIamPolicyCall {
11539 c.ifNoneMatch_ = entityTag
11540 return c
11541 }
11542
11543 // Context sets the context to be used in this call's Do method.
11544 func (c *ProjectsLocationsScopesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsScopesGetIamPolicyCall {
11545 c.ctx_ = ctx
11546 return c
11547 }
11548
11549 // Header returns a http.Header that can be modified by the caller to add
11550 // headers to the request.
11551 func (c *ProjectsLocationsScopesGetIamPolicyCall) Header() http.Header {
11552 if c.header_ == nil {
11553 c.header_ = make(http.Header)
11554 }
11555 return c.header_
11556 }
11557
11558 func (c *ProjectsLocationsScopesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
11559 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11560 if c.ifNoneMatch_ != "" {
11561 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11562 }
11563 c.urlParams_.Set("alt", alt)
11564 c.urlParams_.Set("prettyPrint", "false")
11565 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
11566 urls += "?" + c.urlParams_.Encode()
11567 req, err := http.NewRequest("GET", urls, nil)
11568 if err != nil {
11569 return nil, err
11570 }
11571 req.Header = reqHeaders
11572 googleapi.Expand(req.URL, map[string]string{
11573 "resource": c.resource,
11574 })
11575 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
11576 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11577 }
11578
11579 // Do executes the "gkehub.projects.locations.scopes.getIamPolicy" call.
11580 // Any non-2xx status code is an error. Response headers are in either
11581 // *Policy.ServerResponse.Header or (if a response was returned at all) in
11582 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11583 // whether the returned error was because http.StatusNotModified was returned.
11584 func (c *ProjectsLocationsScopesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
11585 gensupport.SetOptions(c.urlParams_, opts...)
11586 res, err := c.doRequest("json")
11587 if res != nil && res.StatusCode == http.StatusNotModified {
11588 if res.Body != nil {
11589 res.Body.Close()
11590 }
11591 return nil, gensupport.WrapError(&googleapi.Error{
11592 Code: res.StatusCode,
11593 Header: res.Header,
11594 })
11595 }
11596 if err != nil {
11597 return nil, err
11598 }
11599 defer googleapi.CloseBody(res)
11600 if err := googleapi.CheckResponse(res); err != nil {
11601 return nil, gensupport.WrapError(err)
11602 }
11603 ret := &Policy{
11604 ServerResponse: googleapi.ServerResponse{
11605 Header: res.Header,
11606 HTTPStatusCode: res.StatusCode,
11607 },
11608 }
11609 target := &ret
11610 b, err := gensupport.DecodeResponseBytes(target, res)
11611 if err != nil {
11612 return nil, err
11613 }
11614 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.getIamPolicy", "response", internallog.HTTPResponse(res, b))
11615 return ret, nil
11616 }
11617
11618 type ProjectsLocationsScopesListCall struct {
11619 s *Service
11620 parent string
11621 urlParams_ gensupport.URLParams
11622 ifNoneMatch_ string
11623 ctx_ context.Context
11624 header_ http.Header
11625 }
11626
11627 // List: Lists Scopes.
11628 //
11629 // - parent: The parent (project and location) where the Scope will be listed.
11630 // Specified in the format `projects/*/locations/*`.
11631 func (r *ProjectsLocationsScopesService) List(parent string) *ProjectsLocationsScopesListCall {
11632 c := &ProjectsLocationsScopesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11633 c.parent = parent
11634 return c
11635 }
11636
11637 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
11638 // resources, `page_size` specifies number of resources to return. If
11639 // unspecified or set to 0, all resources will be returned.
11640 func (c *ProjectsLocationsScopesListCall) PageSize(pageSize int64) *ProjectsLocationsScopesListCall {
11641 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11642 return c
11643 }
11644
11645 // PageToken sets the optional parameter "pageToken": Token returned by
11646 // previous call to `ListScopes` which specifies the position in the list from
11647 // where to continue listing the resources.
11648 func (c *ProjectsLocationsScopesListCall) PageToken(pageToken string) *ProjectsLocationsScopesListCall {
11649 c.urlParams_.Set("pageToken", pageToken)
11650 return c
11651 }
11652
11653 // Fields allows partial responses to be retrieved. See
11654 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11655 // details.
11656 func (c *ProjectsLocationsScopesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesListCall {
11657 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11658 return c
11659 }
11660
11661 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11662 // object's ETag matches the given value. This is useful for getting updates
11663 // only after the object has changed since the last request.
11664 func (c *ProjectsLocationsScopesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesListCall {
11665 c.ifNoneMatch_ = entityTag
11666 return c
11667 }
11668
11669 // Context sets the context to be used in this call's Do method.
11670 func (c *ProjectsLocationsScopesListCall) Context(ctx context.Context) *ProjectsLocationsScopesListCall {
11671 c.ctx_ = ctx
11672 return c
11673 }
11674
11675 // Header returns a http.Header that can be modified by the caller to add
11676 // headers to the request.
11677 func (c *ProjectsLocationsScopesListCall) Header() http.Header {
11678 if c.header_ == nil {
11679 c.header_ = make(http.Header)
11680 }
11681 return c.header_
11682 }
11683
11684 func (c *ProjectsLocationsScopesListCall) doRequest(alt string) (*http.Response, error) {
11685 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11686 if c.ifNoneMatch_ != "" {
11687 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11688 }
11689 c.urlParams_.Set("alt", alt)
11690 c.urlParams_.Set("prettyPrint", "false")
11691 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/scopes")
11692 urls += "?" + c.urlParams_.Encode()
11693 req, err := http.NewRequest("GET", urls, nil)
11694 if err != nil {
11695 return nil, err
11696 }
11697 req.Header = reqHeaders
11698 googleapi.Expand(req.URL, map[string]string{
11699 "parent": c.parent,
11700 })
11701 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.list", "request", internallog.HTTPRequest(req, nil))
11702 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11703 }
11704
11705 // Do executes the "gkehub.projects.locations.scopes.list" call.
11706 // Any non-2xx status code is an error. Response headers are in either
11707 // *ListScopesResponse.ServerResponse.Header or (if a response was returned at
11708 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11709 // check whether the returned error was because http.StatusNotModified was
11710 // returned.
11711 func (c *ProjectsLocationsScopesListCall) Do(opts ...googleapi.CallOption) (*ListScopesResponse, error) {
11712 gensupport.SetOptions(c.urlParams_, opts...)
11713 res, err := c.doRequest("json")
11714 if res != nil && res.StatusCode == http.StatusNotModified {
11715 if res.Body != nil {
11716 res.Body.Close()
11717 }
11718 return nil, gensupport.WrapError(&googleapi.Error{
11719 Code: res.StatusCode,
11720 Header: res.Header,
11721 })
11722 }
11723 if err != nil {
11724 return nil, err
11725 }
11726 defer googleapi.CloseBody(res)
11727 if err := googleapi.CheckResponse(res); err != nil {
11728 return nil, gensupport.WrapError(err)
11729 }
11730 ret := &ListScopesResponse{
11731 ServerResponse: googleapi.ServerResponse{
11732 Header: res.Header,
11733 HTTPStatusCode: res.StatusCode,
11734 },
11735 }
11736 target := &ret
11737 b, err := gensupport.DecodeResponseBytes(target, res)
11738 if err != nil {
11739 return nil, err
11740 }
11741 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.list", "response", internallog.HTTPResponse(res, b))
11742 return ret, nil
11743 }
11744
11745 // Pages invokes f for each page of results.
11746 // A non-nil error returned from f will halt the iteration.
11747 // The provided context supersedes any context provided to the Context method.
11748 func (c *ProjectsLocationsScopesListCall) Pages(ctx context.Context, f func(*ListScopesResponse) error) error {
11749 c.ctx_ = ctx
11750 defer c.PageToken(c.urlParams_.Get("pageToken"))
11751 for {
11752 x, err := c.Do()
11753 if err != nil {
11754 return err
11755 }
11756 if err := f(x); err != nil {
11757 return err
11758 }
11759 if x.NextPageToken == "" {
11760 return nil
11761 }
11762 c.PageToken(x.NextPageToken)
11763 }
11764 }
11765
11766 type ProjectsLocationsScopesListMembershipsCall struct {
11767 s *Service
11768 scopeName string
11769 urlParams_ gensupport.URLParams
11770 ifNoneMatch_ string
11771 ctx_ context.Context
11772 header_ http.Header
11773 }
11774
11775 // ListMemberships: Lists Memberships bound to a Scope. The response includes
11776 // relevant Memberships from all regions.
11777 //
11778 // - scopeName: Name of the Scope, in the format
11779 // `projects/*/locations/global/scopes/*`, to which the Memberships are
11780 // bound.
11781 func (r *ProjectsLocationsScopesService) ListMemberships(scopeName string) *ProjectsLocationsScopesListMembershipsCall {
11782 c := &ProjectsLocationsScopesListMembershipsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11783 c.scopeName = scopeName
11784 return c
11785 }
11786
11787 // Filter sets the optional parameter "filter": Lists Memberships that match
11788 // the filter expression, following the syntax outlined in
11789 // https://google.aip.dev/160. Currently, filtering can be done only based on
11790 // Memberships's `name`, `labels`, `create_time`, `update_time`, and
11791 // `unique_id`.
11792 func (c *ProjectsLocationsScopesListMembershipsCall) Filter(filter string) *ProjectsLocationsScopesListMembershipsCall {
11793 c.urlParams_.Set("filter", filter)
11794 return c
11795 }
11796
11797 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
11798 // resources, `page_size` specifies number of resources to return. If
11799 // unspecified or set to 0, all resources will be returned. Pagination is
11800 // currently not supported; therefore, setting this field does not have any
11801 // impact for now.
11802 func (c *ProjectsLocationsScopesListMembershipsCall) PageSize(pageSize int64) *ProjectsLocationsScopesListMembershipsCall {
11803 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11804 return c
11805 }
11806
11807 // PageToken sets the optional parameter "pageToken": Token returned by
11808 // previous call to `ListBoundMemberships` which specifies the position in the
11809 // list from where to continue listing the resources.
11810 func (c *ProjectsLocationsScopesListMembershipsCall) PageToken(pageToken string) *ProjectsLocationsScopesListMembershipsCall {
11811 c.urlParams_.Set("pageToken", pageToken)
11812 return c
11813 }
11814
11815 // Fields allows partial responses to be retrieved. See
11816 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11817 // details.
11818 func (c *ProjectsLocationsScopesListMembershipsCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesListMembershipsCall {
11819 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11820 return c
11821 }
11822
11823 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11824 // object's ETag matches the given value. This is useful for getting updates
11825 // only after the object has changed since the last request.
11826 func (c *ProjectsLocationsScopesListMembershipsCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesListMembershipsCall {
11827 c.ifNoneMatch_ = entityTag
11828 return c
11829 }
11830
11831 // Context sets the context to be used in this call's Do method.
11832 func (c *ProjectsLocationsScopesListMembershipsCall) Context(ctx context.Context) *ProjectsLocationsScopesListMembershipsCall {
11833 c.ctx_ = ctx
11834 return c
11835 }
11836
11837 // Header returns a http.Header that can be modified by the caller to add
11838 // headers to the request.
11839 func (c *ProjectsLocationsScopesListMembershipsCall) Header() http.Header {
11840 if c.header_ == nil {
11841 c.header_ = make(http.Header)
11842 }
11843 return c.header_
11844 }
11845
11846 func (c *ProjectsLocationsScopesListMembershipsCall) doRequest(alt string) (*http.Response, error) {
11847 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11848 if c.ifNoneMatch_ != "" {
11849 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11850 }
11851 c.urlParams_.Set("alt", alt)
11852 c.urlParams_.Set("prettyPrint", "false")
11853 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+scopeName}:listMemberships")
11854 urls += "?" + c.urlParams_.Encode()
11855 req, err := http.NewRequest("GET", urls, nil)
11856 if err != nil {
11857 return nil, err
11858 }
11859 req.Header = reqHeaders
11860 googleapi.Expand(req.URL, map[string]string{
11861 "scopeName": c.scopeName,
11862 })
11863 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.listMemberships", "request", internallog.HTTPRequest(req, nil))
11864 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11865 }
11866
11867 // Do executes the "gkehub.projects.locations.scopes.listMemberships" call.
11868 // Any non-2xx status code is an error. Response headers are in either
11869 // *ListBoundMembershipsResponse.ServerResponse.Header or (if a response was
11870 // returned at all) in error.(*googleapi.Error).Header. Use
11871 // googleapi.IsNotModified to check whether the returned error was because
11872 // http.StatusNotModified was returned.
11873 func (c *ProjectsLocationsScopesListMembershipsCall) Do(opts ...googleapi.CallOption) (*ListBoundMembershipsResponse, error) {
11874 gensupport.SetOptions(c.urlParams_, opts...)
11875 res, err := c.doRequest("json")
11876 if res != nil && res.StatusCode == http.StatusNotModified {
11877 if res.Body != nil {
11878 res.Body.Close()
11879 }
11880 return nil, gensupport.WrapError(&googleapi.Error{
11881 Code: res.StatusCode,
11882 Header: res.Header,
11883 })
11884 }
11885 if err != nil {
11886 return nil, err
11887 }
11888 defer googleapi.CloseBody(res)
11889 if err := googleapi.CheckResponse(res); err != nil {
11890 return nil, gensupport.WrapError(err)
11891 }
11892 ret := &ListBoundMembershipsResponse{
11893 ServerResponse: googleapi.ServerResponse{
11894 Header: res.Header,
11895 HTTPStatusCode: res.StatusCode,
11896 },
11897 }
11898 target := &ret
11899 b, err := gensupport.DecodeResponseBytes(target, res)
11900 if err != nil {
11901 return nil, err
11902 }
11903 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.listMemberships", "response", internallog.HTTPResponse(res, b))
11904 return ret, nil
11905 }
11906
11907 // Pages invokes f for each page of results.
11908 // A non-nil error returned from f will halt the iteration.
11909 // The provided context supersedes any context provided to the Context method.
11910 func (c *ProjectsLocationsScopesListMembershipsCall) Pages(ctx context.Context, f func(*ListBoundMembershipsResponse) error) error {
11911 c.ctx_ = ctx
11912 defer c.PageToken(c.urlParams_.Get("pageToken"))
11913 for {
11914 x, err := c.Do()
11915 if err != nil {
11916 return err
11917 }
11918 if err := f(x); err != nil {
11919 return err
11920 }
11921 if x.NextPageToken == "" {
11922 return nil
11923 }
11924 c.PageToken(x.NextPageToken)
11925 }
11926 }
11927
11928 type ProjectsLocationsScopesListPermittedCall struct {
11929 s *Service
11930 parent string
11931 urlParams_ gensupport.URLParams
11932 ifNoneMatch_ string
11933 ctx_ context.Context
11934 header_ http.Header
11935 }
11936
11937 // ListPermitted: Lists permitted Scopes.
11938 //
11939 // - parent: The parent (project and location) where the Scope will be listed.
11940 // Specified in the format `projects/*/locations/*`.
11941 func (r *ProjectsLocationsScopesService) ListPermitted(parent string) *ProjectsLocationsScopesListPermittedCall {
11942 c := &ProjectsLocationsScopesListPermittedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11943 c.parent = parent
11944 return c
11945 }
11946
11947 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
11948 // resources, `page_size` specifies number of resources to return. If
11949 // unspecified or set to 0, all resources will be returned.
11950 func (c *ProjectsLocationsScopesListPermittedCall) PageSize(pageSize int64) *ProjectsLocationsScopesListPermittedCall {
11951 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11952 return c
11953 }
11954
11955 // PageToken sets the optional parameter "pageToken": Token returned by
11956 // previous call to `ListPermittedScopes` which specifies the position in the
11957 // list from where to continue listing the resources.
11958 func (c *ProjectsLocationsScopesListPermittedCall) PageToken(pageToken string) *ProjectsLocationsScopesListPermittedCall {
11959 c.urlParams_.Set("pageToken", pageToken)
11960 return c
11961 }
11962
11963 // Fields allows partial responses to be retrieved. See
11964 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
11965 // details.
11966 func (c *ProjectsLocationsScopesListPermittedCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesListPermittedCall {
11967 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11968 return c
11969 }
11970
11971 // IfNoneMatch sets an optional parameter which makes the operation fail if the
11972 // object's ETag matches the given value. This is useful for getting updates
11973 // only after the object has changed since the last request.
11974 func (c *ProjectsLocationsScopesListPermittedCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesListPermittedCall {
11975 c.ifNoneMatch_ = entityTag
11976 return c
11977 }
11978
11979 // Context sets the context to be used in this call's Do method.
11980 func (c *ProjectsLocationsScopesListPermittedCall) Context(ctx context.Context) *ProjectsLocationsScopesListPermittedCall {
11981 c.ctx_ = ctx
11982 return c
11983 }
11984
11985 // Header returns a http.Header that can be modified by the caller to add
11986 // headers to the request.
11987 func (c *ProjectsLocationsScopesListPermittedCall) Header() http.Header {
11988 if c.header_ == nil {
11989 c.header_ = make(http.Header)
11990 }
11991 return c.header_
11992 }
11993
11994 func (c *ProjectsLocationsScopesListPermittedCall) doRequest(alt string) (*http.Response, error) {
11995 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11996 if c.ifNoneMatch_ != "" {
11997 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11998 }
11999 c.urlParams_.Set("alt", alt)
12000 c.urlParams_.Set("prettyPrint", "false")
12001 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/scopes:listPermitted")
12002 urls += "?" + c.urlParams_.Encode()
12003 req, err := http.NewRequest("GET", urls, nil)
12004 if err != nil {
12005 return nil, err
12006 }
12007 req.Header = reqHeaders
12008 googleapi.Expand(req.URL, map[string]string{
12009 "parent": c.parent,
12010 })
12011 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.listPermitted", "request", internallog.HTTPRequest(req, nil))
12012 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12013 }
12014
12015 // Do executes the "gkehub.projects.locations.scopes.listPermitted" call.
12016 // Any non-2xx status code is an error. Response headers are in either
12017 // *ListPermittedScopesResponse.ServerResponse.Header or (if a response was
12018 // returned at all) in error.(*googleapi.Error).Header. Use
12019 // googleapi.IsNotModified to check whether the returned error was because
12020 // http.StatusNotModified was returned.
12021 func (c *ProjectsLocationsScopesListPermittedCall) Do(opts ...googleapi.CallOption) (*ListPermittedScopesResponse, error) {
12022 gensupport.SetOptions(c.urlParams_, opts...)
12023 res, err := c.doRequest("json")
12024 if res != nil && res.StatusCode == http.StatusNotModified {
12025 if res.Body != nil {
12026 res.Body.Close()
12027 }
12028 return nil, gensupport.WrapError(&googleapi.Error{
12029 Code: res.StatusCode,
12030 Header: res.Header,
12031 })
12032 }
12033 if err != nil {
12034 return nil, err
12035 }
12036 defer googleapi.CloseBody(res)
12037 if err := googleapi.CheckResponse(res); err != nil {
12038 return nil, gensupport.WrapError(err)
12039 }
12040 ret := &ListPermittedScopesResponse{
12041 ServerResponse: googleapi.ServerResponse{
12042 Header: res.Header,
12043 HTTPStatusCode: res.StatusCode,
12044 },
12045 }
12046 target := &ret
12047 b, err := gensupport.DecodeResponseBytes(target, res)
12048 if err != nil {
12049 return nil, err
12050 }
12051 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.listPermitted", "response", internallog.HTTPResponse(res, b))
12052 return ret, nil
12053 }
12054
12055 // Pages invokes f for each page of results.
12056 // A non-nil error returned from f will halt the iteration.
12057 // The provided context supersedes any context provided to the Context method.
12058 func (c *ProjectsLocationsScopesListPermittedCall) Pages(ctx context.Context, f func(*ListPermittedScopesResponse) error) error {
12059 c.ctx_ = ctx
12060 defer c.PageToken(c.urlParams_.Get("pageToken"))
12061 for {
12062 x, err := c.Do()
12063 if err != nil {
12064 return err
12065 }
12066 if err := f(x); err != nil {
12067 return err
12068 }
12069 if x.NextPageToken == "" {
12070 return nil
12071 }
12072 c.PageToken(x.NextPageToken)
12073 }
12074 }
12075
12076 type ProjectsLocationsScopesPatchCall struct {
12077 s *Service
12078 name string
12079 scope *Scope
12080 urlParams_ gensupport.URLParams
12081 ctx_ context.Context
12082 header_ http.Header
12083 }
12084
12085 // Patch: Updates a scopes.
12086 //
12087 // - name: The resource name for the scope
12088 // `projects/{project}/locations/{location}/scopes/{scope}`.
12089 func (r *ProjectsLocationsScopesService) Patch(name string, scope *Scope) *ProjectsLocationsScopesPatchCall {
12090 c := &ProjectsLocationsScopesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12091 c.name = name
12092 c.scope = scope
12093 return c
12094 }
12095
12096 // UpdateMask sets the optional parameter "updateMask": Required. The fields to
12097 // be updated.
12098 func (c *ProjectsLocationsScopesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsScopesPatchCall {
12099 c.urlParams_.Set("updateMask", updateMask)
12100 return c
12101 }
12102
12103 // Fields allows partial responses to be retrieved. See
12104 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12105 // details.
12106 func (c *ProjectsLocationsScopesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesPatchCall {
12107 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12108 return c
12109 }
12110
12111 // Context sets the context to be used in this call's Do method.
12112 func (c *ProjectsLocationsScopesPatchCall) Context(ctx context.Context) *ProjectsLocationsScopesPatchCall {
12113 c.ctx_ = ctx
12114 return c
12115 }
12116
12117 // Header returns a http.Header that can be modified by the caller to add
12118 // headers to the request.
12119 func (c *ProjectsLocationsScopesPatchCall) Header() http.Header {
12120 if c.header_ == nil {
12121 c.header_ = make(http.Header)
12122 }
12123 return c.header_
12124 }
12125
12126 func (c *ProjectsLocationsScopesPatchCall) doRequest(alt string) (*http.Response, error) {
12127 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12128 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.scope)
12129 if err != nil {
12130 return nil, err
12131 }
12132 c.urlParams_.Set("alt", alt)
12133 c.urlParams_.Set("prettyPrint", "false")
12134 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
12135 urls += "?" + c.urlParams_.Encode()
12136 req, err := http.NewRequest("PATCH", urls, body)
12137 if err != nil {
12138 return nil, err
12139 }
12140 req.Header = reqHeaders
12141 googleapi.Expand(req.URL, map[string]string{
12142 "name": c.name,
12143 })
12144 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
12145 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12146 }
12147
12148 // Do executes the "gkehub.projects.locations.scopes.patch" call.
12149 // Any non-2xx status code is an error. Response headers are in either
12150 // *Operation.ServerResponse.Header or (if a response was returned at all) in
12151 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12152 // whether the returned error was because http.StatusNotModified was returned.
12153 func (c *ProjectsLocationsScopesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12154 gensupport.SetOptions(c.urlParams_, opts...)
12155 res, err := c.doRequest("json")
12156 if res != nil && res.StatusCode == http.StatusNotModified {
12157 if res.Body != nil {
12158 res.Body.Close()
12159 }
12160 return nil, gensupport.WrapError(&googleapi.Error{
12161 Code: res.StatusCode,
12162 Header: res.Header,
12163 })
12164 }
12165 if err != nil {
12166 return nil, err
12167 }
12168 defer googleapi.CloseBody(res)
12169 if err := googleapi.CheckResponse(res); err != nil {
12170 return nil, gensupport.WrapError(err)
12171 }
12172 ret := &Operation{
12173 ServerResponse: googleapi.ServerResponse{
12174 Header: res.Header,
12175 HTTPStatusCode: res.StatusCode,
12176 },
12177 }
12178 target := &ret
12179 b, err := gensupport.DecodeResponseBytes(target, res)
12180 if err != nil {
12181 return nil, err
12182 }
12183 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.patch", "response", internallog.HTTPResponse(res, b))
12184 return ret, nil
12185 }
12186
12187 type ProjectsLocationsScopesSetIamPolicyCall struct {
12188 s *Service
12189 resource string
12190 setiampolicyrequest *SetIamPolicyRequest
12191 urlParams_ gensupport.URLParams
12192 ctx_ context.Context
12193 header_ http.Header
12194 }
12195
12196 // SetIamPolicy: Sets the access control policy on the specified resource.
12197 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
12198 // and `PERMISSION_DENIED` errors.
12199 //
12200 // - resource: REQUIRED: The resource for which the policy is being specified.
12201 // See Resource names (https://cloud.google.com/apis/design/resource_names)
12202 // for the appropriate value for this field.
12203 func (r *ProjectsLocationsScopesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsScopesSetIamPolicyCall {
12204 c := &ProjectsLocationsScopesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12205 c.resource = resource
12206 c.setiampolicyrequest = setiampolicyrequest
12207 return c
12208 }
12209
12210 // Fields allows partial responses to be retrieved. See
12211 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12212 // details.
12213 func (c *ProjectsLocationsScopesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesSetIamPolicyCall {
12214 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12215 return c
12216 }
12217
12218 // Context sets the context to be used in this call's Do method.
12219 func (c *ProjectsLocationsScopesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsScopesSetIamPolicyCall {
12220 c.ctx_ = ctx
12221 return c
12222 }
12223
12224 // Header returns a http.Header that can be modified by the caller to add
12225 // headers to the request.
12226 func (c *ProjectsLocationsScopesSetIamPolicyCall) Header() http.Header {
12227 if c.header_ == nil {
12228 c.header_ = make(http.Header)
12229 }
12230 return c.header_
12231 }
12232
12233 func (c *ProjectsLocationsScopesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
12234 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12235 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
12236 if err != nil {
12237 return nil, err
12238 }
12239 c.urlParams_.Set("alt", alt)
12240 c.urlParams_.Set("prettyPrint", "false")
12241 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
12242 urls += "?" + c.urlParams_.Encode()
12243 req, err := http.NewRequest("POST", urls, body)
12244 if err != nil {
12245 return nil, err
12246 }
12247 req.Header = reqHeaders
12248 googleapi.Expand(req.URL, map[string]string{
12249 "resource": c.resource,
12250 })
12251 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
12252 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12253 }
12254
12255 // Do executes the "gkehub.projects.locations.scopes.setIamPolicy" call.
12256 // Any non-2xx status code is an error. Response headers are in either
12257 // *Policy.ServerResponse.Header or (if a response was returned at all) in
12258 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12259 // whether the returned error was because http.StatusNotModified was returned.
12260 func (c *ProjectsLocationsScopesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
12261 gensupport.SetOptions(c.urlParams_, opts...)
12262 res, err := c.doRequest("json")
12263 if res != nil && res.StatusCode == http.StatusNotModified {
12264 if res.Body != nil {
12265 res.Body.Close()
12266 }
12267 return nil, gensupport.WrapError(&googleapi.Error{
12268 Code: res.StatusCode,
12269 Header: res.Header,
12270 })
12271 }
12272 if err != nil {
12273 return nil, err
12274 }
12275 defer googleapi.CloseBody(res)
12276 if err := googleapi.CheckResponse(res); err != nil {
12277 return nil, gensupport.WrapError(err)
12278 }
12279 ret := &Policy{
12280 ServerResponse: googleapi.ServerResponse{
12281 Header: res.Header,
12282 HTTPStatusCode: res.StatusCode,
12283 },
12284 }
12285 target := &ret
12286 b, err := gensupport.DecodeResponseBytes(target, res)
12287 if err != nil {
12288 return nil, err
12289 }
12290 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.setIamPolicy", "response", internallog.HTTPResponse(res, b))
12291 return ret, nil
12292 }
12293
12294 type ProjectsLocationsScopesTestIamPermissionsCall struct {
12295 s *Service
12296 resource string
12297 testiampermissionsrequest *TestIamPermissionsRequest
12298 urlParams_ gensupport.URLParams
12299 ctx_ context.Context
12300 header_ http.Header
12301 }
12302
12303 // TestIamPermissions: Returns permissions that a caller has on the specified
12304 // resource. If the resource does not exist, this will return an empty set of
12305 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
12306 // used for building permission-aware UIs and command-line tools, not for
12307 // authorization checking. This operation may "fail open" without warning.
12308 //
12309 // - resource: REQUIRED: The resource for which the policy detail is being
12310 // requested. See Resource names
12311 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
12312 // value for this field.
12313 func (r *ProjectsLocationsScopesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsScopesTestIamPermissionsCall {
12314 c := &ProjectsLocationsScopesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12315 c.resource = resource
12316 c.testiampermissionsrequest = testiampermissionsrequest
12317 return c
12318 }
12319
12320 // Fields allows partial responses to be retrieved. See
12321 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12322 // details.
12323 func (c *ProjectsLocationsScopesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesTestIamPermissionsCall {
12324 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12325 return c
12326 }
12327
12328 // Context sets the context to be used in this call's Do method.
12329 func (c *ProjectsLocationsScopesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsScopesTestIamPermissionsCall {
12330 c.ctx_ = ctx
12331 return c
12332 }
12333
12334 // Header returns a http.Header that can be modified by the caller to add
12335 // headers to the request.
12336 func (c *ProjectsLocationsScopesTestIamPermissionsCall) Header() http.Header {
12337 if c.header_ == nil {
12338 c.header_ = make(http.Header)
12339 }
12340 return c.header_
12341 }
12342
12343 func (c *ProjectsLocationsScopesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
12344 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12345 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
12346 if err != nil {
12347 return nil, err
12348 }
12349 c.urlParams_.Set("alt", alt)
12350 c.urlParams_.Set("prettyPrint", "false")
12351 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
12352 urls += "?" + c.urlParams_.Encode()
12353 req, err := http.NewRequest("POST", urls, body)
12354 if err != nil {
12355 return nil, err
12356 }
12357 req.Header = reqHeaders
12358 googleapi.Expand(req.URL, map[string]string{
12359 "resource": c.resource,
12360 })
12361 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
12362 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12363 }
12364
12365 // Do executes the "gkehub.projects.locations.scopes.testIamPermissions" call.
12366 // Any non-2xx status code is an error. Response headers are in either
12367 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
12368 // returned at all) in error.(*googleapi.Error).Header. Use
12369 // googleapi.IsNotModified to check whether the returned error was because
12370 // http.StatusNotModified was returned.
12371 func (c *ProjectsLocationsScopesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
12372 gensupport.SetOptions(c.urlParams_, opts...)
12373 res, err := c.doRequest("json")
12374 if res != nil && res.StatusCode == http.StatusNotModified {
12375 if res.Body != nil {
12376 res.Body.Close()
12377 }
12378 return nil, gensupport.WrapError(&googleapi.Error{
12379 Code: res.StatusCode,
12380 Header: res.Header,
12381 })
12382 }
12383 if err != nil {
12384 return nil, err
12385 }
12386 defer googleapi.CloseBody(res)
12387 if err := googleapi.CheckResponse(res); err != nil {
12388 return nil, gensupport.WrapError(err)
12389 }
12390 ret := &TestIamPermissionsResponse{
12391 ServerResponse: googleapi.ServerResponse{
12392 Header: res.Header,
12393 HTTPStatusCode: res.StatusCode,
12394 },
12395 }
12396 target := &ret
12397 b, err := gensupport.DecodeResponseBytes(target, res)
12398 if err != nil {
12399 return nil, err
12400 }
12401 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.testIamPermissions", "response", internallog.HTTPResponse(res, b))
12402 return ret, nil
12403 }
12404
12405 type ProjectsLocationsScopesNamespacesCreateCall struct {
12406 s *Service
12407 parent string
12408 namespace *Namespace
12409 urlParams_ gensupport.URLParams
12410 ctx_ context.Context
12411 header_ http.Header
12412 }
12413
12414 // Create: Creates a fleet namespace.
12415 //
12416 // - parent: The parent (project and location) where the Namespace will be
12417 // created. Specified in the format `projects/*/locations/*/scopes/*`.
12418 func (r *ProjectsLocationsScopesNamespacesService) Create(parent string, namespace *Namespace) *ProjectsLocationsScopesNamespacesCreateCall {
12419 c := &ProjectsLocationsScopesNamespacesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12420 c.parent = parent
12421 c.namespace = namespace
12422 return c
12423 }
12424
12425 // ScopeNamespaceId sets the optional parameter "scopeNamespaceId": Required.
12426 // Client chosen ID for the Namespace. `namespace_id` must be a valid RFC 1123
12427 // compliant DNS label: 1. At most 63 characters in length 2. It must consist
12428 // of lower case alphanumeric characters or `-` 3. It must start and end with
12429 // an alphanumeric character Which can be expressed as the regex:
12430 // `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
12431 func (c *ProjectsLocationsScopesNamespacesCreateCall) ScopeNamespaceId(scopeNamespaceId string) *ProjectsLocationsScopesNamespacesCreateCall {
12432 c.urlParams_.Set("scopeNamespaceId", scopeNamespaceId)
12433 return c
12434 }
12435
12436 // Fields allows partial responses to be retrieved. See
12437 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12438 // details.
12439 func (c *ProjectsLocationsScopesNamespacesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesCreateCall {
12440 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12441 return c
12442 }
12443
12444 // Context sets the context to be used in this call's Do method.
12445 func (c *ProjectsLocationsScopesNamespacesCreateCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesCreateCall {
12446 c.ctx_ = ctx
12447 return c
12448 }
12449
12450 // Header returns a http.Header that can be modified by the caller to add
12451 // headers to the request.
12452 func (c *ProjectsLocationsScopesNamespacesCreateCall) Header() http.Header {
12453 if c.header_ == nil {
12454 c.header_ = make(http.Header)
12455 }
12456 return c.header_
12457 }
12458
12459 func (c *ProjectsLocationsScopesNamespacesCreateCall) doRequest(alt string) (*http.Response, error) {
12460 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12461 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.namespace)
12462 if err != nil {
12463 return nil, err
12464 }
12465 c.urlParams_.Set("alt", alt)
12466 c.urlParams_.Set("prettyPrint", "false")
12467 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/namespaces")
12468 urls += "?" + c.urlParams_.Encode()
12469 req, err := http.NewRequest("POST", urls, body)
12470 if err != nil {
12471 return nil, err
12472 }
12473 req.Header = reqHeaders
12474 googleapi.Expand(req.URL, map[string]string{
12475 "parent": c.parent,
12476 })
12477 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.create", "request", internallog.HTTPRequest(req, body.Bytes()))
12478 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12479 }
12480
12481 // Do executes the "gkehub.projects.locations.scopes.namespaces.create" call.
12482 // Any non-2xx status code is an error. Response headers are in either
12483 // *Operation.ServerResponse.Header or (if a response was returned at all) in
12484 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12485 // whether the returned error was because http.StatusNotModified was returned.
12486 func (c *ProjectsLocationsScopesNamespacesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12487 gensupport.SetOptions(c.urlParams_, opts...)
12488 res, err := c.doRequest("json")
12489 if res != nil && res.StatusCode == http.StatusNotModified {
12490 if res.Body != nil {
12491 res.Body.Close()
12492 }
12493 return nil, gensupport.WrapError(&googleapi.Error{
12494 Code: res.StatusCode,
12495 Header: res.Header,
12496 })
12497 }
12498 if err != nil {
12499 return nil, err
12500 }
12501 defer googleapi.CloseBody(res)
12502 if err := googleapi.CheckResponse(res); err != nil {
12503 return nil, gensupport.WrapError(err)
12504 }
12505 ret := &Operation{
12506 ServerResponse: googleapi.ServerResponse{
12507 Header: res.Header,
12508 HTTPStatusCode: res.StatusCode,
12509 },
12510 }
12511 target := &ret
12512 b, err := gensupport.DecodeResponseBytes(target, res)
12513 if err != nil {
12514 return nil, err
12515 }
12516 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.create", "response", internallog.HTTPResponse(res, b))
12517 return ret, nil
12518 }
12519
12520 type ProjectsLocationsScopesNamespacesDeleteCall struct {
12521 s *Service
12522 name string
12523 urlParams_ gensupport.URLParams
12524 ctx_ context.Context
12525 header_ http.Header
12526 }
12527
12528 // Delete: Deletes a fleet namespace.
12529 //
12530 // - name: The Namespace resource name in the format
12531 // `projects/*/locations/*/scopes/*/namespaces/*`.
12532 func (r *ProjectsLocationsScopesNamespacesService) Delete(name string) *ProjectsLocationsScopesNamespacesDeleteCall {
12533 c := &ProjectsLocationsScopesNamespacesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12534 c.name = name
12535 return c
12536 }
12537
12538 // Fields allows partial responses to be retrieved. See
12539 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12540 // details.
12541 func (c *ProjectsLocationsScopesNamespacesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesDeleteCall {
12542 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12543 return c
12544 }
12545
12546 // Context sets the context to be used in this call's Do method.
12547 func (c *ProjectsLocationsScopesNamespacesDeleteCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesDeleteCall {
12548 c.ctx_ = ctx
12549 return c
12550 }
12551
12552 // Header returns a http.Header that can be modified by the caller to add
12553 // headers to the request.
12554 func (c *ProjectsLocationsScopesNamespacesDeleteCall) Header() http.Header {
12555 if c.header_ == nil {
12556 c.header_ = make(http.Header)
12557 }
12558 return c.header_
12559 }
12560
12561 func (c *ProjectsLocationsScopesNamespacesDeleteCall) doRequest(alt string) (*http.Response, error) {
12562 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12563 c.urlParams_.Set("alt", alt)
12564 c.urlParams_.Set("prettyPrint", "false")
12565 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
12566 urls += "?" + c.urlParams_.Encode()
12567 req, err := http.NewRequest("DELETE", urls, nil)
12568 if err != nil {
12569 return nil, err
12570 }
12571 req.Header = reqHeaders
12572 googleapi.Expand(req.URL, map[string]string{
12573 "name": c.name,
12574 })
12575 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.delete", "request", internallog.HTTPRequest(req, nil))
12576 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12577 }
12578
12579 // Do executes the "gkehub.projects.locations.scopes.namespaces.delete" call.
12580 // Any non-2xx status code is an error. Response headers are in either
12581 // *Operation.ServerResponse.Header or (if a response was returned at all) in
12582 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12583 // whether the returned error was because http.StatusNotModified was returned.
12584 func (c *ProjectsLocationsScopesNamespacesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12585 gensupport.SetOptions(c.urlParams_, opts...)
12586 res, err := c.doRequest("json")
12587 if res != nil && res.StatusCode == http.StatusNotModified {
12588 if res.Body != nil {
12589 res.Body.Close()
12590 }
12591 return nil, gensupport.WrapError(&googleapi.Error{
12592 Code: res.StatusCode,
12593 Header: res.Header,
12594 })
12595 }
12596 if err != nil {
12597 return nil, err
12598 }
12599 defer googleapi.CloseBody(res)
12600 if err := googleapi.CheckResponse(res); err != nil {
12601 return nil, gensupport.WrapError(err)
12602 }
12603 ret := &Operation{
12604 ServerResponse: googleapi.ServerResponse{
12605 Header: res.Header,
12606 HTTPStatusCode: res.StatusCode,
12607 },
12608 }
12609 target := &ret
12610 b, err := gensupport.DecodeResponseBytes(target, res)
12611 if err != nil {
12612 return nil, err
12613 }
12614 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.delete", "response", internallog.HTTPResponse(res, b))
12615 return ret, nil
12616 }
12617
12618 type ProjectsLocationsScopesNamespacesGetCall struct {
12619 s *Service
12620 name string
12621 urlParams_ gensupport.URLParams
12622 ifNoneMatch_ string
12623 ctx_ context.Context
12624 header_ http.Header
12625 }
12626
12627 // Get: Returns the details of a fleet namespace.
12628 //
12629 // - name: The Namespace resource name in the format
12630 // `projects/*/locations/*/scopes/*/namespaces/*`.
12631 func (r *ProjectsLocationsScopesNamespacesService) Get(name string) *ProjectsLocationsScopesNamespacesGetCall {
12632 c := &ProjectsLocationsScopesNamespacesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12633 c.name = name
12634 return c
12635 }
12636
12637 // Fields allows partial responses to be retrieved. See
12638 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12639 // details.
12640 func (c *ProjectsLocationsScopesNamespacesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesGetCall {
12641 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12642 return c
12643 }
12644
12645 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12646 // object's ETag matches the given value. This is useful for getting updates
12647 // only after the object has changed since the last request.
12648 func (c *ProjectsLocationsScopesNamespacesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesNamespacesGetCall {
12649 c.ifNoneMatch_ = entityTag
12650 return c
12651 }
12652
12653 // Context sets the context to be used in this call's Do method.
12654 func (c *ProjectsLocationsScopesNamespacesGetCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesGetCall {
12655 c.ctx_ = ctx
12656 return c
12657 }
12658
12659 // Header returns a http.Header that can be modified by the caller to add
12660 // headers to the request.
12661 func (c *ProjectsLocationsScopesNamespacesGetCall) Header() http.Header {
12662 if c.header_ == nil {
12663 c.header_ = make(http.Header)
12664 }
12665 return c.header_
12666 }
12667
12668 func (c *ProjectsLocationsScopesNamespacesGetCall) doRequest(alt string) (*http.Response, error) {
12669 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12670 if c.ifNoneMatch_ != "" {
12671 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12672 }
12673 c.urlParams_.Set("alt", alt)
12674 c.urlParams_.Set("prettyPrint", "false")
12675 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
12676 urls += "?" + c.urlParams_.Encode()
12677 req, err := http.NewRequest("GET", urls, nil)
12678 if err != nil {
12679 return nil, err
12680 }
12681 req.Header = reqHeaders
12682 googleapi.Expand(req.URL, map[string]string{
12683 "name": c.name,
12684 })
12685 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.get", "request", internallog.HTTPRequest(req, nil))
12686 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12687 }
12688
12689 // Do executes the "gkehub.projects.locations.scopes.namespaces.get" call.
12690 // Any non-2xx status code is an error. Response headers are in either
12691 // *Namespace.ServerResponse.Header or (if a response was returned at all) in
12692 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12693 // whether the returned error was because http.StatusNotModified was returned.
12694 func (c *ProjectsLocationsScopesNamespacesGetCall) Do(opts ...googleapi.CallOption) (*Namespace, error) {
12695 gensupport.SetOptions(c.urlParams_, opts...)
12696 res, err := c.doRequest("json")
12697 if res != nil && res.StatusCode == http.StatusNotModified {
12698 if res.Body != nil {
12699 res.Body.Close()
12700 }
12701 return nil, gensupport.WrapError(&googleapi.Error{
12702 Code: res.StatusCode,
12703 Header: res.Header,
12704 })
12705 }
12706 if err != nil {
12707 return nil, err
12708 }
12709 defer googleapi.CloseBody(res)
12710 if err := googleapi.CheckResponse(res); err != nil {
12711 return nil, gensupport.WrapError(err)
12712 }
12713 ret := &Namespace{
12714 ServerResponse: googleapi.ServerResponse{
12715 Header: res.Header,
12716 HTTPStatusCode: res.StatusCode,
12717 },
12718 }
12719 target := &ret
12720 b, err := gensupport.DecodeResponseBytes(target, res)
12721 if err != nil {
12722 return nil, err
12723 }
12724 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.get", "response", internallog.HTTPResponse(res, b))
12725 return ret, nil
12726 }
12727
12728 type ProjectsLocationsScopesNamespacesListCall struct {
12729 s *Service
12730 parent string
12731 urlParams_ gensupport.URLParams
12732 ifNoneMatch_ string
12733 ctx_ context.Context
12734 header_ http.Header
12735 }
12736
12737 // List: Lists fleet namespaces.
12738 //
12739 // - parent: The parent (project and location) where the Features will be
12740 // listed. Specified in the format `projects/*/locations/*/scopes/*`.
12741 func (r *ProjectsLocationsScopesNamespacesService) List(parent string) *ProjectsLocationsScopesNamespacesListCall {
12742 c := &ProjectsLocationsScopesNamespacesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12743 c.parent = parent
12744 return c
12745 }
12746
12747 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
12748 // resources, `page_size` specifies number of resources to return. If
12749 // unspecified or set to 0, all resources will be returned.
12750 func (c *ProjectsLocationsScopesNamespacesListCall) PageSize(pageSize int64) *ProjectsLocationsScopesNamespacesListCall {
12751 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12752 return c
12753 }
12754
12755 // PageToken sets the optional parameter "pageToken": Token returned by
12756 // previous call to `ListFeatures` which specifies the position in the list
12757 // from where to continue listing the resources.
12758 func (c *ProjectsLocationsScopesNamespacesListCall) PageToken(pageToken string) *ProjectsLocationsScopesNamespacesListCall {
12759 c.urlParams_.Set("pageToken", pageToken)
12760 return c
12761 }
12762
12763 // Fields allows partial responses to be retrieved. See
12764 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12765 // details.
12766 func (c *ProjectsLocationsScopesNamespacesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesListCall {
12767 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12768 return c
12769 }
12770
12771 // IfNoneMatch sets an optional parameter which makes the operation fail if the
12772 // object's ETag matches the given value. This is useful for getting updates
12773 // only after the object has changed since the last request.
12774 func (c *ProjectsLocationsScopesNamespacesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesNamespacesListCall {
12775 c.ifNoneMatch_ = entityTag
12776 return c
12777 }
12778
12779 // Context sets the context to be used in this call's Do method.
12780 func (c *ProjectsLocationsScopesNamespacesListCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesListCall {
12781 c.ctx_ = ctx
12782 return c
12783 }
12784
12785 // Header returns a http.Header that can be modified by the caller to add
12786 // headers to the request.
12787 func (c *ProjectsLocationsScopesNamespacesListCall) Header() http.Header {
12788 if c.header_ == nil {
12789 c.header_ = make(http.Header)
12790 }
12791 return c.header_
12792 }
12793
12794 func (c *ProjectsLocationsScopesNamespacesListCall) doRequest(alt string) (*http.Response, error) {
12795 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12796 if c.ifNoneMatch_ != "" {
12797 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12798 }
12799 c.urlParams_.Set("alt", alt)
12800 c.urlParams_.Set("prettyPrint", "false")
12801 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/namespaces")
12802 urls += "?" + c.urlParams_.Encode()
12803 req, err := http.NewRequest("GET", urls, nil)
12804 if err != nil {
12805 return nil, err
12806 }
12807 req.Header = reqHeaders
12808 googleapi.Expand(req.URL, map[string]string{
12809 "parent": c.parent,
12810 })
12811 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.list", "request", internallog.HTTPRequest(req, nil))
12812 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12813 }
12814
12815 // Do executes the "gkehub.projects.locations.scopes.namespaces.list" call.
12816 // Any non-2xx status code is an error. Response headers are in either
12817 // *ListScopeNamespacesResponse.ServerResponse.Header or (if a response was
12818 // returned at all) in error.(*googleapi.Error).Header. Use
12819 // googleapi.IsNotModified to check whether the returned error was because
12820 // http.StatusNotModified was returned.
12821 func (c *ProjectsLocationsScopesNamespacesListCall) Do(opts ...googleapi.CallOption) (*ListScopeNamespacesResponse, error) {
12822 gensupport.SetOptions(c.urlParams_, opts...)
12823 res, err := c.doRequest("json")
12824 if res != nil && res.StatusCode == http.StatusNotModified {
12825 if res.Body != nil {
12826 res.Body.Close()
12827 }
12828 return nil, gensupport.WrapError(&googleapi.Error{
12829 Code: res.StatusCode,
12830 Header: res.Header,
12831 })
12832 }
12833 if err != nil {
12834 return nil, err
12835 }
12836 defer googleapi.CloseBody(res)
12837 if err := googleapi.CheckResponse(res); err != nil {
12838 return nil, gensupport.WrapError(err)
12839 }
12840 ret := &ListScopeNamespacesResponse{
12841 ServerResponse: googleapi.ServerResponse{
12842 Header: res.Header,
12843 HTTPStatusCode: res.StatusCode,
12844 },
12845 }
12846 target := &ret
12847 b, err := gensupport.DecodeResponseBytes(target, res)
12848 if err != nil {
12849 return nil, err
12850 }
12851 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.list", "response", internallog.HTTPResponse(res, b))
12852 return ret, nil
12853 }
12854
12855 // Pages invokes f for each page of results.
12856 // A non-nil error returned from f will halt the iteration.
12857 // The provided context supersedes any context provided to the Context method.
12858 func (c *ProjectsLocationsScopesNamespacesListCall) Pages(ctx context.Context, f func(*ListScopeNamespacesResponse) error) error {
12859 c.ctx_ = ctx
12860 defer c.PageToken(c.urlParams_.Get("pageToken"))
12861 for {
12862 x, err := c.Do()
12863 if err != nil {
12864 return err
12865 }
12866 if err := f(x); err != nil {
12867 return err
12868 }
12869 if x.NextPageToken == "" {
12870 return nil
12871 }
12872 c.PageToken(x.NextPageToken)
12873 }
12874 }
12875
12876 type ProjectsLocationsScopesNamespacesPatchCall struct {
12877 s *Service
12878 name string
12879 namespace *Namespace
12880 urlParams_ gensupport.URLParams
12881 ctx_ context.Context
12882 header_ http.Header
12883 }
12884
12885 // Patch: Updates a fleet namespace.
12886 //
12887 // - name: The resource name for the namespace
12888 // `projects/{project}/locations/{location}/namespaces/{namespace}`.
12889 func (r *ProjectsLocationsScopesNamespacesService) Patch(name string, namespace *Namespace) *ProjectsLocationsScopesNamespacesPatchCall {
12890 c := &ProjectsLocationsScopesNamespacesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12891 c.name = name
12892 c.namespace = namespace
12893 return c
12894 }
12895
12896 // UpdateMask sets the optional parameter "updateMask": Required. The fields to
12897 // be updated.
12898 func (c *ProjectsLocationsScopesNamespacesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsScopesNamespacesPatchCall {
12899 c.urlParams_.Set("updateMask", updateMask)
12900 return c
12901 }
12902
12903 // Fields allows partial responses to be retrieved. See
12904 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
12905 // details.
12906 func (c *ProjectsLocationsScopesNamespacesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesNamespacesPatchCall {
12907 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12908 return c
12909 }
12910
12911 // Context sets the context to be used in this call's Do method.
12912 func (c *ProjectsLocationsScopesNamespacesPatchCall) Context(ctx context.Context) *ProjectsLocationsScopesNamespacesPatchCall {
12913 c.ctx_ = ctx
12914 return c
12915 }
12916
12917 // Header returns a http.Header that can be modified by the caller to add
12918 // headers to the request.
12919 func (c *ProjectsLocationsScopesNamespacesPatchCall) Header() http.Header {
12920 if c.header_ == nil {
12921 c.header_ = make(http.Header)
12922 }
12923 return c.header_
12924 }
12925
12926 func (c *ProjectsLocationsScopesNamespacesPatchCall) doRequest(alt string) (*http.Response, error) {
12927 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12928 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.namespace)
12929 if err != nil {
12930 return nil, err
12931 }
12932 c.urlParams_.Set("alt", alt)
12933 c.urlParams_.Set("prettyPrint", "false")
12934 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
12935 urls += "?" + c.urlParams_.Encode()
12936 req, err := http.NewRequest("PATCH", urls, body)
12937 if err != nil {
12938 return nil, err
12939 }
12940 req.Header = reqHeaders
12941 googleapi.Expand(req.URL, map[string]string{
12942 "name": c.name,
12943 })
12944 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
12945 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12946 }
12947
12948 // Do executes the "gkehub.projects.locations.scopes.namespaces.patch" call.
12949 // Any non-2xx status code is an error. Response headers are in either
12950 // *Operation.ServerResponse.Header or (if a response was returned at all) in
12951 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12952 // whether the returned error was because http.StatusNotModified was returned.
12953 func (c *ProjectsLocationsScopesNamespacesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12954 gensupport.SetOptions(c.urlParams_, opts...)
12955 res, err := c.doRequest("json")
12956 if res != nil && res.StatusCode == http.StatusNotModified {
12957 if res.Body != nil {
12958 res.Body.Close()
12959 }
12960 return nil, gensupport.WrapError(&googleapi.Error{
12961 Code: res.StatusCode,
12962 Header: res.Header,
12963 })
12964 }
12965 if err != nil {
12966 return nil, err
12967 }
12968 defer googleapi.CloseBody(res)
12969 if err := googleapi.CheckResponse(res); err != nil {
12970 return nil, gensupport.WrapError(err)
12971 }
12972 ret := &Operation{
12973 ServerResponse: googleapi.ServerResponse{
12974 Header: res.Header,
12975 HTTPStatusCode: res.StatusCode,
12976 },
12977 }
12978 target := &ret
12979 b, err := gensupport.DecodeResponseBytes(target, res)
12980 if err != nil {
12981 return nil, err
12982 }
12983 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.namespaces.patch", "response", internallog.HTTPResponse(res, b))
12984 return ret, nil
12985 }
12986
12987 type ProjectsLocationsScopesRbacrolebindingsCreateCall struct {
12988 s *Service
12989 parent string
12990 rbacrolebinding *RBACRoleBinding
12991 urlParams_ gensupport.URLParams
12992 ctx_ context.Context
12993 header_ http.Header
12994 }
12995
12996 // Create: Creates a Scope RBACRoleBinding.
12997 //
12998 // - parent: The parent (project and location) where the RBACRoleBinding will
12999 // be created. Specified in the format `projects/*/locations/*/scopes/*`.
13000 func (r *ProjectsLocationsScopesRbacrolebindingsService) Create(parent string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsScopesRbacrolebindingsCreateCall {
13001 c := &ProjectsLocationsScopesRbacrolebindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13002 c.parent = parent
13003 c.rbacrolebinding = rbacrolebinding
13004 return c
13005 }
13006
13007 // RbacrolebindingId sets the optional parameter "rbacrolebindingId": Required.
13008 // Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a
13009 // valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It
13010 // must consist of lower case alphanumeric characters or `-` 3. It must start
13011 // and end with an alphanumeric character Which can be expressed as the regex:
13012 // `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
13013 func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) RbacrolebindingId(rbacrolebindingId string) *ProjectsLocationsScopesRbacrolebindingsCreateCall {
13014 c.urlParams_.Set("rbacrolebindingId", rbacrolebindingId)
13015 return c
13016 }
13017
13018 // Fields allows partial responses to be retrieved. See
13019 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13020 // details.
13021 func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsCreateCall {
13022 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13023 return c
13024 }
13025
13026 // Context sets the context to be used in this call's Do method.
13027 func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsCreateCall {
13028 c.ctx_ = ctx
13029 return c
13030 }
13031
13032 // Header returns a http.Header that can be modified by the caller to add
13033 // headers to the request.
13034 func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) Header() http.Header {
13035 if c.header_ == nil {
13036 c.header_ = make(http.Header)
13037 }
13038 return c.header_
13039 }
13040
13041 func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) doRequest(alt string) (*http.Response, error) {
13042 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13043 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rbacrolebinding)
13044 if err != nil {
13045 return nil, err
13046 }
13047 c.urlParams_.Set("alt", alt)
13048 c.urlParams_.Set("prettyPrint", "false")
13049 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/rbacrolebindings")
13050 urls += "?" + c.urlParams_.Encode()
13051 req, err := http.NewRequest("POST", urls, body)
13052 if err != nil {
13053 return nil, err
13054 }
13055 req.Header = reqHeaders
13056 googleapi.Expand(req.URL, map[string]string{
13057 "parent": c.parent,
13058 })
13059 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.create", "request", internallog.HTTPRequest(req, body.Bytes()))
13060 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13061 }
13062
13063 // Do executes the "gkehub.projects.locations.scopes.rbacrolebindings.create" call.
13064 // Any non-2xx status code is an error. Response headers are in either
13065 // *Operation.ServerResponse.Header or (if a response was returned at all) in
13066 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13067 // whether the returned error was because http.StatusNotModified was returned.
13068 func (c *ProjectsLocationsScopesRbacrolebindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13069 gensupport.SetOptions(c.urlParams_, opts...)
13070 res, err := c.doRequest("json")
13071 if res != nil && res.StatusCode == http.StatusNotModified {
13072 if res.Body != nil {
13073 res.Body.Close()
13074 }
13075 return nil, gensupport.WrapError(&googleapi.Error{
13076 Code: res.StatusCode,
13077 Header: res.Header,
13078 })
13079 }
13080 if err != nil {
13081 return nil, err
13082 }
13083 defer googleapi.CloseBody(res)
13084 if err := googleapi.CheckResponse(res); err != nil {
13085 return nil, gensupport.WrapError(err)
13086 }
13087 ret := &Operation{
13088 ServerResponse: googleapi.ServerResponse{
13089 Header: res.Header,
13090 HTTPStatusCode: res.StatusCode,
13091 },
13092 }
13093 target := &ret
13094 b, err := gensupport.DecodeResponseBytes(target, res)
13095 if err != nil {
13096 return nil, err
13097 }
13098 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.create", "response", internallog.HTTPResponse(res, b))
13099 return ret, nil
13100 }
13101
13102 type ProjectsLocationsScopesRbacrolebindingsDeleteCall struct {
13103 s *Service
13104 name string
13105 urlParams_ gensupport.URLParams
13106 ctx_ context.Context
13107 header_ http.Header
13108 }
13109
13110 // Delete: Deletes a Scope RBACRoleBinding.
13111 //
13112 // - name: The RBACRoleBinding resource name in the format
13113 // `projects/*/locations/*/scopes/*/rbacrolebindings/*`.
13114 func (r *ProjectsLocationsScopesRbacrolebindingsService) Delete(name string) *ProjectsLocationsScopesRbacrolebindingsDeleteCall {
13115 c := &ProjectsLocationsScopesRbacrolebindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13116 c.name = name
13117 return c
13118 }
13119
13120 // Fields allows partial responses to be retrieved. See
13121 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13122 // details.
13123 func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsDeleteCall {
13124 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13125 return c
13126 }
13127
13128 // Context sets the context to be used in this call's Do method.
13129 func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsDeleteCall {
13130 c.ctx_ = ctx
13131 return c
13132 }
13133
13134 // Header returns a http.Header that can be modified by the caller to add
13135 // headers to the request.
13136 func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Header() http.Header {
13137 if c.header_ == nil {
13138 c.header_ = make(http.Header)
13139 }
13140 return c.header_
13141 }
13142
13143 func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) doRequest(alt string) (*http.Response, error) {
13144 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13145 c.urlParams_.Set("alt", alt)
13146 c.urlParams_.Set("prettyPrint", "false")
13147 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
13148 urls += "?" + c.urlParams_.Encode()
13149 req, err := http.NewRequest("DELETE", urls, nil)
13150 if err != nil {
13151 return nil, err
13152 }
13153 req.Header = reqHeaders
13154 googleapi.Expand(req.URL, map[string]string{
13155 "name": c.name,
13156 })
13157 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.delete", "request", internallog.HTTPRequest(req, nil))
13158 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13159 }
13160
13161 // Do executes the "gkehub.projects.locations.scopes.rbacrolebindings.delete" call.
13162 // Any non-2xx status code is an error. Response headers are in either
13163 // *Operation.ServerResponse.Header or (if a response was returned at all) in
13164 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13165 // whether the returned error was because http.StatusNotModified was returned.
13166 func (c *ProjectsLocationsScopesRbacrolebindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13167 gensupport.SetOptions(c.urlParams_, opts...)
13168 res, err := c.doRequest("json")
13169 if res != nil && res.StatusCode == http.StatusNotModified {
13170 if res.Body != nil {
13171 res.Body.Close()
13172 }
13173 return nil, gensupport.WrapError(&googleapi.Error{
13174 Code: res.StatusCode,
13175 Header: res.Header,
13176 })
13177 }
13178 if err != nil {
13179 return nil, err
13180 }
13181 defer googleapi.CloseBody(res)
13182 if err := googleapi.CheckResponse(res); err != nil {
13183 return nil, gensupport.WrapError(err)
13184 }
13185 ret := &Operation{
13186 ServerResponse: googleapi.ServerResponse{
13187 Header: res.Header,
13188 HTTPStatusCode: res.StatusCode,
13189 },
13190 }
13191 target := &ret
13192 b, err := gensupport.DecodeResponseBytes(target, res)
13193 if err != nil {
13194 return nil, err
13195 }
13196 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.delete", "response", internallog.HTTPResponse(res, b))
13197 return ret, nil
13198 }
13199
13200 type ProjectsLocationsScopesRbacrolebindingsGetCall struct {
13201 s *Service
13202 name string
13203 urlParams_ gensupport.URLParams
13204 ifNoneMatch_ string
13205 ctx_ context.Context
13206 header_ http.Header
13207 }
13208
13209 // Get: Returns the details of a Scope RBACRoleBinding.
13210 //
13211 // - name: The RBACRoleBinding resource name in the format
13212 // `projects/*/locations/*/scopes/*/rbacrolebindings/*`.
13213 func (r *ProjectsLocationsScopesRbacrolebindingsService) Get(name string) *ProjectsLocationsScopesRbacrolebindingsGetCall {
13214 c := &ProjectsLocationsScopesRbacrolebindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13215 c.name = name
13216 return c
13217 }
13218
13219 // Fields allows partial responses to be retrieved. See
13220 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13221 // details.
13222 func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsGetCall {
13223 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13224 return c
13225 }
13226
13227 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13228 // object's ETag matches the given value. This is useful for getting updates
13229 // only after the object has changed since the last request.
13230 func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesRbacrolebindingsGetCall {
13231 c.ifNoneMatch_ = entityTag
13232 return c
13233 }
13234
13235 // Context sets the context to be used in this call's Do method.
13236 func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsGetCall {
13237 c.ctx_ = ctx
13238 return c
13239 }
13240
13241 // Header returns a http.Header that can be modified by the caller to add
13242 // headers to the request.
13243 func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Header() http.Header {
13244 if c.header_ == nil {
13245 c.header_ = make(http.Header)
13246 }
13247 return c.header_
13248 }
13249
13250 func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) doRequest(alt string) (*http.Response, error) {
13251 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13252 if c.ifNoneMatch_ != "" {
13253 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13254 }
13255 c.urlParams_.Set("alt", alt)
13256 c.urlParams_.Set("prettyPrint", "false")
13257 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
13258 urls += "?" + c.urlParams_.Encode()
13259 req, err := http.NewRequest("GET", urls, nil)
13260 if err != nil {
13261 return nil, err
13262 }
13263 req.Header = reqHeaders
13264 googleapi.Expand(req.URL, map[string]string{
13265 "name": c.name,
13266 })
13267 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.get", "request", internallog.HTTPRequest(req, nil))
13268 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13269 }
13270
13271 // Do executes the "gkehub.projects.locations.scopes.rbacrolebindings.get" call.
13272 // Any non-2xx status code is an error. Response headers are in either
13273 // *RBACRoleBinding.ServerResponse.Header or (if a response was returned at
13274 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13275 // check whether the returned error was because http.StatusNotModified was
13276 // returned.
13277 func (c *ProjectsLocationsScopesRbacrolebindingsGetCall) Do(opts ...googleapi.CallOption) (*RBACRoleBinding, error) {
13278 gensupport.SetOptions(c.urlParams_, opts...)
13279 res, err := c.doRequest("json")
13280 if res != nil && res.StatusCode == http.StatusNotModified {
13281 if res.Body != nil {
13282 res.Body.Close()
13283 }
13284 return nil, gensupport.WrapError(&googleapi.Error{
13285 Code: res.StatusCode,
13286 Header: res.Header,
13287 })
13288 }
13289 if err != nil {
13290 return nil, err
13291 }
13292 defer googleapi.CloseBody(res)
13293 if err := googleapi.CheckResponse(res); err != nil {
13294 return nil, gensupport.WrapError(err)
13295 }
13296 ret := &RBACRoleBinding{
13297 ServerResponse: googleapi.ServerResponse{
13298 Header: res.Header,
13299 HTTPStatusCode: res.StatusCode,
13300 },
13301 }
13302 target := &ret
13303 b, err := gensupport.DecodeResponseBytes(target, res)
13304 if err != nil {
13305 return nil, err
13306 }
13307 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.get", "response", internallog.HTTPResponse(res, b))
13308 return ret, nil
13309 }
13310
13311 type ProjectsLocationsScopesRbacrolebindingsListCall struct {
13312 s *Service
13313 parent string
13314 urlParams_ gensupport.URLParams
13315 ifNoneMatch_ string
13316 ctx_ context.Context
13317 header_ http.Header
13318 }
13319
13320 // List: Lists all Scope RBACRoleBindings.
13321 //
13322 // - parent: The parent (project and location) where the Features will be
13323 // listed. Specified in the format `projects/*/locations/*/scopes/*`.
13324 func (r *ProjectsLocationsScopesRbacrolebindingsService) List(parent string) *ProjectsLocationsScopesRbacrolebindingsListCall {
13325 c := &ProjectsLocationsScopesRbacrolebindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13326 c.parent = parent
13327 return c
13328 }
13329
13330 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
13331 // resources, `page_size` specifies number of resources to return. If
13332 // unspecified or set to 0, all resources will be returned.
13333 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) PageSize(pageSize int64) *ProjectsLocationsScopesRbacrolebindingsListCall {
13334 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13335 return c
13336 }
13337
13338 // PageToken sets the optional parameter "pageToken": Token returned by
13339 // previous call to `ListScopeRBACRoleBindings` which specifies the position in
13340 // the list from where to continue listing the resources.
13341 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) PageToken(pageToken string) *ProjectsLocationsScopesRbacrolebindingsListCall {
13342 c.urlParams_.Set("pageToken", pageToken)
13343 return c
13344 }
13345
13346 // Fields allows partial responses to be retrieved. See
13347 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13348 // details.
13349 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsListCall {
13350 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13351 return c
13352 }
13353
13354 // IfNoneMatch sets an optional parameter which makes the operation fail if the
13355 // object's ETag matches the given value. This is useful for getting updates
13356 // only after the object has changed since the last request.
13357 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesRbacrolebindingsListCall {
13358 c.ifNoneMatch_ = entityTag
13359 return c
13360 }
13361
13362 // Context sets the context to be used in this call's Do method.
13363 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsListCall {
13364 c.ctx_ = ctx
13365 return c
13366 }
13367
13368 // Header returns a http.Header that can be modified by the caller to add
13369 // headers to the request.
13370 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Header() http.Header {
13371 if c.header_ == nil {
13372 c.header_ = make(http.Header)
13373 }
13374 return c.header_
13375 }
13376
13377 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) doRequest(alt string) (*http.Response, error) {
13378 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13379 if c.ifNoneMatch_ != "" {
13380 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13381 }
13382 c.urlParams_.Set("alt", alt)
13383 c.urlParams_.Set("prettyPrint", "false")
13384 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/rbacrolebindings")
13385 urls += "?" + c.urlParams_.Encode()
13386 req, err := http.NewRequest("GET", urls, nil)
13387 if err != nil {
13388 return nil, err
13389 }
13390 req.Header = reqHeaders
13391 googleapi.Expand(req.URL, map[string]string{
13392 "parent": c.parent,
13393 })
13394 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.list", "request", internallog.HTTPRequest(req, nil))
13395 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13396 }
13397
13398 // Do executes the "gkehub.projects.locations.scopes.rbacrolebindings.list" call.
13399 // Any non-2xx status code is an error. Response headers are in either
13400 // *ListScopeRBACRoleBindingsResponse.ServerResponse.Header or (if a response
13401 // was returned at all) in error.(*googleapi.Error).Header. Use
13402 // googleapi.IsNotModified to check whether the returned error was because
13403 // http.StatusNotModified was returned.
13404 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Do(opts ...googleapi.CallOption) (*ListScopeRBACRoleBindingsResponse, error) {
13405 gensupport.SetOptions(c.urlParams_, opts...)
13406 res, err := c.doRequest("json")
13407 if res != nil && res.StatusCode == http.StatusNotModified {
13408 if res.Body != nil {
13409 res.Body.Close()
13410 }
13411 return nil, gensupport.WrapError(&googleapi.Error{
13412 Code: res.StatusCode,
13413 Header: res.Header,
13414 })
13415 }
13416 if err != nil {
13417 return nil, err
13418 }
13419 defer googleapi.CloseBody(res)
13420 if err := googleapi.CheckResponse(res); err != nil {
13421 return nil, gensupport.WrapError(err)
13422 }
13423 ret := &ListScopeRBACRoleBindingsResponse{
13424 ServerResponse: googleapi.ServerResponse{
13425 Header: res.Header,
13426 HTTPStatusCode: res.StatusCode,
13427 },
13428 }
13429 target := &ret
13430 b, err := gensupport.DecodeResponseBytes(target, res)
13431 if err != nil {
13432 return nil, err
13433 }
13434 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.list", "response", internallog.HTTPResponse(res, b))
13435 return ret, nil
13436 }
13437
13438 // Pages invokes f for each page of results.
13439 // A non-nil error returned from f will halt the iteration.
13440 // The provided context supersedes any context provided to the Context method.
13441 func (c *ProjectsLocationsScopesRbacrolebindingsListCall) Pages(ctx context.Context, f func(*ListScopeRBACRoleBindingsResponse) error) error {
13442 c.ctx_ = ctx
13443 defer c.PageToken(c.urlParams_.Get("pageToken"))
13444 for {
13445 x, err := c.Do()
13446 if err != nil {
13447 return err
13448 }
13449 if err := f(x); err != nil {
13450 return err
13451 }
13452 if x.NextPageToken == "" {
13453 return nil
13454 }
13455 c.PageToken(x.NextPageToken)
13456 }
13457 }
13458
13459 type ProjectsLocationsScopesRbacrolebindingsPatchCall struct {
13460 s *Service
13461 name string
13462 rbacrolebinding *RBACRoleBinding
13463 urlParams_ gensupport.URLParams
13464 ctx_ context.Context
13465 header_ http.Header
13466 }
13467
13468 // Patch: Updates a Scope RBACRoleBinding.
13469 //
13470 // - name: The resource name for the rbacrolebinding
13471 // `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{r
13472 // bacrolebinding}` or
13473 // `projects/{project}/locations/{location}/memberships/{membership}/rbacroleb
13474 // indings/{rbacrolebinding}`.
13475 func (r *ProjectsLocationsScopesRbacrolebindingsService) Patch(name string, rbacrolebinding *RBACRoleBinding) *ProjectsLocationsScopesRbacrolebindingsPatchCall {
13476 c := &ProjectsLocationsScopesRbacrolebindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13477 c.name = name
13478 c.rbacrolebinding = rbacrolebinding
13479 return c
13480 }
13481
13482 // UpdateMask sets the optional parameter "updateMask": Required. The fields to
13483 // be updated.
13484 func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsScopesRbacrolebindingsPatchCall {
13485 c.urlParams_.Set("updateMask", updateMask)
13486 return c
13487 }
13488
13489 // Fields allows partial responses to be retrieved. See
13490 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
13491 // details.
13492 func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesRbacrolebindingsPatchCall {
13493 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13494 return c
13495 }
13496
13497 // Context sets the context to be used in this call's Do method.
13498 func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsScopesRbacrolebindingsPatchCall {
13499 c.ctx_ = ctx
13500 return c
13501 }
13502
13503 // Header returns a http.Header that can be modified by the caller to add
13504 // headers to the request.
13505 func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) Header() http.Header {
13506 if c.header_ == nil {
13507 c.header_ = make(http.Header)
13508 }
13509 return c.header_
13510 }
13511
13512 func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) doRequest(alt string) (*http.Response, error) {
13513 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13514 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rbacrolebinding)
13515 if err != nil {
13516 return nil, err
13517 }
13518 c.urlParams_.Set("alt", alt)
13519 c.urlParams_.Set("prettyPrint", "false")
13520 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
13521 urls += "?" + c.urlParams_.Encode()
13522 req, err := http.NewRequest("PATCH", urls, body)
13523 if err != nil {
13524 return nil, err
13525 }
13526 req.Header = reqHeaders
13527 googleapi.Expand(req.URL, map[string]string{
13528 "name": c.name,
13529 })
13530 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
13531 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13532 }
13533
13534 // Do executes the "gkehub.projects.locations.scopes.rbacrolebindings.patch" call.
13535 // Any non-2xx status code is an error. Response headers are in either
13536 // *Operation.ServerResponse.Header or (if a response was returned at all) in
13537 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13538 // whether the returned error was because http.StatusNotModified was returned.
13539 func (c *ProjectsLocationsScopesRbacrolebindingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13540 gensupport.SetOptions(c.urlParams_, opts...)
13541 res, err := c.doRequest("json")
13542 if res != nil && res.StatusCode == http.StatusNotModified {
13543 if res.Body != nil {
13544 res.Body.Close()
13545 }
13546 return nil, gensupport.WrapError(&googleapi.Error{
13547 Code: res.StatusCode,
13548 Header: res.Header,
13549 })
13550 }
13551 if err != nil {
13552 return nil, err
13553 }
13554 defer googleapi.CloseBody(res)
13555 if err := googleapi.CheckResponse(res); err != nil {
13556 return nil, gensupport.WrapError(err)
13557 }
13558 ret := &Operation{
13559 ServerResponse: googleapi.ServerResponse{
13560 Header: res.Header,
13561 HTTPStatusCode: res.StatusCode,
13562 },
13563 }
13564 target := &ret
13565 b, err := gensupport.DecodeResponseBytes(target, res)
13566 if err != nil {
13567 return nil, err
13568 }
13569 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.scopes.rbacrolebindings.patch", "response", internallog.HTTPResponse(res, b))
13570 return ret, nil
13571 }