Debian Codegraph @

gkehub/v2beta/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/v2beta"
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/v2beta"
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:v2beta"
93 const apiName = "gkehub"
94 const apiVersion = "v2beta"
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.Projects = NewProjectsService(s)
123 if endpoint != "" {
124 s.BasePath = endpoint
125 }
126 return s, nil
127 }
128
129 // New creates a new Service. It uses the provided http.Client for requests.
130 //
131 // Deprecated: please use NewService instead.
132 // To provide a custom HTTP client, use option.WithHTTPClient.
133 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
134 func New(client *http.Client) (*Service, error) {
135 if client == nil {
136 return nil, errors.New("client is nil")
137 }
138 return NewService(context.TODO(), option.WithHTTPClient(client))
139 }
140
141 type Service struct {
142 client *http.Client
143 logger *slog.Logger
144 BasePath string // API endpoint base URL
145 UserAgent string // optional additional User-Agent fragment
146
147 Projects *ProjectsService
148 }
149
150 func (s *Service) userAgent() string {
151 if s.UserAgent == "" {
152 return googleapi.UserAgent
153 }
154 return googleapi.UserAgent + " " + s.UserAgent
155 }
156
157 func NewProjectsService(s *Service) *ProjectsService {
158 rs := &ProjectsService{s: s}
159 rs.Locations = NewProjectsLocationsService(s)
160 return rs
161 }
162
163 type ProjectsService struct {
164 s *Service
165
166 Locations *ProjectsLocationsService
167 }
168
169 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
170 rs := &ProjectsLocationsService{s: s}
171 rs.Memberships = NewProjectsLocationsMembershipsService(s)
172 rs.Operations = NewProjectsLocationsOperationsService(s)
173 return rs
174 }
175
176 type ProjectsLocationsService struct {
177 s *Service
178
179 Memberships *ProjectsLocationsMembershipsService
180
181 Operations *ProjectsLocationsOperationsService
182 }
183
184 func NewProjectsLocationsMembershipsService(s *Service) *ProjectsLocationsMembershipsService {
185 rs := &ProjectsLocationsMembershipsService{s: s}
186 rs.Features = NewProjectsLocationsMembershipsFeaturesService(s)
187 return rs
188 }
189
190 type ProjectsLocationsMembershipsService struct {
191 s *Service
192
193 Features *ProjectsLocationsMembershipsFeaturesService
194 }
195
196 func NewProjectsLocationsMembershipsFeaturesService(s *Service) *ProjectsLocationsMembershipsFeaturesService {
197 rs := &ProjectsLocationsMembershipsFeaturesService{s: s}
198 return rs
199 }
200
201 type ProjectsLocationsMembershipsFeaturesService struct {
202 s *Service
203 }
204
205 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
206 rs := &ProjectsLocationsOperationsService{s: s}
207 return rs
208 }
209
210 type ProjectsLocationsOperationsService struct {
211 s *Service
212 }
213
214 // AppDevExperienceState: State for App Dev Exp Feature.
215 type AppDevExperienceState struct {
216 // NetworkingInstallSucceeded: Status of subcomponent that detects configured
217 // Service Mesh resources.
218 NetworkingInstallSucceeded *AppDevExperienceStatus `json:"networkingInstallSucceeded,omitempty"`
219 // ForceSendFields is a list of field names (e.g. "NetworkingInstallSucceeded")
220 // to unconditionally include in API requests. By default, fields with empty or
221 // default values are omitted from API requests. See
222 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
223 // details.
224 ForceSendFields []string `json:"-"`
225 // NullFields is a list of field names (e.g. "NetworkingInstallSucceeded") to
226 // include in API requests with the JSON null value. By default, fields with
227 // empty values are omitted from API requests. See
228 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
229 NullFields []string `json:"-"`
230 }
231
232 func (s AppDevExperienceState) MarshalJSON() ([]byte, error) {
233 type NoMethod AppDevExperienceState
234 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
235 }
236
237 // AppDevExperienceStatus: Status specifies state for the subcomponent.
238 type AppDevExperienceStatus struct {
239 // Code: Code specifies AppDevExperienceFeature's subcomponent ready state.
240 //
241 // Possible values:
242 // "CODE_UNSPECIFIED" - Not set.
243 // "OK" - AppDevExperienceFeature's specified subcomponent is ready.
244 // "FAILED" - AppDevExperienceFeature's specified subcomponent ready state is
245 // false. This means AppDevExperienceFeature has encountered an issue that
246 // blocks all, or a portion, of its normal operation. See the `description` for
247 // more details.
248 // "UNKNOWN" - AppDevExperienceFeature's specified subcomponent has a pending
249 // or unknown state.
250 Code string `json:"code,omitempty"`
251 // Description: Description is populated if Code is Failed, explaining why it
252 // has failed.
253 Description string `json:"description,omitempty"`
254 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
255 // include in API requests. By default, fields with empty or default values are
256 // omitted from API requests. See
257 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
258 // details.
259 ForceSendFields []string `json:"-"`
260 // NullFields is a list of field names (e.g. "Code") to include in API requests
261 // with the JSON null value. By default, fields with empty values are omitted
262 // from API requests. See
263 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
264 NullFields []string `json:"-"`
265 }
266
267 func (s AppDevExperienceStatus) MarshalJSON() ([]byte, error) {
268 type NoMethod AppDevExperienceStatus
269 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
270 }
271
272 // CancelOperationRequest: The request message for Operations.CancelOperation.
273 type CancelOperationRequest struct {
274 }
275
276 // CloudBuildSpec: **Cloud Build**: Configurations for each Cloud Build enabled
277 // cluster.
278 type CloudBuildSpec struct {
279 // SecurityPolicy: Whether it is allowed to run the privileged builds on the
280 // cluster or not.
281 //
282 // Possible values:
283 // "SECURITY_POLICY_UNSPECIFIED" - Unspecified policy
284 // "NON_PRIVILEGED" - Privileged build pods are disallowed
285 // "PRIVILEGED" - Privileged build pods are allowed
286 SecurityPolicy string `json:"securityPolicy,omitempty"`
287 // Version: Version of the cloud build software on the cluster.
288 Version string `json:"version,omitempty"`
289 // ForceSendFields is a list of field names (e.g. "SecurityPolicy") to
290 // unconditionally include in API requests. By default, fields with empty or
291 // default values are omitted from API requests. See
292 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
293 // details.
294 ForceSendFields []string `json:"-"`
295 // NullFields is a list of field names (e.g. "SecurityPolicy") to include in
296 // API requests with the JSON null value. By default, fields with empty values
297 // are omitted from API requests. See
298 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
299 NullFields []string `json:"-"`
300 }
301
302 func (s CloudBuildSpec) MarshalJSON() ([]byte, error) {
303 type NoMethod CloudBuildSpec
304 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
305 }
306
307 // ClusterUpgradeGKEUpgrade: GKEUpgrade represents a GKE provided upgrade,
308 // e.g., control plane upgrade.
309 type ClusterUpgradeGKEUpgrade struct {
310 // Name: Name of the upgrade, e.g., "k8s_control_plane".
311 Name string `json:"name,omitempty"`
312 // Version: Version of the upgrade, e.g., "1.22.1-gke.100".
313 Version string `json:"version,omitempty"`
314 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
315 // include in API requests. By default, fields with empty or default values are
316 // omitted from API requests. See
317 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
318 // details.
319 ForceSendFields []string `json:"-"`
320 // NullFields is a list of field names (e.g. "Name") to include in API requests
321 // with the JSON null value. By default, fields with empty values are omitted
322 // from API requests. See
323 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
324 NullFields []string `json:"-"`
325 }
326
327 func (s ClusterUpgradeGKEUpgrade) MarshalJSON() ([]byte, error) {
328 type NoMethod ClusterUpgradeGKEUpgrade
329 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
330 }
331
332 // ClusterUpgradeIgnoredMembership: IgnoredMembership represents a membership
333 // ignored by the feature. A membership can be ignored because it was manually
334 // upgraded to a newer version than RC default.
335 type ClusterUpgradeIgnoredMembership struct {
336 // IgnoredTime: Time when the membership was first set to ignored.
337 IgnoredTime string `json:"ignoredTime,omitempty"`
338 // Reason: Reason why the membership is ignored.
339 Reason string `json:"reason,omitempty"`
340 // ForceSendFields is a list of field names (e.g. "IgnoredTime") to
341 // unconditionally include in API requests. By default, fields with empty or
342 // default values are omitted from API requests. See
343 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
344 // details.
345 ForceSendFields []string `json:"-"`
346 // NullFields is a list of field names (e.g. "IgnoredTime") to include in API
347 // requests with the JSON null value. By default, fields with empty values are
348 // omitted from API requests. See
349 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
350 NullFields []string `json:"-"`
351 }
352
353 func (s ClusterUpgradeIgnoredMembership) MarshalJSON() ([]byte, error) {
354 type NoMethod ClusterUpgradeIgnoredMembership
355 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
356 }
357
358 // ClusterUpgradeMembershipGKEUpgradeState: MembershipGKEUpgradeState is a
359 // GKEUpgrade and its state per-membership.
360 type ClusterUpgradeMembershipGKEUpgradeState struct {
361 // Status: Status of the upgrade.
362 Status *ClusterUpgradeUpgradeStatus `json:"status,omitempty"`
363 // Upgrade: Which upgrade to track the state.
364 Upgrade *ClusterUpgradeGKEUpgrade `json:"upgrade,omitempty"`
365 // ForceSendFields is a list of field names (e.g. "Status") to unconditionally
366 // include in API requests. By default, fields with empty or default values are
367 // omitted from API requests. See
368 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
369 // details.
370 ForceSendFields []string `json:"-"`
371 // NullFields is a list of field names (e.g. "Status") to include in API
372 // requests with the JSON null value. By default, fields with empty values are
373 // omitted from API requests. See
374 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
375 NullFields []string `json:"-"`
376 }
377
378 func (s ClusterUpgradeMembershipGKEUpgradeState) MarshalJSON() ([]byte, error) {
379 type NoMethod ClusterUpgradeMembershipGKEUpgradeState
380 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
381 }
382
383 // ClusterUpgradeState: Per-membership state for this feature.
384 type ClusterUpgradeState struct {
385 // Ignored: Whether this membership is ignored by the feature. For example,
386 // manually upgraded clusters can be ignored if they are newer than the default
387 // versions of its release channel.
388 Ignored *ClusterUpgradeIgnoredMembership `json:"ignored,omitempty"`
389 // Upgrades: Actual upgrade state against desired.
390 Upgrades []*ClusterUpgradeMembershipGKEUpgradeState `json:"upgrades,omitempty"`
391 // ForceSendFields is a list of field names (e.g. "Ignored") to unconditionally
392 // include in API requests. By default, fields with empty or default values are
393 // omitted from API requests. See
394 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
395 // details.
396 ForceSendFields []string `json:"-"`
397 // NullFields is a list of field names (e.g. "Ignored") to include in API
398 // requests with the JSON null value. By default, fields with empty values are
399 // omitted from API requests. See
400 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
401 NullFields []string `json:"-"`
402 }
403
404 func (s ClusterUpgradeState) MarshalJSON() ([]byte, error) {
405 type NoMethod ClusterUpgradeState
406 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
407 }
408
409 // ClusterUpgradeUpgradeStatus: UpgradeStatus provides status information for
410 // each upgrade.
411 type ClusterUpgradeUpgradeStatus struct {
412 // Code: Status code of the upgrade.
413 //
414 // Possible values:
415 // "CODE_UNSPECIFIED" - Required by https://linter.aip.dev/126/unspecified.
416 // "INELIGIBLE" - The upgrade is ineligible. At the scope level, this means
417 // the upgrade is ineligible for all the clusters in the scope.
418 // "PENDING" - The upgrade is pending. At the scope level, this means the
419 // upgrade is pending for all the clusters in the scope.
420 // "IN_PROGRESS" - The upgrade is in progress. At the scope level, this means
421 // the upgrade is in progress for at least one cluster in the scope.
422 // "SOAKING" - The upgrade has finished and is soaking until the soaking time
423 // is up. At the scope level, this means at least one cluster is in soaking
424 // while the rest are either soaking or complete.
425 // "FORCED_SOAKING" - A cluster will be forced to enter soaking if an upgrade
426 // doesn't finish within a certain limit, despite it's actual status.
427 // "COMPLETE" - The upgrade has passed all post conditions (soaking). At the
428 // scope level, this means all eligible clusters are in COMPLETE status.
429 Code string `json:"code,omitempty"`
430 // Reason: Reason for this status.
431 Reason string `json:"reason,omitempty"`
432 // UpdateTime: Last timestamp the status was updated.
433 UpdateTime string `json:"updateTime,omitempty"`
434 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
435 // include in API requests. By default, fields with empty or default values are
436 // omitted from API requests. See
437 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
438 // details.
439 ForceSendFields []string `json:"-"`
440 // NullFields is a list of field names (e.g. "Code") to include in API requests
441 // with the JSON null value. By default, fields with empty values are omitted
442 // from API requests. See
443 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
444 NullFields []string `json:"-"`
445 }
446
447 func (s ClusterUpgradeUpgradeStatus) MarshalJSON() ([]byte, error) {
448 type NoMethod ClusterUpgradeUpgradeStatus
449 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
450 }
451
452 // ConfigManagementBinauthzConfig: Configuration for Binauthz.
453 type ConfigManagementBinauthzConfig struct {
454 // Enabled: Whether binauthz is enabled in this cluster.
455 Enabled bool `json:"enabled,omitempty"`
456 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
457 // include in API requests. By default, fields with empty or default values are
458 // omitted from API requests. See
459 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
460 // details.
461 ForceSendFields []string `json:"-"`
462 // NullFields is a list of field names (e.g. "Enabled") to include in API
463 // requests with the JSON null value. By default, fields with empty values are
464 // omitted from API requests. See
465 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
466 NullFields []string `json:"-"`
467 }
468
469 func (s ConfigManagementBinauthzConfig) MarshalJSON() ([]byte, error) {
470 type NoMethod ConfigManagementBinauthzConfig
471 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
472 }
473
474 // ConfigManagementBinauthzState: State for Binauthz.
475 type ConfigManagementBinauthzState struct {
476 // Version: The version of binauthz that is installed.
477 Version *ConfigManagementBinauthzVersion `json:"version,omitempty"`
478 // Webhook: The state of the binauthz webhook.
479 //
480 // Possible values:
481 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined.
482 // "NOT_INSTALLED" - Deployment is not installed.
483 // "INSTALLED" - Deployment is installed.
484 // "ERROR" - Deployment was attempted to be installed, but has errors.
485 // "PENDING" - Deployment is installing or terminating
486 Webhook string `json:"webhook,omitempty"`
487 // ForceSendFields is a list of field names (e.g. "Version") to unconditionally
488 // include in API requests. By default, fields with empty or default values are
489 // 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. "Version") to include in API
494 // requests with the JSON null value. By default, fields with empty values are
495 // 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 ConfigManagementBinauthzState) MarshalJSON() ([]byte, error) {
501 type NoMethod ConfigManagementBinauthzState
502 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
503 }
504
505 // ConfigManagementBinauthzVersion: The version of binauthz.
506 type ConfigManagementBinauthzVersion struct {
507 // WebhookVersion: The version of the binauthz webhook.
508 WebhookVersion string `json:"webhookVersion,omitempty"`
509 // ForceSendFields is a list of field names (e.g. "WebhookVersion") to
510 // unconditionally include in API requests. By default, fields with empty or
511 // default values are omitted from API requests. See
512 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
513 // details.
514 ForceSendFields []string `json:"-"`
515 // NullFields is a list of field names (e.g. "WebhookVersion") to include in
516 // API requests with the JSON null value. By default, fields with empty values
517 // are omitted from API requests. See
518 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
519 NullFields []string `json:"-"`
520 }
521
522 func (s ConfigManagementBinauthzVersion) MarshalJSON() ([]byte, error) {
523 type NoMethod ConfigManagementBinauthzVersion
524 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
525 }
526
527 // ConfigManagementConfigSync: Configuration for Config Sync
528 type ConfigManagementConfigSync struct {
529 // DeploymentOverrides: Optional. Configuration for deployment overrides.
530 // Applies only to Config Sync deployments with containers that are not a root
531 // or namespace reconciler: `reconciler-manager`, `otel-collector`,
532 // `resource-group-controller-manager`, `admission-webhook`. To override a root
533 // or namespace reconciler, use the rootsync or reposync fields at
534 // https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rootsync-reposync-fields#override-resources
535 // instead.
536 DeploymentOverrides []*ConfigManagementDeploymentOverride `json:"deploymentOverrides,omitempty"`
537 // Enabled: Optional. Enables the installation of Config Sync. If set to true,
538 // the Feature will manage Config Sync resources, and apply the other
539 // ConfigSync fields if they exist. If set to false, the Feature will ignore
540 // all other ConfigSync fields and delete the Config Sync resources. If
541 // omitted, ConfigSync is considered enabled if the git or oci field is
542 // present.
543 Enabled bool `json:"enabled,omitempty"`
544 // Git: Optional. Git repo configuration for the cluster.
545 Git *ConfigManagementGitConfig `json:"git,omitempty"`
546 // MetricsGcpServiceAccountEmail: Optional. The Email of the Google Cloud
547 // Service Account (GSA) used for exporting Config Sync metrics to Cloud
548 // Monitoring and Cloud Monarch when Workload Identity is enabled. The GSA
549 // should have the Monitoring Metric Writer (roles/monitoring.metricWriter) IAM
550 // role. The Kubernetes ServiceAccount `default` in the namespace
551 // `config-management-monitoring` should be bound to the GSA. Deprecated: If
552 // Workload Identity Federation for GKE is enabled, Google Cloud Service
553 // Account is no longer needed for exporting Config Sync metrics:
554 // https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/how-to/monitor-config-sync-cloud-monitoring#custom-monitoring.
555 MetricsGcpServiceAccountEmail string `json:"metricsGcpServiceAccountEmail,omitempty"`
556 // Oci: Optional. OCI repo configuration for the cluster.
557 Oci *ConfigManagementOciConfig `json:"oci,omitempty"`
558 // PreventDrift: Optional. Set to true to enable the Config Sync admission
559 // webhook to prevent drifts. If set to false, disables the Config Sync
560 // admission webhook and does not prevent drifts. Defaults to false. See
561 // https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/how-to/prevent-config-drift
562 // for details.
563 PreventDrift bool `json:"preventDrift,omitempty"`
564 // SourceFormat: Optional. Specifies whether the Config Sync repo is in
565 // `hierarchical` or `unstructured` mode. Defaults to `hierarchical`. See
566 // https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/concepts/configs#organize-configs
567 // for an explanation.
568 SourceFormat string `json:"sourceFormat,omitempty"`
569 // StopSyncing: Optional. Set to true to stop syncing configs for a single
570 // cluster. Default to false.
571 StopSyncing bool `json:"stopSyncing,omitempty"`
572 // ForceSendFields is a list of field names (e.g. "DeploymentOverrides") to
573 // unconditionally include in API requests. By default, fields with empty or
574 // default values are omitted from API requests. See
575 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
576 // details.
577 ForceSendFields []string `json:"-"`
578 // NullFields is a list of field names (e.g. "DeploymentOverrides") to include
579 // in API requests with the JSON null value. By default, fields with empty
580 // values are omitted from API requests. See
581 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
582 NullFields []string `json:"-"`
583 }
584
585 func (s ConfigManagementConfigSync) MarshalJSON() ([]byte, error) {
586 type NoMethod ConfigManagementConfigSync
587 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
588 }
589
590 // ConfigManagementConfigSyncDeploymentState: The state of ConfigSync's
591 // deployment on a cluster.
592 type ConfigManagementConfigSyncDeploymentState struct {
593 // AdmissionWebhook: Deployment state of admission-webhook.
594 //
595 // Possible values:
596 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined.
597 // "NOT_INSTALLED" - Deployment is not installed.
598 // "INSTALLED" - Deployment is installed.
599 // "ERROR" - Deployment was attempted to be installed, but has errors.
600 // "PENDING" - Deployment is installing or terminating
601 AdmissionWebhook string `json:"admissionWebhook,omitempty"`
602 // GitSync: Deployment state of the git-sync pod.
603 //
604 // Possible values:
605 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined.
606 // "NOT_INSTALLED" - Deployment is not installed.
607 // "INSTALLED" - Deployment is installed.
608 // "ERROR" - Deployment was attempted to be installed, but has errors.
609 // "PENDING" - Deployment is installing or terminating
610 GitSync string `json:"gitSync,omitempty"`
611 // Importer: Deployment state of the importer pod.
612 //
613 // Possible values:
614 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined.
615 // "NOT_INSTALLED" - Deployment is not installed.
616 // "INSTALLED" - Deployment is installed.
617 // "ERROR" - Deployment was attempted to be installed, but has errors.
618 // "PENDING" - Deployment is installing or terminating
619 Importer string `json:"importer,omitempty"`
620 // Monitor: Deployment state of the monitor pod.
621 //
622 // Possible values:
623 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined.
624 // "NOT_INSTALLED" - Deployment is not installed.
625 // "INSTALLED" - Deployment is installed.
626 // "ERROR" - Deployment was attempted to be installed, but has errors.
627 // "PENDING" - Deployment is installing or terminating
628 Monitor string `json:"monitor,omitempty"`
629 // OtelCollector: Deployment state of otel-collector
630 //
631 // Possible values:
632 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined.
633 // "NOT_INSTALLED" - Deployment is not installed.
634 // "INSTALLED" - Deployment is installed.
635 // "ERROR" - Deployment was attempted to be installed, but has errors.
636 // "PENDING" - Deployment is installing or terminating
637 OtelCollector string `json:"otelCollector,omitempty"`
638 // ReconcilerManager: Deployment state of reconciler-manager pod.
639 //
640 // Possible values:
641 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined.
642 // "NOT_INSTALLED" - Deployment is not installed.
643 // "INSTALLED" - Deployment is installed.
644 // "ERROR" - Deployment was attempted to be installed, but has errors.
645 // "PENDING" - Deployment is installing or terminating
646 ReconcilerManager string `json:"reconcilerManager,omitempty"`
647 // ResourceGroupControllerManager: Deployment state of
648 // resource-group-controller-manager
649 //
650 // Possible values:
651 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined.
652 // "NOT_INSTALLED" - Deployment is not installed.
653 // "INSTALLED" - Deployment is installed.
654 // "ERROR" - Deployment was attempted to be installed, but has errors.
655 // "PENDING" - Deployment is installing or terminating
656 ResourceGroupControllerManager string `json:"resourceGroupControllerManager,omitempty"`
657 // RootReconciler: Deployment state of root-reconciler.
658 //
659 // Possible values:
660 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined.
661 // "NOT_INSTALLED" - Deployment is not installed.
662 // "INSTALLED" - Deployment is installed.
663 // "ERROR" - Deployment was attempted to be installed, but has errors.
664 // "PENDING" - Deployment is installing or terminating
665 RootReconciler string `json:"rootReconciler,omitempty"`
666 // Syncer: Deployment state of the syncer pod.
667 //
668 // Possible values:
669 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined.
670 // "NOT_INSTALLED" - Deployment is not installed.
671 // "INSTALLED" - Deployment is installed.
672 // "ERROR" - Deployment was attempted to be installed, but has errors.
673 // "PENDING" - Deployment is installing or terminating
674 Syncer string `json:"syncer,omitempty"`
675 // ForceSendFields is a list of field names (e.g. "AdmissionWebhook") to
676 // unconditionally include in API requests. By default, fields with empty or
677 // default values are omitted from API requests. See
678 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
679 // details.
680 ForceSendFields []string `json:"-"`
681 // NullFields is a list of field names (e.g. "AdmissionWebhook") to include in
682 // API requests with the JSON null value. By default, fields with empty values
683 // are omitted from API requests. See
684 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
685 NullFields []string `json:"-"`
686 }
687
688 func (s ConfigManagementConfigSyncDeploymentState) MarshalJSON() ([]byte, error) {
689 type NoMethod ConfigManagementConfigSyncDeploymentState
690 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
691 }
692
693 // ConfigManagementConfigSyncError: Errors pertaining to the installation of
694 // Config Sync
695 type ConfigManagementConfigSyncError struct {
696 // ErrorMessage: A string representing the user facing error message
697 ErrorMessage string `json:"errorMessage,omitempty"`
698 // ForceSendFields is a list of field names (e.g. "ErrorMessage") to
699 // unconditionally include in API requests. By default, fields with empty or
700 // default values are omitted from API requests. See
701 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
702 // details.
703 ForceSendFields []string `json:"-"`
704 // NullFields is a list of field names (e.g. "ErrorMessage") to include in API
705 // requests with the JSON null value. By default, fields with empty values are
706 // omitted from API requests. See
707 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
708 NullFields []string `json:"-"`
709 }
710
711 func (s ConfigManagementConfigSyncError) MarshalJSON() ([]byte, error) {
712 type NoMethod ConfigManagementConfigSyncError
713 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
714 }
715
716 // ConfigManagementConfigSyncState: State information for ConfigSync.
717 type ConfigManagementConfigSyncState struct {
718 // ClusterLevelStopSyncingState: Output only. Whether syncing resources to the
719 // cluster is stopped at the cluster level.
720 //
721 // Possible values:
722 // "STOP_SYNCING_STATE_UNSPECIFIED" - State cannot be determined
723 // "NOT_STOPPED" - Syncing resources to the cluster is not stopped at the
724 // cluster level.
725 // "PENDING" - Some reconcilers stop syncing resources to the cluster, while
726 // others are still syncing.
727 // "STOPPED" - Syncing resources to the cluster is stopped at the cluster
728 // level.
729 ClusterLevelStopSyncingState string `json:"clusterLevelStopSyncingState,omitempty"`
730 // CrCount: Output only. The number of RootSync and RepoSync CRs in the
731 // cluster.
732 CrCount int64 `json:"crCount,omitempty"`
733 // DeploymentState: Output only. Information about the deployment of
734 // ConfigSync, including the version. of the various Pods deployed
735 DeploymentState *ConfigManagementConfigSyncDeploymentState `json:"deploymentState,omitempty"`
736 // Errors: Output only. Errors pertaining to the installation of Config Sync.
737 Errors []*ConfigManagementConfigSyncError `json:"errors,omitempty"`
738 // ReposyncCrd: Output only. The state of the Reposync CRD
739 //
740 // Possible values:
741 // "CRD_STATE_UNSPECIFIED" - CRD's state cannot be determined
742 // "NOT_INSTALLED" - CRD is not installed
743 // "INSTALLED" - CRD is installed
744 // "TERMINATING" - CRD is terminating (i.e., it has been deleted and is
745 // cleaning up)
746 // "INSTALLING" - CRD is installing
747 ReposyncCrd string `json:"reposyncCrd,omitempty"`
748 // RootsyncCrd: Output only. The state of the RootSync CRD
749 //
750 // Possible values:
751 // "CRD_STATE_UNSPECIFIED" - CRD's state cannot be determined
752 // "NOT_INSTALLED" - CRD is not installed
753 // "INSTALLED" - CRD is installed
754 // "TERMINATING" - CRD is terminating (i.e., it has been deleted and is
755 // cleaning up)
756 // "INSTALLING" - CRD is installing
757 RootsyncCrd string `json:"rootsyncCrd,omitempty"`
758 // State: Output only. The state of CS This field summarizes the other fields
759 // in this message.
760 //
761 // Possible values:
762 // "STATE_UNSPECIFIED" - CS's state cannot be determined.
763 // "CONFIG_SYNC_NOT_INSTALLED" - CS is not installed.
764 // "CONFIG_SYNC_INSTALLED" - The expected CS version is installed
765 // successfully.
766 // "CONFIG_SYNC_ERROR" - CS encounters errors.
767 // "CONFIG_SYNC_PENDING" - CS is installing or terminating.
768 State string `json:"state,omitempty"`
769 // SyncState: Output only. The state of ConfigSync's process to sync configs to
770 // a cluster.
771 SyncState *ConfigManagementSyncState `json:"syncState,omitempty"`
772 // Version: Output only. The version of ConfigSync deployed.
773 Version *ConfigManagementConfigSyncVersion `json:"version,omitempty"`
774 // ForceSendFields is a list of field names (e.g.
775 // "ClusterLevelStopSyncingState") to unconditionally include in API requests.
776 // By default, fields with empty or default values are omitted from API
777 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
778 // for more details.
779 ForceSendFields []string `json:"-"`
780 // NullFields is a list of field names (e.g. "ClusterLevelStopSyncingState") to
781 // include in API requests with the JSON null value. By default, fields with
782 // empty values are omitted from API requests. See
783 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
784 NullFields []string `json:"-"`
785 }
786
787 func (s ConfigManagementConfigSyncState) MarshalJSON() ([]byte, error) {
788 type NoMethod ConfigManagementConfigSyncState
789 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
790 }
791
792 // ConfigManagementConfigSyncVersion: Specific versioning information
793 // pertaining to ConfigSync's Pods.
794 type ConfigManagementConfigSyncVersion struct {
795 // AdmissionWebhook: Version of the deployed admission-webhook pod.
796 AdmissionWebhook string `json:"admissionWebhook,omitempty"`
797 // GitSync: Version of the deployed git-sync pod.
798 GitSync string `json:"gitSync,omitempty"`
799 // Importer: Version of the deployed importer pod.
800 Importer string `json:"importer,omitempty"`
801 // Monitor: Version of the deployed monitor pod.
802 Monitor string `json:"monitor,omitempty"`
803 // OtelCollector: Version of the deployed otel-collector pod
804 OtelCollector string `json:"otelCollector,omitempty"`
805 // ReconcilerManager: Version of the deployed reconciler-manager pod.
806 ReconcilerManager string `json:"reconcilerManager,omitempty"`
807 // ResourceGroupControllerManager: Version of the deployed
808 // resource-group-controller-manager pod
809 ResourceGroupControllerManager string `json:"resourceGroupControllerManager,omitempty"`
810 // RootReconciler: Version of the deployed reconciler container in
811 // root-reconciler pod.
812 RootReconciler string `json:"rootReconciler,omitempty"`
813 // Syncer: Version of the deployed syncer pod.
814 Syncer string `json:"syncer,omitempty"`
815 // ForceSendFields is a list of field names (e.g. "AdmissionWebhook") to
816 // unconditionally include in API requests. By default, fields with empty or
817 // default values are omitted from API requests. See
818 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
819 // details.
820 ForceSendFields []string `json:"-"`
821 // NullFields is a list of field names (e.g. "AdmissionWebhook") to include in
822 // API requests with the JSON null value. By default, fields with empty values
823 // are omitted from API requests. See
824 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
825 NullFields []string `json:"-"`
826 }
827
828 func (s ConfigManagementConfigSyncVersion) MarshalJSON() ([]byte, error) {
829 type NoMethod ConfigManagementConfigSyncVersion
830 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
831 }
832
833 // ConfigManagementContainerOverride: Configuration for a container override.
834 type ConfigManagementContainerOverride struct {
835 // ContainerName: Required. The name of the container.
836 ContainerName string `json:"containerName,omitempty"`
837 // CpuLimit: Optional. The cpu limit of the container. Use the following CPU
838 // resource units:
839 // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.
840 CpuLimit string `json:"cpuLimit,omitempty"`
841 // CpuRequest: Optional. The cpu request of the container. Use the following
842 // CPU resource units:
843 // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.
844 CpuRequest string `json:"cpuRequest,omitempty"`
845 // MemoryLimit: Optional. The memory limit of the container. Use the following
846 // memory resource units:
847 // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory.
848 MemoryLimit string `json:"memoryLimit,omitempty"`
849 // MemoryRequest: Optional. The memory request of the container. Use the
850 // following memory resource units:
851 // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory.
852 MemoryRequest string `json:"memoryRequest,omitempty"`
853 // ForceSendFields is a list of field names (e.g. "ContainerName") to
854 // unconditionally include in API requests. By default, fields with empty or
855 // default values are omitted from API requests. See
856 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
857 // details.
858 ForceSendFields []string `json:"-"`
859 // NullFields is a list of field names (e.g. "ContainerName") to include in API
860 // requests with the JSON null value. By default, fields with empty values are
861 // omitted from API requests. See
862 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
863 NullFields []string `json:"-"`
864 }
865
866 func (s ConfigManagementContainerOverride) MarshalJSON() ([]byte, error) {
867 type NoMethod ConfigManagementContainerOverride
868 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
869 }
870
871 // ConfigManagementDeploymentOverride: Configuration for a deployment override.
872 type ConfigManagementDeploymentOverride struct {
873 // Containers: Optional. The containers of the deployment resource to be
874 // overridden.
875 Containers []*ConfigManagementContainerOverride `json:"containers,omitempty"`
876 // DeploymentName: Required. The name of the deployment resource to be
877 // overridden.
878 DeploymentName string `json:"deploymentName,omitempty"`
879 // DeploymentNamespace: Required. The namespace of the deployment resource to
880 // be overridden.
881 DeploymentNamespace string `json:"deploymentNamespace,omitempty"`
882 // ForceSendFields is a list of field names (e.g. "Containers") to
883 // unconditionally include in API requests. By default, fields with empty or
884 // default values are omitted from API requests. See
885 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
886 // details.
887 ForceSendFields []string `json:"-"`
888 // NullFields is a list of field names (e.g. "Containers") to include in API
889 // requests with the JSON null value. By default, fields with empty values are
890 // omitted from API requests. See
891 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
892 NullFields []string `json:"-"`
893 }
894
895 func (s ConfigManagementDeploymentOverride) MarshalJSON() ([]byte, error) {
896 type NoMethod ConfigManagementDeploymentOverride
897 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
898 }
899
900 // ConfigManagementErrorResource: Model for a config file in the git repo with
901 // an associated Sync error.
902 type ConfigManagementErrorResource struct {
903 // ResourceGvk: Group/version/kind of the resource that is causing an error
904 ResourceGvk *ConfigManagementGroupVersionKind `json:"resourceGvk,omitempty"`
905 // ResourceName: Metadata name of the resource that is causing an error
906 ResourceName string `json:"resourceName,omitempty"`
907 // ResourceNamespace: Namespace of the resource that is causing an error
908 ResourceNamespace string `json:"resourceNamespace,omitempty"`
909 // SourcePath: Path in the git repo of the erroneous config
910 SourcePath string `json:"sourcePath,omitempty"`
911 // ForceSendFields is a list of field names (e.g. "ResourceGvk") to
912 // unconditionally include in API requests. By default, fields with empty or
913 // default values are omitted from API requests. See
914 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
915 // details.
916 ForceSendFields []string `json:"-"`
917 // NullFields is a list of field names (e.g. "ResourceGvk") to include in API
918 // requests with the JSON null value. By default, fields with empty values are
919 // omitted from API requests. See
920 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
921 NullFields []string `json:"-"`
922 }
923
924 func (s ConfigManagementErrorResource) MarshalJSON() ([]byte, error) {
925 type NoMethod ConfigManagementErrorResource
926 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
927 }
928
929 // ConfigManagementGatekeeperDeploymentState: State of Policy Controller
930 // installation.
931 type ConfigManagementGatekeeperDeploymentState struct {
932 // GatekeeperAudit: Status of gatekeeper-audit deployment.
933 //
934 // Possible values:
935 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined.
936 // "NOT_INSTALLED" - Deployment is not installed.
937 // "INSTALLED" - Deployment is installed.
938 // "ERROR" - Deployment was attempted to be installed, but has errors.
939 // "PENDING" - Deployment is installing or terminating
940 GatekeeperAudit string `json:"gatekeeperAudit,omitempty"`
941 // GatekeeperControllerManagerState: Status of gatekeeper-controller-manager
942 // pod.
943 //
944 // Possible values:
945 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined.
946 // "NOT_INSTALLED" - Deployment is not installed.
947 // "INSTALLED" - Deployment is installed.
948 // "ERROR" - Deployment was attempted to be installed, but has errors.
949 // "PENDING" - Deployment is installing or terminating
950 GatekeeperControllerManagerState string `json:"gatekeeperControllerManagerState,omitempty"`
951 // GatekeeperMutation: Status of the pod serving the mutation webhook.
952 //
953 // Possible values:
954 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined.
955 // "NOT_INSTALLED" - Deployment is not installed.
956 // "INSTALLED" - Deployment is installed.
957 // "ERROR" - Deployment was attempted to be installed, but has errors.
958 // "PENDING" - Deployment is installing or terminating
959 GatekeeperMutation string `json:"gatekeeperMutation,omitempty"`
960 // ForceSendFields is a list of field names (e.g. "GatekeeperAudit") to
961 // unconditionally include in API requests. By default, fields with empty or
962 // default values are omitted from API requests. See
963 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
964 // details.
965 ForceSendFields []string `json:"-"`
966 // NullFields is a list of field names (e.g. "GatekeeperAudit") to include in
967 // API requests with the JSON null value. By default, fields with empty values
968 // are omitted from API requests. See
969 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
970 NullFields []string `json:"-"`
971 }
972
973 func (s ConfigManagementGatekeeperDeploymentState) MarshalJSON() ([]byte, error) {
974 type NoMethod ConfigManagementGatekeeperDeploymentState
975 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
976 }
977
978 // ConfigManagementGitConfig: Git repo configuration for a single cluster.
979 type ConfigManagementGitConfig struct {
980 // GcpServiceAccountEmail: Optional. The Google Cloud Service Account Email
981 // used for auth when secret_type is `gcpserviceaccount`.
982 GcpServiceAccountEmail string `json:"gcpServiceAccountEmail,omitempty"`
983 // HttpsProxy: Optional. URL for the HTTPS proxy to be used when communicating
984 // with the Git repo. Only specify when secret_type is `cookiefile`, `token`,
985 // or `none`.
986 HttpsProxy string `json:"httpsProxy,omitempty"`
987 // PolicyDir: Optional. The path within the Git repository that represents the
988 // top level of the repo to sync. Default: the root directory of the
989 // repository.
990 PolicyDir string `json:"policyDir,omitempty"`
991 // SecretType: Required. Type of secret configured for access to the Git repo.
992 // Must be one of `ssh`, `cookiefile`, `gcenode`, `token`, `gcpserviceaccount`,
993 // `githubapp` or `none`. The validation of this is case-sensitive.
994 SecretType string `json:"secretType,omitempty"`
995 // SyncBranch: Optional. The branch of the repository to sync from. Default:
996 // master.
997 SyncBranch string `json:"syncBranch,omitempty"`
998 // SyncRepo: Required. The URL of the Git repository to use as the source of
999 // truth.
1000 SyncRepo string `json:"syncRepo,omitempty"`
1001 // SyncRev: Optional. Git revision (tag or hash) to check out. Default HEAD.
1002 SyncRev string `json:"syncRev,omitempty"`
1003 // SyncWaitSecs: Optional. Period in seconds between consecutive syncs.
1004 // Default: 15.
1005 SyncWaitSecs int64 `json:"syncWaitSecs,omitempty,string"`
1006 // ForceSendFields is a list of field names (e.g. "GcpServiceAccountEmail") to
1007 // unconditionally include in API requests. By default, fields with empty or
1008 // default values are omitted from API requests. See
1009 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1010 // details.
1011 ForceSendFields []string `json:"-"`
1012 // NullFields is a list of field names (e.g. "GcpServiceAccountEmail") to
1013 // include in API requests with the JSON null value. By default, fields with
1014 // empty values are omitted from API requests. See
1015 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1016 NullFields []string `json:"-"`
1017 }
1018
1019 func (s ConfigManagementGitConfig) MarshalJSON() ([]byte, error) {
1020 type NoMethod ConfigManagementGitConfig
1021 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1022 }
1023
1024 // ConfigManagementGroupVersionKind: A Kubernetes object's GVK.
1025 type ConfigManagementGroupVersionKind struct {
1026 // Group: Kubernetes Group
1027 Group string `json:"group,omitempty"`
1028 // Kind: Kubernetes Kind
1029 Kind string `json:"kind,omitempty"`
1030 // Version: Kubernetes Version
1031 Version string `json:"version,omitempty"`
1032 // ForceSendFields is a list of field names (e.g. "Group") to unconditionally
1033 // include in API requests. By default, fields with empty or default values are
1034 // omitted from API requests. See
1035 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1036 // details.
1037 ForceSendFields []string `json:"-"`
1038 // NullFields is a list of field names (e.g. "Group") to include in API
1039 // requests with the JSON null value. By default, fields with empty values are
1040 // omitted from API requests. See
1041 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1042 NullFields []string `json:"-"`
1043 }
1044
1045 func (s ConfigManagementGroupVersionKind) MarshalJSON() ([]byte, error) {
1046 type NoMethod ConfigManagementGroupVersionKind
1047 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1048 }
1049
1050 // ConfigManagementHierarchyControllerConfig: Configuration for Hierarchy
1051 // Controller.
1052 type ConfigManagementHierarchyControllerConfig struct {
1053 // EnableHierarchicalResourceQuota: Whether hierarchical resource quota is
1054 // enabled in this cluster.
1055 EnableHierarchicalResourceQuota bool `json:"enableHierarchicalResourceQuota,omitempty"`
1056 // EnablePodTreeLabels: Whether pod tree labels are enabled in this cluster.
1057 EnablePodTreeLabels bool `json:"enablePodTreeLabels,omitempty"`
1058 // Enabled: Whether Hierarchy Controller is enabled in this cluster.
1059 Enabled bool `json:"enabled,omitempty"`
1060 // ForceSendFields is a list of field names (e.g.
1061 // "EnableHierarchicalResourceQuota") to unconditionally include in API
1062 // requests. By default, fields with empty or default values are omitted from
1063 // API requests. See
1064 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1065 // details.
1066 ForceSendFields []string `json:"-"`
1067 // NullFields is a list of field names (e.g. "EnableHierarchicalResourceQuota")
1068 // to include in API requests with the JSON null value. By default, fields with
1069 // empty values are omitted from API requests. See
1070 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1071 NullFields []string `json:"-"`
1072 }
1073
1074 func (s ConfigManagementHierarchyControllerConfig) MarshalJSON() ([]byte, error) {
1075 type NoMethod ConfigManagementHierarchyControllerConfig
1076 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1077 }
1078
1079 // ConfigManagementHierarchyControllerDeploymentState: Deployment state for
1080 // Hierarchy Controller
1081 type ConfigManagementHierarchyControllerDeploymentState struct {
1082 // Extension: The deployment state for Hierarchy Controller extension (e.g.
1083 // v0.7.0-hc.1).
1084 //
1085 // Possible values:
1086 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined.
1087 // "NOT_INSTALLED" - Deployment is not installed.
1088 // "INSTALLED" - Deployment is installed.
1089 // "ERROR" - Deployment was attempted to be installed, but has errors.
1090 // "PENDING" - Deployment is installing or terminating
1091 Extension string `json:"extension,omitempty"`
1092 // Hnc: The deployment state for open source HNC (e.g. v0.7.0-hc.0).
1093 //
1094 // Possible values:
1095 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined.
1096 // "NOT_INSTALLED" - Deployment is not installed.
1097 // "INSTALLED" - Deployment is installed.
1098 // "ERROR" - Deployment was attempted to be installed, but has errors.
1099 // "PENDING" - Deployment is installing or terminating
1100 Hnc string `json:"hnc,omitempty"`
1101 // ForceSendFields is a list of field names (e.g. "Extension") to
1102 // unconditionally include in API requests. By default, fields with empty or
1103 // default values are omitted from API requests. See
1104 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1105 // details.
1106 ForceSendFields []string `json:"-"`
1107 // NullFields is a list of field names (e.g. "Extension") to include in API
1108 // requests with the JSON null value. By default, fields with empty values are
1109 // omitted from API requests. See
1110 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1111 NullFields []string `json:"-"`
1112 }
1113
1114 func (s ConfigManagementHierarchyControllerDeploymentState) MarshalJSON() ([]byte, error) {
1115 type NoMethod ConfigManagementHierarchyControllerDeploymentState
1116 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1117 }
1118
1119 // ConfigManagementHierarchyControllerState: State for Hierarchy Controller.
1120 type ConfigManagementHierarchyControllerState struct {
1121 // State: The deployment state for Hierarchy Controller.
1122 State *ConfigManagementHierarchyControllerDeploymentState `json:"state,omitempty"`
1123 // Version: The version for Hierarchy Controller.
1124 Version *ConfigManagementHierarchyControllerVersion `json:"version,omitempty"`
1125 // ForceSendFields is a list of field names (e.g. "State") to unconditionally
1126 // include in API requests. By default, fields with empty or default values are
1127 // omitted from API requests. See
1128 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1129 // details.
1130 ForceSendFields []string `json:"-"`
1131 // NullFields is a list of field names (e.g. "State") to include in API
1132 // requests with the JSON null value. By default, fields with empty values are
1133 // omitted from API requests. See
1134 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1135 NullFields []string `json:"-"`
1136 }
1137
1138 func (s ConfigManagementHierarchyControllerState) MarshalJSON() ([]byte, error) {
1139 type NoMethod ConfigManagementHierarchyControllerState
1140 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1141 }
1142
1143 // ConfigManagementHierarchyControllerVersion: Version for Hierarchy
1144 // Controller.
1145 type ConfigManagementHierarchyControllerVersion struct {
1146 // Extension: Version for Hierarchy Controller extension.
1147 Extension string `json:"extension,omitempty"`
1148 // Hnc: Version for open source HNC.
1149 Hnc string `json:"hnc,omitempty"`
1150 // ForceSendFields is a list of field names (e.g. "Extension") to
1151 // unconditionally include in API requests. By default, fields with empty or
1152 // default values are omitted from API requests. See
1153 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1154 // details.
1155 ForceSendFields []string `json:"-"`
1156 // NullFields is a list of field names (e.g. "Extension") to include in API
1157 // requests with the JSON null value. By default, fields with empty values are
1158 // omitted from API requests. See
1159 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1160 NullFields []string `json:"-"`
1161 }
1162
1163 func (s ConfigManagementHierarchyControllerVersion) MarshalJSON() ([]byte, error) {
1164 type NoMethod ConfigManagementHierarchyControllerVersion
1165 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1166 }
1167
1168 // ConfigManagementInstallError: Errors pertaining to the installation of ACM.
1169 type ConfigManagementInstallError struct {
1170 // ErrorMessage: A string representing the user facing error message.
1171 ErrorMessage string `json:"errorMessage,omitempty"`
1172 // ForceSendFields is a list of field names (e.g. "ErrorMessage") to
1173 // unconditionally include in API requests. By default, fields with empty or
1174 // default values are omitted from API requests. See
1175 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1176 // details.
1177 ForceSendFields []string `json:"-"`
1178 // NullFields is a list of field names (e.g. "ErrorMessage") to include in API
1179 // requests with the JSON null value. By default, fields with empty values are
1180 // omitted from API requests. See
1181 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1182 NullFields []string `json:"-"`
1183 }
1184
1185 func (s ConfigManagementInstallError) MarshalJSON() ([]byte, error) {
1186 type NoMethod ConfigManagementInstallError
1187 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1188 }
1189
1190 // ConfigManagementOciConfig: OCI repo configuration for a single cluster.
1191 type ConfigManagementOciConfig struct {
1192 // GcpServiceAccountEmail: Optional. The Google Cloud Service Account Email
1193 // used for auth when secret_type is `gcpserviceaccount`.
1194 GcpServiceAccountEmail string `json:"gcpServiceAccountEmail,omitempty"`
1195 // PolicyDir: Optional. The absolute path of the directory that contains the
1196 // local resources. Default: the root directory of the image.
1197 PolicyDir string `json:"policyDir,omitempty"`
1198 // SecretType: Required. Type of secret configured for access to the OCI repo.
1199 // Must be one of `gcenode`, `gcpserviceaccount`, `k8sserviceaccount` or
1200 // `none`. The validation of this is case-sensitive.
1201 SecretType string `json:"secretType,omitempty"`
1202 // SyncRepo: Required. The OCI image repository URL for the package to sync
1203 // from. e.g.
1204 // `LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME`.
1205 SyncRepo string `json:"syncRepo,omitempty"`
1206 // SyncWaitSecs: Optional. Period in seconds between consecutive syncs.
1207 // Default: 15.
1208 SyncWaitSecs int64 `json:"syncWaitSecs,omitempty,string"`
1209 // ForceSendFields is a list of field names (e.g. "GcpServiceAccountEmail") to
1210 // unconditionally include in API requests. By default, fields with empty or
1211 // default values are omitted from API requests. See
1212 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1213 // details.
1214 ForceSendFields []string `json:"-"`
1215 // NullFields is a list of field names (e.g. "GcpServiceAccountEmail") to
1216 // include in API requests with the JSON null value. By default, fields with
1217 // empty values are omitted from API requests. See
1218 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1219 NullFields []string `json:"-"`
1220 }
1221
1222 func (s ConfigManagementOciConfig) MarshalJSON() ([]byte, error) {
1223 type NoMethod ConfigManagementOciConfig
1224 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1225 }
1226
1227 // ConfigManagementOperatorState: State information for an ACM's Operator.
1228 type ConfigManagementOperatorState struct {
1229 // DeploymentState: The state of the Operator's deployment.
1230 //
1231 // Possible values:
1232 // "DEPLOYMENT_STATE_UNSPECIFIED" - Deployment's state cannot be determined.
1233 // "NOT_INSTALLED" - Deployment is not installed.
1234 // "INSTALLED" - Deployment is installed.
1235 // "ERROR" - Deployment was attempted to be installed, but has errors.
1236 // "PENDING" - Deployment is installing or terminating
1237 DeploymentState string `json:"deploymentState,omitempty"`
1238 // Errors: Install errors.
1239 Errors []*ConfigManagementInstallError `json:"errors,omitempty"`
1240 // Version: The semenatic version number of the operator.
1241 Version string `json:"version,omitempty"`
1242 // ForceSendFields is a list of field names (e.g. "DeploymentState") to
1243 // unconditionally include in API requests. By default, fields with empty or
1244 // default values are omitted from API requests. See
1245 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1246 // details.
1247 ForceSendFields []string `json:"-"`
1248 // NullFields is a list of field names (e.g. "DeploymentState") to include in
1249 // API requests with the JSON null value. By default, fields with empty values
1250 // are omitted from API requests. See
1251 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1252 NullFields []string `json:"-"`
1253 }
1254
1255 func (s ConfigManagementOperatorState) MarshalJSON() ([]byte, error) {
1256 type NoMethod ConfigManagementOperatorState
1257 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1258 }
1259
1260 // ConfigManagementPolicyController: Configuration for Policy Controller
1261 type ConfigManagementPolicyController struct {
1262 // AuditIntervalSeconds: Sets the interval for Policy Controller Audit Scans
1263 // (in seconds). When set to 0, this disables audit functionality altogether.
1264 AuditIntervalSeconds int64 `json:"auditIntervalSeconds,omitempty,string"`
1265 // Enabled: Enables the installation of Policy Controller. If false, the rest
1266 // of PolicyController fields take no effect.
1267 Enabled bool `json:"enabled,omitempty"`
1268 // ExemptableNamespaces: The set of namespaces that are excluded from Policy
1269 // Controller checks. Namespaces do not need to currently exist on the cluster.
1270 ExemptableNamespaces []string `json:"exemptableNamespaces,omitempty"`
1271 // LogDeniesEnabled: Logs all denies and dry run failures.
1272 LogDeniesEnabled bool `json:"logDeniesEnabled,omitempty"`
1273 // Monitoring: Monitoring specifies the configuration of monitoring.
1274 Monitoring *ConfigManagementPolicyControllerMonitoring `json:"monitoring,omitempty"`
1275 // MutationEnabled: Enable or disable mutation in policy controller. If true,
1276 // mutation CRDs, webhook and controller deployment will be deployed to the
1277 // cluster.
1278 MutationEnabled bool `json:"mutationEnabled,omitempty"`
1279 // ReferentialRulesEnabled: Enables the ability to use Constraint Templates
1280 // that reference to objects other than the object currently being evaluated.
1281 ReferentialRulesEnabled bool `json:"referentialRulesEnabled,omitempty"`
1282 // TemplateLibraryInstalled: Installs the default template library along with
1283 // Policy Controller.
1284 TemplateLibraryInstalled bool `json:"templateLibraryInstalled,omitempty"`
1285 // UpdateTime: Output only. Last time this membership spec was updated.
1286 UpdateTime string `json:"updateTime,omitempty"`
1287 // ForceSendFields is a list of field names (e.g. "AuditIntervalSeconds") to
1288 // unconditionally include in API requests. By default, fields with empty or
1289 // default values are omitted from API requests. See
1290 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1291 // details.
1292 ForceSendFields []string `json:"-"`
1293 // NullFields is a list of field names (e.g. "AuditIntervalSeconds") to include
1294 // in API requests with the JSON null value. By default, fields with empty
1295 // values are omitted from API requests. See
1296 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1297 NullFields []string `json:"-"`
1298 }
1299
1300 func (s ConfigManagementPolicyController) MarshalJSON() ([]byte, error) {
1301 type NoMethod ConfigManagementPolicyController
1302 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1303 }
1304
1305 // ConfigManagementPolicyControllerMigration: State for the migration of
1306 // PolicyController from ACM -> PoCo Hub.
1307 type ConfigManagementPolicyControllerMigration struct {
1308 // CopyTime: Last time this membership spec was copied to PoCo feature.
1309 CopyTime string `json:"copyTime,omitempty"`
1310 // Stage: Stage of the migration.
1311 //
1312 // Possible values:
1313 // "STAGE_UNSPECIFIED" - Unknown state of migration.
1314 // "ACM_MANAGED" - ACM Hub/Operator manages policycontroller. No migration
1315 // yet completed.
1316 // "POCO_MANAGED" - All migrations steps complete; Poco Hub now manages
1317 // policycontroller.
1318 Stage string `json:"stage,omitempty"`
1319 // ForceSendFields is a list of field names (e.g. "CopyTime") to
1320 // unconditionally include in API requests. By default, fields with empty or
1321 // default values are omitted from API requests. See
1322 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1323 // details.
1324 ForceSendFields []string `json:"-"`
1325 // NullFields is a list of field names (e.g. "CopyTime") to include in API
1326 // requests with the JSON null value. By default, fields with empty values are
1327 // omitted from API requests. See
1328 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1329 NullFields []string `json:"-"`
1330 }
1331
1332 func (s ConfigManagementPolicyControllerMigration) MarshalJSON() ([]byte, error) {
1333 type NoMethod ConfigManagementPolicyControllerMigration
1334 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1335 }
1336
1337 // ConfigManagementPolicyControllerMonitoring: PolicyControllerMonitoring
1338 // specifies the backends Policy Controller should export metrics to. For
1339 // example, to specify metrics should be exported to Cloud Monitoring and
1340 // Prometheus, specify backends: ["cloudmonitoring", "prometheus"]
1341 type ConfigManagementPolicyControllerMonitoring struct {
1342 // Backends: Specifies the list of backends Policy Controller will export to.
1343 // An empty list would effectively disable metrics export.
1344 //
1345 // Possible values:
1346 // "MONITORING_BACKEND_UNSPECIFIED" - Backend cannot be determined
1347 // "PROMETHEUS" - Prometheus backend for monitoring
1348 // "CLOUD_MONITORING" - Stackdriver/Cloud Monitoring backend for monitoring
1349 Backends []string `json:"backends,omitempty"`
1350 // ForceSendFields is a list of field names (e.g. "Backends") to
1351 // unconditionally include in API requests. By default, fields with empty or
1352 // default values are omitted from API requests. See
1353 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1354 // details.
1355 ForceSendFields []string `json:"-"`
1356 // NullFields is a list of field names (e.g. "Backends") to include in API
1357 // requests with the JSON null value. By default, fields with empty values are
1358 // omitted from API requests. See
1359 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1360 NullFields []string `json:"-"`
1361 }
1362
1363 func (s ConfigManagementPolicyControllerMonitoring) MarshalJSON() ([]byte, error) {
1364 type NoMethod ConfigManagementPolicyControllerMonitoring
1365 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1366 }
1367
1368 // ConfigManagementPolicyControllerState: State for PolicyControllerState.
1369 type ConfigManagementPolicyControllerState struct {
1370 // DeploymentState: The state about the policy controller installation.
1371 DeploymentState *ConfigManagementGatekeeperDeploymentState `json:"deploymentState,omitempty"`
1372 // Migration: Record state of ACM -> PoCo Hub migration for this feature.
1373 Migration *ConfigManagementPolicyControllerMigration `json:"migration,omitempty"`
1374 // Version: The version of Gatekeeper Policy Controller deployed.
1375 Version *ConfigManagementPolicyControllerVersion `json:"version,omitempty"`
1376 // ForceSendFields is a list of field names (e.g. "DeploymentState") to
1377 // unconditionally include in API requests. By default, fields with empty or
1378 // default values are omitted from API requests. See
1379 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1380 // details.
1381 ForceSendFields []string `json:"-"`
1382 // NullFields is a list of field names (e.g. "DeploymentState") to include in
1383 // API requests with the JSON null value. By default, fields with empty values
1384 // are omitted from API requests. See
1385 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1386 NullFields []string `json:"-"`
1387 }
1388
1389 func (s ConfigManagementPolicyControllerState) MarshalJSON() ([]byte, error) {
1390 type NoMethod ConfigManagementPolicyControllerState
1391 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1392 }
1393
1394 // ConfigManagementPolicyControllerVersion: The build version of Gatekeeper
1395 // Policy Controller is using.
1396 type ConfigManagementPolicyControllerVersion struct {
1397 // Version: The gatekeeper image tag that is composed of ACM version, git tag,
1398 // build number.
1399 Version string `json:"version,omitempty"`
1400 // ForceSendFields is a list of field names (e.g. "Version") to unconditionally
1401 // include in API requests. By default, fields with empty or default values are
1402 // omitted from API requests. See
1403 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1404 // details.
1405 ForceSendFields []string `json:"-"`
1406 // NullFields is a list of field names (e.g. "Version") to include in API
1407 // requests with the JSON null value. By default, fields with empty values are
1408 // omitted from API requests. See
1409 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1410 NullFields []string `json:"-"`
1411 }
1412
1413 func (s ConfigManagementPolicyControllerVersion) MarshalJSON() ([]byte, error) {
1414 type NoMethod ConfigManagementPolicyControllerVersion
1415 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1416 }
1417
1418 // ConfigManagementSpec: **Anthos Config Management**: Configuration for a
1419 // single cluster. Intended to parallel the ConfigManagement CR.
1420 type ConfigManagementSpec struct {
1421 // Binauthz: Optional. Deprecated: Binauthz configuration will be ignored and
1422 // should not be set.
1423 Binauthz *ConfigManagementBinauthzConfig `json:"binauthz,omitempty"`
1424 // Cluster: Optional. User-specified cluster name used by the Config Sync
1425 // cluster-name-selector annotation or ClusterSelector object, for applying
1426 // configs to only a subset of clusters. Read more about the
1427 // cluster-name-selector annotation and ClusterSelector object at
1428 // https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/how-to/cluster-scoped-objects#limiting-configs.
1429 // Only set this field if a name different from the cluster's fleet membership
1430 // name is used by the Config Sync cluster-name-selector annotation or
1431 // ClusterSelector.
1432 Cluster string `json:"cluster,omitempty"`
1433 // ConfigSync: Optional. Config Sync configuration for the cluster.
1434 ConfigSync *ConfigManagementConfigSync `json:"configSync,omitempty"`
1435 // HierarchyController: Optional. Hierarchy Controller configuration for the
1436 // cluster. Deprecated: Configuring Hierarchy Controller through the
1437 // configmanagement feature is no longer recommended. Use
1438 // https://github.com/kubernetes-sigs/hierarchical-namespaces instead.
1439 HierarchyController *ConfigManagementHierarchyControllerConfig `json:"hierarchyController,omitempty"`
1440 // Management: Optional. Deprecated: From version 1.21.0, automatic Feature
1441 // management is unavailable, and Config Sync only supports manual upgrades.
1442 //
1443 // Possible values:
1444 // "MANAGEMENT_UNSPECIFIED" - Unspecified
1445 // "MANAGEMENT_AUTOMATIC" - Google will manage the Feature for the cluster.
1446 // "MANAGEMENT_MANUAL" - User will manually manage the Feature for the
1447 // cluster.
1448 Management string `json:"management,omitempty"`
1449 // PolicyController: Optional. Policy Controller configuration for the cluster.
1450 // Deprecated: Configuring Policy Controller through the configmanagement
1451 // feature is no longer recommended. Use the policycontroller feature instead.
1452 PolicyController *ConfigManagementPolicyController `json:"policyController,omitempty"`
1453 // Version: Optional. Version of Config Sync to install. Defaults to the latest
1454 // supported Config Sync version if the config_sync field is enabled. See
1455 // supported versions at
1456 // https://cloud.google.com/kubernetes-engine/config-sync/docs/get-support-config-sync#version_support_policy.
1457 Version string `json:"version,omitempty"`
1458 // ForceSendFields is a list of field names (e.g. "Binauthz") to
1459 // unconditionally include in API requests. By default, fields with empty or
1460 // default values are omitted from API requests. See
1461 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1462 // details.
1463 ForceSendFields []string `json:"-"`
1464 // NullFields is a list of field names (e.g. "Binauthz") to include in API
1465 // requests with the JSON null value. By default, fields with empty values are
1466 // omitted from API requests. See
1467 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1468 NullFields []string `json:"-"`
1469 }
1470
1471 func (s ConfigManagementSpec) MarshalJSON() ([]byte, error) {
1472 type NoMethod ConfigManagementSpec
1473 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1474 }
1475
1476 // ConfigManagementState: **Anthos Config Management**: State for a single
1477 // cluster.
1478 type ConfigManagementState struct {
1479 // BinauthzState: Output only. Binauthz status.
1480 BinauthzState *ConfigManagementBinauthzState `json:"binauthzState,omitempty"`
1481 // ClusterName: Output only. This field is set to the `cluster_name` field of
1482 // the Membership Spec if it is not empty. Otherwise, it is set to the
1483 // cluster's fleet membership name.
1484 ClusterName string `json:"clusterName,omitempty"`
1485 // ConfigSyncState: Output only. Current sync status.
1486 ConfigSyncState *ConfigManagementConfigSyncState `json:"configSyncState,omitempty"`
1487 // HierarchyControllerState: Output only. Hierarchy Controller status.
1488 HierarchyControllerState *ConfigManagementHierarchyControllerState `json:"hierarchyControllerState,omitempty"`
1489 // KubernetesApiServerVersion: Output only. The Kubernetes API server version
1490 // of the cluster.
1491 KubernetesApiServerVersion string `json:"kubernetesApiServerVersion,omitempty"`
1492 // MembershipSpec: Output only. Membership configuration in the cluster. This
1493 // represents the actual state in the cluster, while the MembershipSpec in the
1494 // FeatureSpec represents the intended state.
1495 MembershipSpec *ConfigManagementSpec `json:"membershipSpec,omitempty"`
1496 // OperatorState: Output only. Current install status of ACM's Operator.
1497 OperatorState *ConfigManagementOperatorState `json:"operatorState,omitempty"`
1498 // PolicyControllerState: Output only. PolicyController status.
1499 PolicyControllerState *ConfigManagementPolicyControllerState `json:"policyControllerState,omitempty"`
1500 // ForceSendFields is a list of field names (e.g. "BinauthzState") to
1501 // unconditionally include in API requests. By default, fields with empty or
1502 // default values are omitted from API requests. See
1503 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1504 // details.
1505 ForceSendFields []string `json:"-"`
1506 // NullFields is a list of field names (e.g. "BinauthzState") to include in API
1507 // requests with the JSON null value. By default, fields with empty values are
1508 // omitted from API requests. See
1509 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1510 NullFields []string `json:"-"`
1511 }
1512
1513 func (s ConfigManagementState) MarshalJSON() ([]byte, error) {
1514 type NoMethod ConfigManagementState
1515 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1516 }
1517
1518 // ConfigManagementSyncError: An ACM created error representing a problem
1519 // syncing configurations.
1520 type ConfigManagementSyncError struct {
1521 // Code: An ACM defined error code
1522 Code string `json:"code,omitempty"`
1523 // ErrorMessage: A description of the error
1524 ErrorMessage string `json:"errorMessage,omitempty"`
1525 // ErrorResources: A list of config(s) associated with the error, if any
1526 ErrorResources []*ConfigManagementErrorResource `json:"errorResources,omitempty"`
1527 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
1528 // include in API requests. By default, fields with empty or default values are
1529 // omitted from API requests. See
1530 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1531 // details.
1532 ForceSendFields []string `json:"-"`
1533 // NullFields is a list of field names (e.g. "Code") to include in API requests
1534 // with the JSON null value. By default, fields with empty values are omitted
1535 // from API requests. See
1536 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1537 NullFields []string `json:"-"`
1538 }
1539
1540 func (s ConfigManagementSyncError) MarshalJSON() ([]byte, error) {
1541 type NoMethod ConfigManagementSyncError
1542 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1543 }
1544
1545 // ConfigManagementSyncState: State indicating an ACM's progress syncing
1546 // configurations to a cluster.
1547 type ConfigManagementSyncState struct {
1548 // Code: Sync status code.
1549 //
1550 // Possible values:
1551 // "SYNC_CODE_UNSPECIFIED" - Config Sync cannot determine a sync code
1552 // "SYNCED" - Config Sync successfully synced the git Repo with the cluster
1553 // "PENDING" - Config Sync is in the progress of syncing a new change
1554 // "ERROR" - Indicates an error configuring Config Sync, and user action is
1555 // required
1556 // "NOT_CONFIGURED" - Config Sync has been installed but not configured
1557 // "NOT_INSTALLED" - Config Sync has not been installed
1558 // "UNAUTHORIZED" - Error authorizing with the cluster
1559 // "UNREACHABLE" - Cluster could not be reached
1560 Code string `json:"code,omitempty"`
1561 // Errors: A list of errors resulting from problematic configs. This list will
1562 // be truncated after 100 errors, although it is unlikely for that many errors
1563 // to simultaneously exist.
1564 Errors []*ConfigManagementSyncError `json:"errors,omitempty"`
1565 // ImportToken: Token indicating the state of the importer.
1566 ImportToken string `json:"importToken,omitempty"`
1567 // LastSync: Deprecated: use last_sync_time instead. Timestamp of when ACM last
1568 // successfully synced the repo. The time format is specified in
1569 // https://golang.org/pkg/time/#Time.String
1570 LastSync string `json:"lastSync,omitempty"`
1571 // LastSyncTime: Timestamp type of when ACM last successfully synced the repo.
1572 LastSyncTime string `json:"lastSyncTime,omitempty"`
1573 // SourceToken: Token indicating the state of the repo.
1574 SourceToken string `json:"sourceToken,omitempty"`
1575 // SyncToken: Token indicating the state of the syncer.
1576 SyncToken string `json:"syncToken,omitempty"`
1577 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
1578 // include in API requests. By default, fields with empty or default values are
1579 // omitted from API requests. See
1580 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1581 // details.
1582 ForceSendFields []string `json:"-"`
1583 // NullFields is a list of field names (e.g. "Code") to include in API requests
1584 // with the JSON null value. By default, fields with empty values are omitted
1585 // from API requests. See
1586 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1587 NullFields []string `json:"-"`
1588 }
1589
1590 func (s ConfigManagementSyncState) MarshalJSON() ([]byte, error) {
1591 type NoMethod ConfigManagementSyncState
1592 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1593 }
1594
1595 // Empty: A generic empty message that you can re-use to avoid defining
1596 // duplicated empty messages in your APIs. A typical example is to use it as
1597 // the request or the response type of an API method. For instance: service Foo
1598 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
1599 type Empty struct {
1600 // ServerResponse contains the HTTP response code and headers from the server.
1601 googleapi.ServerResponse `json:"-"`
1602 }
1603
1604 // FeatureSpec: FeatureSpec contains user input per-feature spec information.
1605 type FeatureSpec struct {
1606 // Cloudbuild: Cloudbuild-specific FeatureSpec.
1607 Cloudbuild *CloudBuildSpec `json:"cloudbuild,omitempty"`
1608 // Configmanagement: Config Management FeatureSpec.
1609 Configmanagement *ConfigManagementSpec `json:"configmanagement,omitempty"`
1610 // Identityservice: IdentityService FeatureSpec.
1611 Identityservice *IdentityServiceSpec `json:"identityservice,omitempty"`
1612 // Origin: Whether this per-Feature spec was inherited from a fleet-level
1613 // default. This field can be updated by users by either overriding a Feature
1614 // config (updated to USER implicitly) or setting to FLEET explicitly.
1615 Origin *Origin `json:"origin,omitempty"`
1616 // Policycontroller: Policycontroller-specific FeatureSpec.
1617 Policycontroller *PolicyControllerSpec `json:"policycontroller,omitempty"`
1618 // Rbacrolebindingactuation: Rbacrolebindingactuation-specific FeatureSpec.
1619 Rbacrolebindingactuation *RBACRoleBindingActuationSpec `json:"rbacrolebindingactuation,omitempty"`
1620 // Servicemesh: ServiceMesh Feature Spec.
1621 Servicemesh *ServiceMeshSpec `json:"servicemesh,omitempty"`
1622 // Workloadcertificate: Workloadcertificate-specific FeatureSpec.
1623 Workloadcertificate *WorkloadCertificateSpec `json:"workloadcertificate,omitempty"`
1624 // ForceSendFields is a list of field names (e.g. "Cloudbuild") to
1625 // unconditionally include in API requests. By default, fields with empty or
1626 // default values are omitted from API requests. See
1627 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1628 // details.
1629 ForceSendFields []string `json:"-"`
1630 // NullFields is a list of field names (e.g. "Cloudbuild") to include in API
1631 // requests with the JSON null value. By default, fields with empty values are
1632 // omitted from API requests. See
1633 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1634 NullFields []string `json:"-"`
1635 }
1636
1637 func (s FeatureSpec) MarshalJSON() ([]byte, error) {
1638 type NoMethod FeatureSpec
1639 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1640 }
1641
1642 // FeatureState: FeatureState contains high-level state information and
1643 // per-feature state information for this MembershipFeature.
1644 type FeatureState struct {
1645 // Appdevexperience: Appdevexperience specific state.
1646 Appdevexperience *AppDevExperienceState `json:"appdevexperience,omitempty"`
1647 // Clusterupgrade: Cluster upgrade state.
1648 Clusterupgrade *ClusterUpgradeState `json:"clusterupgrade,omitempty"`
1649 // Configmanagement: Config Management state
1650 Configmanagement *ConfigManagementState `json:"configmanagement,omitempty"`
1651 // Identityservice: Identity service state
1652 Identityservice *IdentityServiceState `json:"identityservice,omitempty"`
1653 // Metering: Metering state
1654 Metering *MeteringState `json:"metering,omitempty"`
1655 // Policycontroller: Policy Controller state
1656 Policycontroller *PolicyControllerState `json:"policycontroller,omitempty"`
1657 // Rbacrolebindingactuation: RBAC Role Binding Actuation state
1658 Rbacrolebindingactuation *RBACRoleBindingActuationState `json:"rbacrolebindingactuation,omitempty"`
1659 // Servicemesh: Service mesh state
1660 Servicemesh *ServiceMeshState `json:"servicemesh,omitempty"`
1661 // State: The high-level state of this MembershipFeature.
1662 State *State `json:"state,omitempty"`
1663 // Workloadidentity: Workload Identity state
1664 Workloadidentity *WorkloadIdentityState `json:"workloadidentity,omitempty"`
1665 // ForceSendFields is a list of field names (e.g. "Appdevexperience") to
1666 // unconditionally include in API requests. By default, fields with empty or
1667 // default values are omitted from API requests. See
1668 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1669 // details.
1670 ForceSendFields []string `json:"-"`
1671 // NullFields is a list of field names (e.g. "Appdevexperience") to include in
1672 // API requests with the JSON null value. By default, fields with empty values
1673 // are omitted from API requests. See
1674 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1675 NullFields []string `json:"-"`
1676 }
1677
1678 func (s FeatureState) MarshalJSON() ([]byte, error) {
1679 type NoMethod FeatureState
1680 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1681 }
1682
1683 // GoogleRpcStatus: The `Status` type defines a logical error model that is
1684 // suitable for different programming environments, including REST APIs and RPC
1685 // APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message
1686 // contains three pieces of data: error code, error message, and error details.
1687 // You can find out more about this error model and how to work with it in the
1688 // API Design Guide (https://cloud.google.com/apis/design/errors).
1689 type GoogleRpcStatus struct {
1690 // Code: The status code, which should be an enum value of google.rpc.Code.
1691 Code int64 `json:"code,omitempty"`
1692 // Details: A list of messages that carry the error details. There is a common
1693 // set of message types for APIs to use.
1694 Details []googleapi.RawMessage `json:"details,omitempty"`
1695 // Message: A developer-facing error message, which should be in English. Any
1696 // user-facing error message should be localized and sent in the
1697 // google.rpc.Status.details field, or localized by the client.
1698 Message string `json:"message,omitempty"`
1699 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
1700 // include in API requests. By default, fields with empty or default values are
1701 // omitted from API requests. See
1702 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1703 // details.
1704 ForceSendFields []string `json:"-"`
1705 // NullFields is a list of field names (e.g. "Code") to include in API requests
1706 // with the JSON null value. By default, fields with empty values are omitted
1707 // from API requests. See
1708 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1709 NullFields []string `json:"-"`
1710 }
1711
1712 func (s GoogleRpcStatus) MarshalJSON() ([]byte, error) {
1713 type NoMethod GoogleRpcStatus
1714 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1715 }
1716
1717 // IdentityServiceAuthMethod: Configuration of an auth method for a
1718 // member/cluster. Only one authentication method (e.g., OIDC and LDAP) can be
1719 // set per AuthMethod.
1720 type IdentityServiceAuthMethod struct {
1721 // AzureadConfig: AzureAD specific Configuration.
1722 AzureadConfig *IdentityServiceAzureADConfig `json:"azureadConfig,omitempty"`
1723 // GoogleConfig: GoogleConfig specific configuration
1724 GoogleConfig *IdentityServiceGoogleConfig `json:"googleConfig,omitempty"`
1725 // LdapConfig: LDAP specific configuration.
1726 LdapConfig *IdentityServiceLdapConfig `json:"ldapConfig,omitempty"`
1727 // Name: Identifier for auth config.
1728 Name string `json:"name,omitempty"`
1729 // OidcConfig: OIDC specific configuration.
1730 OidcConfig *IdentityServiceOidcConfig `json:"oidcConfig,omitempty"`
1731 // Proxy: Proxy server address to use for auth method.
1732 Proxy string `json:"proxy,omitempty"`
1733 // SamlConfig: SAML specific configuration.
1734 SamlConfig *IdentityServiceSamlConfig `json:"samlConfig,omitempty"`
1735 // ForceSendFields is a list of field names (e.g. "AzureadConfig") to
1736 // unconditionally include in API requests. By default, fields with empty or
1737 // default values are omitted from API requests. See
1738 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1739 // details.
1740 ForceSendFields []string `json:"-"`
1741 // NullFields is a list of field names (e.g. "AzureadConfig") to include in API
1742 // requests with the JSON null value. By default, fields with empty values are
1743 // omitted from API requests. See
1744 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1745 NullFields []string `json:"-"`
1746 }
1747
1748 func (s IdentityServiceAuthMethod) MarshalJSON() ([]byte, error) {
1749 type NoMethod IdentityServiceAuthMethod
1750 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1751 }
1752
1753 // IdentityServiceAzureADConfig: Configuration for the AzureAD Auth flow.
1754 type IdentityServiceAzureADConfig struct {
1755 // ClientId: ID for the registered client application that makes authentication
1756 // requests to the Azure AD identity provider.
1757 ClientId string `json:"clientId,omitempty"`
1758 // ClientSecret: Input only. Unencrypted AzureAD client secret will be passed
1759 // to the GKE Hub CLH.
1760 ClientSecret string `json:"clientSecret,omitempty"`
1761 // EncryptedClientSecret: Output only. Encrypted AzureAD client secret.
1762 EncryptedClientSecret string `json:"encryptedClientSecret,omitempty"`
1763 // GroupFormat: Optional. Format of the AzureAD groups that the client wants
1764 // for auth.
1765 GroupFormat string `json:"groupFormat,omitempty"`
1766 // KubectlRedirectUri: The redirect URL that kubectl uses for authorization.
1767 KubectlRedirectUri string `json:"kubectlRedirectUri,omitempty"`
1768 // Tenant: Kind of Azure AD account to be authenticated. Supported values are
1769 // or for accounts belonging to a specific tenant.
1770 Tenant string `json:"tenant,omitempty"`
1771 // UserClaim: Optional. Claim in the AzureAD ID Token that holds the user
1772 // details.
1773 UserClaim string `json:"userClaim,omitempty"`
1774 // ForceSendFields is a list of field names (e.g. "ClientId") to
1775 // unconditionally include in API requests. By default, fields with empty or
1776 // default values are omitted from API requests. See
1777 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1778 // details.
1779 ForceSendFields []string `json:"-"`
1780 // NullFields is a list of field names (e.g. "ClientId") to include in API
1781 // requests with the JSON null value. By default, fields with empty values are
1782 // omitted from API requests. See
1783 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1784 NullFields []string `json:"-"`
1785 }
1786
1787 func (s IdentityServiceAzureADConfig) MarshalJSON() ([]byte, error) {
1788 type NoMethod IdentityServiceAzureADConfig
1789 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1790 }
1791
1792 // IdentityServiceDiagnosticInterface: Configuration options for the AIS
1793 // diagnostic interface.
1794 type IdentityServiceDiagnosticInterface struct {
1795 // Enabled: Determines whether to enable the diagnostic interface.
1796 Enabled bool `json:"enabled,omitempty"`
1797 // ExpirationTime: Determines the expiration time of the diagnostic interface
1798 // enablement. When reached, requests to the interface would be automatically
1799 // rejected.
1800 ExpirationTime string `json:"expirationTime,omitempty"`
1801 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
1802 // include in API requests. By default, fields with empty or default values are
1803 // omitted from API requests. See
1804 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1805 // details.
1806 ForceSendFields []string `json:"-"`
1807 // NullFields is a list of field names (e.g. "Enabled") to include in API
1808 // requests with the JSON null value. By default, fields with empty values are
1809 // omitted from API requests. See
1810 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1811 NullFields []string `json:"-"`
1812 }
1813
1814 func (s IdentityServiceDiagnosticInterface) MarshalJSON() ([]byte, error) {
1815 type NoMethod IdentityServiceDiagnosticInterface
1816 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1817 }
1818
1819 // IdentityServiceGoogleConfig: Configuration for the Google Plugin Auth flow.
1820 type IdentityServiceGoogleConfig struct {
1821 // Disable: Disable automatic configuration of Google Plugin on supported
1822 // platforms.
1823 Disable bool `json:"disable,omitempty"`
1824 // ForceSendFields is a list of field names (e.g. "Disable") to unconditionally
1825 // include in API requests. By default, fields with empty or default values are
1826 // omitted from API requests. See
1827 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1828 // details.
1829 ForceSendFields []string `json:"-"`
1830 // NullFields is a list of field names (e.g. "Disable") to include in API
1831 // requests with the JSON null value. By default, fields with empty values are
1832 // omitted from API requests. See
1833 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1834 NullFields []string `json:"-"`
1835 }
1836
1837 func (s IdentityServiceGoogleConfig) MarshalJSON() ([]byte, error) {
1838 type NoMethod IdentityServiceGoogleConfig
1839 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1840 }
1841
1842 // IdentityServiceGroupConfig: Contains the properties for locating and
1843 // authenticating groups in the directory.
1844 type IdentityServiceGroupConfig struct {
1845 // BaseDn: Required. The location of the subtree in the LDAP directory to
1846 // search for group entries.
1847 BaseDn string `json:"baseDn,omitempty"`
1848 // Filter: Optional. Optional filter to be used when searching for groups a
1849 // user belongs to. This can be used to explicitly match only certain groups in
1850 // order to reduce the amount of groups returned for each user. This defaults
1851 // to "(objectClass=Group)".
1852 Filter string `json:"filter,omitempty"`
1853 // IdAttribute: Optional. The identifying name of each group a user belongs to.
1854 // For example, if this is set to "distinguishedName" then RBACs and other
1855 // group expectations should be written as full DNs. This defaults to
1856 // "distinguishedName".
1857 IdAttribute string `json:"idAttribute,omitempty"`
1858 // ForceSendFields is a list of field names (e.g. "BaseDn") to unconditionally
1859 // include in API requests. By default, fields with empty or default values are
1860 // omitted from API requests. See
1861 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1862 // details.
1863 ForceSendFields []string `json:"-"`
1864 // NullFields is a list of field names (e.g. "BaseDn") to include in API
1865 // requests with the JSON null value. By default, fields with empty values are
1866 // omitted from API requests. See
1867 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1868 NullFields []string `json:"-"`
1869 }
1870
1871 func (s IdentityServiceGroupConfig) MarshalJSON() ([]byte, error) {
1872 type NoMethod IdentityServiceGroupConfig
1873 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1874 }
1875
1876 // IdentityServiceIdentityServiceOptions: Holds non-protocol-related
1877 // configuration options.
1878 type IdentityServiceIdentityServiceOptions struct {
1879 // DiagnosticInterface: Configuration options for the AIS diagnostic interface.
1880 DiagnosticInterface *IdentityServiceDiagnosticInterface `json:"diagnosticInterface,omitempty"`
1881 // SessionDuration: Determines the lifespan of STS tokens issued by Anthos
1882 // Identity Service.
1883 SessionDuration string `json:"sessionDuration,omitempty"`
1884 // ForceSendFields is a list of field names (e.g. "DiagnosticInterface") to
1885 // unconditionally include in API requests. By default, fields with empty or
1886 // default values are omitted from API requests. See
1887 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1888 // details.
1889 ForceSendFields []string `json:"-"`
1890 // NullFields is a list of field names (e.g. "DiagnosticInterface") to include
1891 // in API requests with the JSON null value. By default, fields with empty
1892 // values are omitted from API requests. See
1893 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1894 NullFields []string `json:"-"`
1895 }
1896
1897 func (s IdentityServiceIdentityServiceOptions) MarshalJSON() ([]byte, error) {
1898 type NoMethod IdentityServiceIdentityServiceOptions
1899 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1900 }
1901
1902 // IdentityServiceLdapConfig: Configuration for the LDAP Auth flow.
1903 type IdentityServiceLdapConfig struct {
1904 // Group: Optional. Contains the properties for locating and authenticating
1905 // groups in the directory.
1906 Group *IdentityServiceGroupConfig `json:"group,omitempty"`
1907 // Server: Required. Server settings for the external LDAP server.
1908 Server *IdentityServiceServerConfig `json:"server,omitempty"`
1909 // ServiceAccount: Required. Contains the credentials of the service account
1910 // which is authorized to perform the LDAP search in the directory. The
1911 // credentials can be supplied by the combination of the DN and password or the
1912 // client certificate.
1913 ServiceAccount *IdentityServiceServiceAccountConfig `json:"serviceAccount,omitempty"`
1914 // User: Required. Defines where users exist in the LDAP directory.
1915 User *IdentityServiceUserConfig `json:"user,omitempty"`
1916 // ForceSendFields is a list of field names (e.g. "Group") to unconditionally
1917 // include in API requests. By default, fields with empty or default values are
1918 // omitted from API requests. See
1919 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1920 // details.
1921 ForceSendFields []string `json:"-"`
1922 // NullFields is a list of field names (e.g. "Group") to include in API
1923 // requests with the JSON null value. By default, fields with empty values are
1924 // omitted from API requests. See
1925 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1926 NullFields []string `json:"-"`
1927 }
1928
1929 func (s IdentityServiceLdapConfig) MarshalJSON() ([]byte, error) {
1930 type NoMethod IdentityServiceLdapConfig
1931 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1932 }
1933
1934 // IdentityServiceOidcConfig: Configuration for OIDC Auth flow.
1935 type IdentityServiceOidcConfig struct {
1936 // CertificateAuthorityData: PEM-encoded CA for OIDC provider.
1937 CertificateAuthorityData string `json:"certificateAuthorityData,omitempty"`
1938 // ClientId: ID for OIDC client application.
1939 ClientId string `json:"clientId,omitempty"`
1940 // ClientSecret: Input only. Unencrypted OIDC client secret will be passed to
1941 // the GKE Hub CLH.
1942 ClientSecret string `json:"clientSecret,omitempty"`
1943 // DeployCloudConsoleProxy: Flag to denote if reverse proxy is used to connect
1944 // to auth provider. This flag should be set to true when provider is not
1945 // reachable by Google Cloud Console.
1946 DeployCloudConsoleProxy bool `json:"deployCloudConsoleProxy,omitempty"`
1947 // EnableAccessToken: Enable access token.
1948 EnableAccessToken bool `json:"enableAccessToken,omitempty"`
1949 // EncryptedClientSecret: Output only. Encrypted OIDC Client secret
1950 EncryptedClientSecret string `json:"encryptedClientSecret,omitempty"`
1951 // ExtraParams: Comma-separated list of key-value pairs.
1952 ExtraParams string `json:"extraParams,omitempty"`
1953 // GroupPrefix: Prefix to prepend to group name.
1954 GroupPrefix string `json:"groupPrefix,omitempty"`
1955 // GroupsClaim: Claim in OIDC ID token that holds group information.
1956 GroupsClaim string `json:"groupsClaim,omitempty"`
1957 // IssuerUri: URI for the OIDC provider. This should point to the level below
1958 // .well-known/openid-configuration.
1959 IssuerUri string `json:"issuerUri,omitempty"`
1960 // KubectlRedirectUri: Registered redirect uri to redirect users going through
1961 // OAuth flow using kubectl plugin.
1962 KubectlRedirectUri string `json:"kubectlRedirectUri,omitempty"`
1963 // Scopes: Comma-separated list of identifiers.
1964 Scopes string `json:"scopes,omitempty"`
1965 // UserClaim: Claim in OIDC ID token that holds username.
1966 UserClaim string `json:"userClaim,omitempty"`
1967 // UserPrefix: Prefix to prepend to user name.
1968 UserPrefix string `json:"userPrefix,omitempty"`
1969 // ForceSendFields is a list of field names (e.g. "CertificateAuthorityData")
1970 // to unconditionally include in API requests. By default, fields with empty or
1971 // default values are omitted from API requests. See
1972 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1973 // details.
1974 ForceSendFields []string `json:"-"`
1975 // NullFields is a list of field names (e.g. "CertificateAuthorityData") to
1976 // include in API requests with the JSON null value. By default, fields with
1977 // empty values are omitted from API requests. See
1978 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1979 NullFields []string `json:"-"`
1980 }
1981
1982 func (s IdentityServiceOidcConfig) MarshalJSON() ([]byte, error) {
1983 type NoMethod IdentityServiceOidcConfig
1984 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1985 }
1986
1987 // IdentityServiceSamlConfig: Configuration for the SAML Auth flow.
1988 type IdentityServiceSamlConfig struct {
1989 // AttributeMapping: Optional. The mapping of additional user attributes like
1990 // nickname, birthday and address etc.. `key` is the name of this additional
1991 // attribute. `value` is a string presenting as CEL(common expression language,
1992 // go/cel) used for getting the value from the resources. Take nickname as an
1993 // example, in this case, `key` is "attribute.nickname" and `value` is
1994 // "assertion.nickname".
1995 AttributeMapping map[string]string `json:"attributeMapping,omitempty"`
1996 // GroupPrefix: Optional. Prefix to prepend to group name.
1997 GroupPrefix string `json:"groupPrefix,omitempty"`
1998 // GroupsAttribute: Optional. The SAML attribute to read groups from. This
1999 // value is expected to be a string and will be passed along as-is (with the
2000 // option of being prefixed by the `group_prefix`).
2001 GroupsAttribute string `json:"groupsAttribute,omitempty"`
2002 // IdentityProviderCertificates: Required. The list of IdP certificates to
2003 // validate the SAML response against.
2004 IdentityProviderCertificates []string `json:"identityProviderCertificates,omitempty"`
2005 // IdentityProviderId: Required. The entity ID of the SAML IdP.
2006 IdentityProviderId string `json:"identityProviderId,omitempty"`
2007 // IdentityProviderSsoUri: Required. The URI where the SAML IdP exposes the SSO
2008 // service.
2009 IdentityProviderSsoUri string `json:"identityProviderSsoUri,omitempty"`
2010 // UserAttribute: Optional. The SAML attribute to read username from. If
2011 // unspecified, the username will be read from the NameID element of the
2012 // assertion in SAML response. This value is expected to be a string and will
2013 // be passed along as-is (with the option of being prefixed by the
2014 // `user_prefix`).
2015 UserAttribute string `json:"userAttribute,omitempty"`
2016 // UserPrefix: Optional. Prefix to prepend to user name.
2017 UserPrefix string `json:"userPrefix,omitempty"`
2018 // ForceSendFields is a list of field names (e.g. "AttributeMapping") to
2019 // unconditionally include in API requests. By default, fields with empty or
2020 // default values are omitted from API requests. See
2021 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2022 // details.
2023 ForceSendFields []string `json:"-"`
2024 // NullFields is a list of field names (e.g. "AttributeMapping") to include in
2025 // API requests with the JSON null value. By default, fields with empty values
2026 // are omitted from API requests. See
2027 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2028 NullFields []string `json:"-"`
2029 }
2030
2031 func (s IdentityServiceSamlConfig) MarshalJSON() ([]byte, error) {
2032 type NoMethod IdentityServiceSamlConfig
2033 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2034 }
2035
2036 // IdentityServiceServerConfig: Server settings for the external LDAP server.
2037 type IdentityServiceServerConfig struct {
2038 // CertificateAuthorityData: Optional. Contains a Base64 encoded, PEM formatted
2039 // certificate authority certificate for the LDAP server. This must be provided
2040 // for the "ldaps" and "startTLS" connections.
2041 CertificateAuthorityData string `json:"certificateAuthorityData,omitempty"`
2042 // ConnectionType: Optional. Defines the connection type to communicate with
2043 // the LDAP server. If `starttls` or `ldaps` is specified, the
2044 // certificate_authority_data should not be empty.
2045 ConnectionType string `json:"connectionType,omitempty"`
2046 // Host: Required. Defines the hostname or IP of the LDAP server. Port is
2047 // optional and will default to 389, if unspecified. For example,
2048 // "ldap.server.example" or "10.10.10.10:389".
2049 Host string `json:"host,omitempty"`
2050 // ForceSendFields is a list of field names (e.g. "CertificateAuthorityData")
2051 // to unconditionally include in API requests. By default, fields with empty or
2052 // default values are omitted from API requests. See
2053 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2054 // details.
2055 ForceSendFields []string `json:"-"`
2056 // NullFields is a list of field names (e.g. "CertificateAuthorityData") to
2057 // include in API requests with the JSON null value. By default, fields with
2058 // empty values are omitted from API requests. See
2059 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2060 NullFields []string `json:"-"`
2061 }
2062
2063 func (s IdentityServiceServerConfig) MarshalJSON() ([]byte, error) {
2064 type NoMethod IdentityServiceServerConfig
2065 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2066 }
2067
2068 // IdentityServiceServiceAccountConfig: Contains the credentials of the service
2069 // account which is authorized to perform the LDAP search in the directory. The
2070 // credentials can be supplied by the combination of the DN and password or the
2071 // client certificate.
2072 type IdentityServiceServiceAccountConfig struct {
2073 // SimpleBindCredentials: Credentials for basic auth.
2074 SimpleBindCredentials *IdentityServiceSimpleBindCredentials `json:"simpleBindCredentials,omitempty"`
2075 // ForceSendFields is a list of field names (e.g. "SimpleBindCredentials") to
2076 // unconditionally include in API requests. By default, fields with empty or
2077 // default values are omitted from API requests. See
2078 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2079 // details.
2080 ForceSendFields []string `json:"-"`
2081 // NullFields is a list of field names (e.g. "SimpleBindCredentials") to
2082 // include in API requests with the JSON null value. By default, fields with
2083 // empty values are omitted from API requests. See
2084 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2085 NullFields []string `json:"-"`
2086 }
2087
2088 func (s IdentityServiceServiceAccountConfig) MarshalJSON() ([]byte, error) {
2089 type NoMethod IdentityServiceServiceAccountConfig
2090 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2091 }
2092
2093 // IdentityServiceSimpleBindCredentials: The structure holds the LDAP simple
2094 // binding credential.
2095 type IdentityServiceSimpleBindCredentials struct {
2096 // Dn: Required. The distinguished name(DN) of the service account object/user.
2097 Dn string `json:"dn,omitempty"`
2098 // EncryptedPassword: Output only. The encrypted password of the service
2099 // account object/user.
2100 EncryptedPassword string `json:"encryptedPassword,omitempty"`
2101 // Password: Required. Input only. The password of the service account
2102 // object/user.
2103 Password string `json:"password,omitempty"`
2104 // ForceSendFields is a list of field names (e.g. "Dn") to unconditionally
2105 // include in API requests. By default, fields with empty or default values are
2106 // omitted from API requests. See
2107 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2108 // details.
2109 ForceSendFields []string `json:"-"`
2110 // NullFields is a list of field names (e.g. "Dn") to include in API requests
2111 // with the JSON null value. By default, fields with empty values are omitted
2112 // from API requests. See
2113 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2114 NullFields []string `json:"-"`
2115 }
2116
2117 func (s IdentityServiceSimpleBindCredentials) MarshalJSON() ([]byte, error) {
2118 type NoMethod IdentityServiceSimpleBindCredentials
2119 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2120 }
2121
2122 // IdentityServiceSpec: **IdentityService**: Configuration for a single
2123 // membership.
2124 type IdentityServiceSpec struct {
2125 // AuthMethods: A member may support multiple auth methods.
2126 AuthMethods []*IdentityServiceAuthMethod `json:"authMethods,omitempty"`
2127 // IdentityServiceOptions: Optional. non-protocol-related configuration
2128 // options.
2129 IdentityServiceOptions *IdentityServiceIdentityServiceOptions `json:"identityServiceOptions,omitempty"`
2130 // ForceSendFields is a list of field names (e.g. "AuthMethods") to
2131 // unconditionally include in API requests. By default, fields with empty or
2132 // default values are omitted from API requests. See
2133 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2134 // details.
2135 ForceSendFields []string `json:"-"`
2136 // NullFields is a list of field names (e.g. "AuthMethods") to include in API
2137 // requests with the JSON null value. By default, fields with empty values are
2138 // omitted from API requests. See
2139 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2140 NullFields []string `json:"-"`
2141 }
2142
2143 func (s IdentityServiceSpec) MarshalJSON() ([]byte, error) {
2144 type NoMethod IdentityServiceSpec
2145 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2146 }
2147
2148 // IdentityServiceState: **IdentityService**: State for a single membership,
2149 // analyzed and reported by feature controller.
2150 type IdentityServiceState struct {
2151 // FailureReason: The reason of the failure.
2152 FailureReason string `json:"failureReason,omitempty"`
2153 // InstalledVersion: Installed AIS version. This is the AIS version installed
2154 // on this member. The values makes sense iff state is OK.
2155 InstalledVersion string `json:"installedVersion,omitempty"`
2156 // MemberConfig: Last reconciled membership configuration
2157 MemberConfig *IdentityServiceSpec `json:"memberConfig,omitempty"`
2158 // State: Deployment state on this member
2159 //
2160 // Possible values:
2161 // "DEPLOYMENT_STATE_UNSPECIFIED" - Unspecified state
2162 // "OK" - deployment succeeds
2163 // "ERROR" - Failure with error.
2164 State string `json:"state,omitempty"`
2165 // ForceSendFields is a list of field names (e.g. "FailureReason") to
2166 // unconditionally include in API requests. By default, fields with empty or
2167 // default values are omitted from API requests. See
2168 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2169 // details.
2170 ForceSendFields []string `json:"-"`
2171 // NullFields is a list of field names (e.g. "FailureReason") to include in API
2172 // requests with the JSON null value. By default, fields with empty values are
2173 // omitted from API requests. See
2174 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2175 NullFields []string `json:"-"`
2176 }
2177
2178 func (s IdentityServiceState) MarshalJSON() ([]byte, error) {
2179 type NoMethod IdentityServiceState
2180 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2181 }
2182
2183 // IdentityServiceUserConfig: Defines where users exist in the LDAP directory.
2184 type IdentityServiceUserConfig struct {
2185 // BaseDn: Required. The location of the subtree in the LDAP directory to
2186 // search for user entries.
2187 BaseDn string `json:"baseDn,omitempty"`
2188 // Filter: Optional. Filter to apply when searching for the user. This can be
2189 // used to further restrict the user accounts which are allowed to login. This
2190 // defaults to "(objectClass=User)".
2191 Filter string `json:"filter,omitempty"`
2192 // IdAttribute: Optional. Determines which attribute to use as the user's
2193 // identity after they are authenticated. This is distinct from the
2194 // loginAttribute field to allow users to login with a username, but then have
2195 // their actual identifier be an email address or full Distinguished Name (DN).
2196 // For example, setting loginAttribute to "sAMAccountName" and
2197 // identifierAttribute to "userPrincipalName" would allow a user to login as
2198 // "bsmith", but actual RBAC policies for the user would be written as
2199 // "[email protected]". Using "userPrincipalName" is recommended since this
2200 // will be unique for each user. This defaults to "userPrincipalName".
2201 IdAttribute string `json:"idAttribute,omitempty"`
2202 // LoginAttribute: Optional. The name of the attribute which matches against
2203 // the input username. This is used to find the user in the LDAP database e.g.
2204 // "(=)" and is combined with the optional filter field. This defaults to
2205 // "userPrincipalName".
2206 LoginAttribute string `json:"loginAttribute,omitempty"`
2207 // ForceSendFields is a list of field names (e.g. "BaseDn") to unconditionally
2208 // include in API requests. By default, fields with empty or default values are
2209 // omitted from API requests. See
2210 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2211 // details.
2212 ForceSendFields []string `json:"-"`
2213 // NullFields is a list of field names (e.g. "BaseDn") to include in API
2214 // requests with the JSON null value. By default, fields with empty values are
2215 // omitted from API requests. See
2216 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2217 NullFields []string `json:"-"`
2218 }
2219
2220 func (s IdentityServiceUserConfig) MarshalJSON() ([]byte, error) {
2221 type NoMethod IdentityServiceUserConfig
2222 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2223 }
2224
2225 // LifecycleState: LifecycleState describes the state of a MembershipFeature
2226 // *resource* in the GkeHub API. See `FeatureState` for the "running state" of
2227 // the MembershipFeature.
2228 type LifecycleState struct {
2229 // State: Output only. The current state of the Feature resource in the Hub
2230 // API.
2231 //
2232 // Possible values:
2233 // "STATE_UNSPECIFIED" - State is unknown or not set.
2234 // "ENABLING" - The MembershipFeature is being enabled, and the
2235 // MembershipFeature resource is being created. Once complete, the
2236 // corresponding MembershipFeature will be enabled in this Hub.
2237 // "ACTIVE" - The MembershipFeature is enabled in this Hub, and the
2238 // MembershipFeature resource is fully available.
2239 // "DISABLING" - The MembershipFeature is being disabled in this Hub, and the
2240 // MembershipFeature resource is being deleted.
2241 // "UPDATING" - The MembershipFeature resource is being updated.
2242 // "SERVICE_UPDATING" - The MembershipFeature resource is being updated by
2243 // the Hub Service.
2244 State string `json:"state,omitempty"`
2245 // ForceSendFields is a list of field names (e.g. "State") to unconditionally
2246 // include in API requests. By default, fields with empty or default values are
2247 // omitted from API requests. See
2248 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2249 // details.
2250 ForceSendFields []string `json:"-"`
2251 // NullFields is a list of field names (e.g. "State") to include in API
2252 // requests with the JSON null value. By default, fields with empty values are
2253 // omitted from API requests. See
2254 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2255 NullFields []string `json:"-"`
2256 }
2257
2258 func (s LifecycleState) MarshalJSON() ([]byte, error) {
2259 type NoMethod LifecycleState
2260 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2261 }
2262
2263 // ListLocationsResponse: The response message for Locations.ListLocations.
2264 type ListLocationsResponse struct {
2265 // Locations: A list of locations that matches the specified filter in the
2266 // request.
2267 Locations []*Location `json:"locations,omitempty"`
2268 // NextPageToken: The standard List next-page token.
2269 NextPageToken string `json:"nextPageToken,omitempty"`
2270
2271 // ServerResponse contains the HTTP response code and headers from the server.
2272 googleapi.ServerResponse `json:"-"`
2273 // ForceSendFields is a list of field names (e.g. "Locations") to
2274 // unconditionally include in API requests. By default, fields with empty or
2275 // default values are omitted from API requests. See
2276 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2277 // details.
2278 ForceSendFields []string `json:"-"`
2279 // NullFields is a list of field names (e.g. "Locations") to include in API
2280 // requests with the JSON null value. By default, fields with empty values are
2281 // omitted from API requests. See
2282 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2283 NullFields []string `json:"-"`
2284 }
2285
2286 func (s ListLocationsResponse) MarshalJSON() ([]byte, error) {
2287 type NoMethod ListLocationsResponse
2288 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2289 }
2290
2291 // ListMembershipFeaturesResponse: Response message for the
2292 // `GkeHubFeature.ListMembershipFeatures` method.
2293 type ListMembershipFeaturesResponse struct {
2294 // MembershipFeatures: The list of matching MembershipFeatures.
2295 MembershipFeatures []*MembershipFeature `json:"membershipFeatures,omitempty"`
2296 // NextPageToken: A token to request the next page of resources from the
2297 // `ListMembershipFeatures` method. The value of an empty string means that
2298 // there are no more resources to return.
2299 NextPageToken string `json:"nextPageToken,omitempty"`
2300 // Unreachable: List of locations that could not be reached while fetching this
2301 // list.
2302 Unreachable []string `json:"unreachable,omitempty"`
2303
2304 // ServerResponse contains the HTTP response code and headers from the server.
2305 googleapi.ServerResponse `json:"-"`
2306 // ForceSendFields is a list of field names (e.g. "MembershipFeatures") to
2307 // unconditionally include in API requests. By default, fields with empty or
2308 // default values are omitted from API requests. See
2309 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2310 // details.
2311 ForceSendFields []string `json:"-"`
2312 // NullFields is a list of field names (e.g. "MembershipFeatures") to include
2313 // in API requests with the JSON null value. By default, fields with empty
2314 // values are omitted from API requests. See
2315 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2316 NullFields []string `json:"-"`
2317 }
2318
2319 func (s ListMembershipFeaturesResponse) MarshalJSON() ([]byte, error) {
2320 type NoMethod ListMembershipFeaturesResponse
2321 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2322 }
2323
2324 // ListOperationsResponse: The response message for Operations.ListOperations.
2325 type ListOperationsResponse struct {
2326 // NextPageToken: The standard List next-page token.
2327 NextPageToken string `json:"nextPageToken,omitempty"`
2328 // Operations: A list of operations that matches the specified filter in the
2329 // request.
2330 Operations []*Operation `json:"operations,omitempty"`
2331 // Unreachable: Unordered list. Unreachable resources. Populated when the
2332 // request sets `ListOperationsRequest.return_partial_success` and reads across
2333 // collections. For example, when attempting to list all resources across all
2334 // supported locations.
2335 Unreachable []string `json:"unreachable,omitempty"`
2336
2337 // ServerResponse contains the HTTP response code and headers from the server.
2338 googleapi.ServerResponse `json:"-"`
2339 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
2340 // unconditionally include in API requests. By default, fields with empty or
2341 // default values are omitted from API requests. See
2342 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2343 // details.
2344 ForceSendFields []string `json:"-"`
2345 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
2346 // requests with the JSON null value. By default, fields with empty values are
2347 // omitted from API requests. See
2348 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2349 NullFields []string `json:"-"`
2350 }
2351
2352 func (s ListOperationsResponse) MarshalJSON() ([]byte, error) {
2353 type NoMethod ListOperationsResponse
2354 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2355 }
2356
2357 // Location: A resource that represents a Google Cloud location.
2358 type Location struct {
2359 // DisplayName: The friendly name for this location, typically a nearby city
2360 // name. For example, "Tokyo".
2361 DisplayName string `json:"displayName,omitempty"`
2362 // Labels: Cross-service attributes for the location. For example
2363 // {"cloud.googleapis.com/region": "us-east1"}
2364 Labels map[string]string `json:"labels,omitempty"`
2365 // LocationId: The canonical id for this location. For example: "us-east1".
2366 LocationId string `json:"locationId,omitempty"`
2367 // Metadata: Service-specific metadata. For example the available capacity at
2368 // the given location.
2369 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2370 // Name: Resource name for the location, which may vary between
2371 // implementations. For example:
2372 // "projects/example-project/locations/us-east1"
2373 Name string `json:"name,omitempty"`
2374
2375 // ServerResponse contains the HTTP response code and headers from the server.
2376 googleapi.ServerResponse `json:"-"`
2377 // ForceSendFields is a list of field names (e.g. "DisplayName") to
2378 // unconditionally include in API requests. By default, fields with empty or
2379 // default values are omitted from API requests. See
2380 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2381 // details.
2382 ForceSendFields []string `json:"-"`
2383 // NullFields is a list of field names (e.g. "DisplayName") to include in API
2384 // requests with the JSON null value. By default, fields with empty values are
2385 // omitted from API requests. See
2386 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2387 NullFields []string `json:"-"`
2388 }
2389
2390 func (s Location) MarshalJSON() ([]byte, error) {
2391 type NoMethod Location
2392 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2393 }
2394
2395 // MembershipFeature: MembershipFeature represents the settings and status of a
2396 // Fleet Feature enabled on a single Fleet Membership.
2397 type MembershipFeature struct {
2398 // CreateTime: Output only. When the MembershipFeature resource was created.
2399 CreateTime string `json:"createTime,omitempty"`
2400 // DeleteTime: Output only. When the MembershipFeature resource was deleted.
2401 DeleteTime string `json:"deleteTime,omitempty"`
2402 // Labels: Google Cloud labels for this MembershipFeature.
2403 Labels map[string]string `json:"labels,omitempty"`
2404 // LifecycleState: Output only. Lifecycle information of the resource itself.
2405 LifecycleState *LifecycleState `json:"lifecycleState,omitempty"`
2406 // Name: Output only. The resource name of the membershipFeature, in the
2407 // format:
2408 // `projects/{project}/locations/{location}/memberships/{membership}/features/{f
2409 // eature}`. Note that `membershipFeatures` is shortened to `features` in the
2410 // resource name. (see http://go/aip/122#collection-identifiers)
2411 Name string `json:"name,omitempty"`
2412 // Spec: Optional. Spec of this membershipFeature.
2413 Spec *FeatureSpec `json:"spec,omitempty"`
2414 // State: Output only. State of the this membershipFeature.
2415 State *FeatureState `json:"state,omitempty"`
2416 // UpdateTime: Output only. When the MembershipFeature resource was last
2417 // updated.
2418 UpdateTime string `json:"updateTime,omitempty"`
2419
2420 // ServerResponse contains the HTTP response code and headers from the server.
2421 googleapi.ServerResponse `json:"-"`
2422 // ForceSendFields is a list of field names (e.g. "CreateTime") to
2423 // unconditionally include in API requests. By default, fields with empty or
2424 // default values are omitted from API requests. See
2425 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2426 // details.
2427 ForceSendFields []string `json:"-"`
2428 // NullFields is a list of field names (e.g. "CreateTime") to include in API
2429 // requests with the JSON null value. By default, fields with empty values are
2430 // omitted from API requests. See
2431 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2432 NullFields []string `json:"-"`
2433 }
2434
2435 func (s MembershipFeature) MarshalJSON() ([]byte, error) {
2436 type NoMethod MembershipFeature
2437 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2438 }
2439
2440 // MeteringState: **Metering**: State for a single membership, analyzed and
2441 // reported by feature controller.
2442 type MeteringState struct {
2443 // LastMeasurementTime: The time stamp of the most recent measurement of the
2444 // number of vCPUs in the cluster.
2445 LastMeasurementTime string `json:"lastMeasurementTime,omitempty"`
2446 // PreciseLastMeasuredClusterVcpuCapacity: The vCPUs capacity in the cluster
2447 // according to the most recent measurement (1/1000 precision).
2448 PreciseLastMeasuredClusterVcpuCapacity float64 `json:"preciseLastMeasuredClusterVcpuCapacity,omitempty"`
2449 // ForceSendFields is a list of field names (e.g. "LastMeasurementTime") to
2450 // unconditionally include in API requests. By default, fields with empty or
2451 // default values are omitted from API requests. See
2452 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2453 // details.
2454 ForceSendFields []string `json:"-"`
2455 // NullFields is a list of field names (e.g. "LastMeasurementTime") to include
2456 // in API requests with the JSON null value. By default, fields with empty
2457 // values are omitted from API requests. See
2458 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2459 NullFields []string `json:"-"`
2460 }
2461
2462 func (s MeteringState) MarshalJSON() ([]byte, error) {
2463 type NoMethod MeteringState
2464 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2465 }
2466
2467 func (s *MeteringState) UnmarshalJSON(data []byte) error {
2468 type NoMethod MeteringState
2469 var s1 struct {
2470 PreciseLastMeasuredClusterVcpuCapacity gensupport.JSONFloat64 `json:"preciseLastMeasuredClusterVcpuCapacity"`
2471 *NoMethod
2472 }
2473 s1.NoMethod = (*NoMethod)(s)
2474 if err := json.Unmarshal(data, &s1); err != nil {
2475 return err
2476 }
2477 s.PreciseLastMeasuredClusterVcpuCapacity = float64(s1.PreciseLastMeasuredClusterVcpuCapacity)
2478 return nil
2479 }
2480
2481 // Operation: This resource represents a long-running operation that is the
2482 // result of a network API call.
2483 type Operation struct {
2484 // Done: If the value is `false`, it means the operation is still in progress.
2485 // If `true`, the operation is completed, and either `error` or `response` is
2486 // available.
2487 Done bool `json:"done,omitempty"`
2488 // Error: The error result of the operation in case of failure or cancellation.
2489 Error *GoogleRpcStatus `json:"error,omitempty"`
2490 // Metadata: Service-specific metadata associated with the operation. It
2491 // typically contains progress information and common metadata such as create
2492 // time. Some services might not provide such metadata. Any method that returns
2493 // a long-running operation should document the metadata type, if any.
2494 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2495 // Name: The server-assigned name, which is only unique within the same service
2496 // that originally returns it. If you use the default HTTP mapping, the `name`
2497 // should be a resource name ending with `operations/{unique_id}`.
2498 Name string `json:"name,omitempty"`
2499 // Response: The normal, successful response of the operation. If the original
2500 // method returns no data on success, such as `Delete`, the response is
2501 // `google.protobuf.Empty`. If the original method is standard
2502 // `Get`/`Create`/`Update`, the response should be the resource. For other
2503 // methods, the response should have the type `XxxResponse`, where `Xxx` is the
2504 // original method name. For example, if the original method name is
2505 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
2506 Response googleapi.RawMessage `json:"response,omitempty"`
2507
2508 // ServerResponse contains the HTTP response code and headers from the server.
2509 googleapi.ServerResponse `json:"-"`
2510 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally
2511 // include in API requests. By default, fields with empty or default values are
2512 // omitted from API requests. See
2513 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2514 // details.
2515 ForceSendFields []string `json:"-"`
2516 // NullFields is a list of field names (e.g. "Done") to include in API requests
2517 // with the JSON null value. By default, fields with empty values are omitted
2518 // from API requests. See
2519 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2520 NullFields []string `json:"-"`
2521 }
2522
2523 func (s Operation) MarshalJSON() ([]byte, error) {
2524 type NoMethod Operation
2525 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2526 }
2527
2528 // OperationMetadata: Metadata of the long-running operation.
2529 type OperationMetadata struct {
2530 // ApiVersion: Output only. API version used to start the operation.
2531 ApiVersion string `json:"apiVersion,omitempty"`
2532 // CancelRequested: Output only. Identifies whether the user has requested
2533 // cancellation of the operation. Operations that have successfully been
2534 // cancelled have Operation.error value with a google.rpc.Status.code of 1,
2535 // corresponding to `Code.CANCELLED`.
2536 CancelRequested bool `json:"cancelRequested,omitempty"`
2537 // CreateTime: Output only. The time the operation was created.
2538 CreateTime string `json:"createTime,omitempty"`
2539 // EndTime: Output only. The time the operation finished running.
2540 EndTime string `json:"endTime,omitempty"`
2541 // StatusDetail: Output only. Human-readable status of the operation, if any.
2542 StatusDetail string `json:"statusDetail,omitempty"`
2543 // Target: Output only. Server-defined resource path for the target of the
2544 // operation.
2545 Target string `json:"target,omitempty"`
2546 // Verb: Output only. Name of the verb executed by the operation.
2547 Verb string `json:"verb,omitempty"`
2548 // ForceSendFields is a list of field names (e.g. "ApiVersion") to
2549 // unconditionally include in API requests. By default, fields with empty or
2550 // default values are omitted from API requests. See
2551 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2552 // details.
2553 ForceSendFields []string `json:"-"`
2554 // NullFields is a list of field names (e.g. "ApiVersion") to include in API
2555 // requests with the JSON null value. By default, fields with empty values are
2556 // omitted from API requests. See
2557 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2558 NullFields []string `json:"-"`
2559 }
2560
2561 func (s OperationMetadata) MarshalJSON() ([]byte, error) {
2562 type NoMethod OperationMetadata
2563 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2564 }
2565
2566 // Origin: Origin defines where this FeatureSpec originated from.
2567 type Origin struct {
2568 // Type: Type specifies which type of origin is set.
2569 //
2570 // Possible values:
2571 // "TYPE_UNSPECIFIED" - Type is unknown or not set.
2572 // "FLEET" - Per-Feature spec was inherited from the fleet-level default.
2573 // "FLEET_OUT_OF_SYNC" - Per-Feature spec was inherited from the fleet-level
2574 // default but is now out of sync with the current default.
2575 // "USER" - Per-Feature spec was inherited from a user specification.
2576 Type string `json:"type,omitempty"`
2577 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally
2578 // include in API requests. By default, fields with empty or default values are
2579 // omitted from API requests. See
2580 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2581 // details.
2582 ForceSendFields []string `json:"-"`
2583 // NullFields is a list of field names (e.g. "Type") to include in API requests
2584 // with the JSON null value. By default, fields with empty values are omitted
2585 // from API requests. See
2586 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2587 NullFields []string `json:"-"`
2588 }
2589
2590 func (s Origin) MarshalJSON() ([]byte, error) {
2591 type NoMethod Origin
2592 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2593 }
2594
2595 // PolicyControllerBundleInstallSpec: BundleInstallSpec is the specification
2596 // configuration for a single managed bundle.
2597 type PolicyControllerBundleInstallSpec struct {
2598 // ExemptedNamespaces: the set of namespaces to be exempted from the bundle
2599 ExemptedNamespaces []string `json:"exemptedNamespaces,omitempty"`
2600 // ForceSendFields is a list of field names (e.g. "ExemptedNamespaces") to
2601 // unconditionally include in API requests. By default, fields with empty or
2602 // default values are omitted from API requests. See
2603 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2604 // details.
2605 ForceSendFields []string `json:"-"`
2606 // NullFields is a list of field names (e.g. "ExemptedNamespaces") to include
2607 // in API requests with the JSON null value. By default, fields with empty
2608 // values are omitted from API requests. See
2609 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2610 NullFields []string `json:"-"`
2611 }
2612
2613 func (s PolicyControllerBundleInstallSpec) MarshalJSON() ([]byte, error) {
2614 type NoMethod PolicyControllerBundleInstallSpec
2615 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2616 }
2617
2618 // PolicyControllerHubConfig: Configuration for Policy Controller
2619 type PolicyControllerHubConfig struct {
2620 // AuditIntervalSeconds: Sets the interval for Policy Controller Audit Scans
2621 // (in seconds). When set to 0, this disables audit functionality altogether.
2622 AuditIntervalSeconds int64 `json:"auditIntervalSeconds,omitempty,string"`
2623 // ConstraintViolationLimit: The maximum number of audit violations to be
2624 // stored in a constraint. If not set, the internal default (currently 20) will
2625 // be used.
2626 ConstraintViolationLimit int64 `json:"constraintViolationLimit,omitempty,string"`
2627 // DeploymentConfigs: Map of deployment configs to deployments
2628 // (“admission”, “audit”, “mutation”).
2629 DeploymentConfigs map[string]PolicyControllerPolicyControllerDeploymentConfig `json:"deploymentConfigs,omitempty"`
2630 // ExemptableNamespaces: The set of namespaces that are excluded from Policy
2631 // Controller checks. Namespaces do not need to currently exist on the cluster.
2632 ExemptableNamespaces []string `json:"exemptableNamespaces,omitempty"`
2633 // InstallSpec: The install_spec represents the intended state specified by the
2634 // latest request that mutated install_spec in the feature spec, not the
2635 // lifecycle state of the feature observed by the Hub feature controller that
2636 // is reported in the feature state.
2637 //
2638 // Possible values:
2639 // "INSTALL_SPEC_UNSPECIFIED" - Spec is unknown.
2640 // "INSTALL_SPEC_NOT_INSTALLED" - Request to uninstall Policy Controller.
2641 // "INSTALL_SPEC_ENABLED" - Request to install and enable Policy Controller.
2642 // "INSTALL_SPEC_SUSPENDED" - Request to suspend Policy Controller i.e. its
2643 // webhooks. If Policy Controller is not installed, it will be installed but
2644 // suspended.
2645 // "INSTALL_SPEC_DETACHED" - Request to stop all reconciliation actions by
2646 // PoCo Hub controller. This is a breakglass mechanism to stop PoCo Hub from
2647 // affecting cluster resources.
2648 InstallSpec string `json:"installSpec,omitempty"`
2649 // LogDeniesEnabled: Logs all denies and dry run failures.
2650 LogDeniesEnabled bool `json:"logDeniesEnabled,omitempty"`
2651 // Monitoring: Monitoring specifies the configuration of monitoring.
2652 Monitoring *PolicyControllerMonitoringConfig `json:"monitoring,omitempty"`
2653 // MutationEnabled: Enables the ability to mutate resources using Policy
2654 // Controller.
2655 MutationEnabled bool `json:"mutationEnabled,omitempty"`
2656 // PolicyContent: Specifies the desired policy content on the cluster
2657 PolicyContent *PolicyControllerPolicyContentSpec `json:"policyContent,omitempty"`
2658 // ReferentialRulesEnabled: Enables the ability to use Constraint Templates
2659 // that reference to objects other than the object currently being evaluated.
2660 ReferentialRulesEnabled bool `json:"referentialRulesEnabled,omitempty"`
2661 // ForceSendFields is a list of field names (e.g. "AuditIntervalSeconds") to
2662 // unconditionally include in API requests. By default, fields with empty or
2663 // default values are omitted from API requests. See
2664 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2665 // details.
2666 ForceSendFields []string `json:"-"`
2667 // NullFields is a list of field names (e.g. "AuditIntervalSeconds") to include
2668 // in API requests with the JSON null value. By default, fields with empty
2669 // values are omitted from API requests. See
2670 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2671 NullFields []string `json:"-"`
2672 }
2673
2674 func (s PolicyControllerHubConfig) MarshalJSON() ([]byte, error) {
2675 type NoMethod PolicyControllerHubConfig
2676 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2677 }
2678
2679 // PolicyControllerMonitoringConfig: MonitoringConfig specifies the backends
2680 // Policy Controller should export metrics to. For example, to specify metrics
2681 // should be exported to Cloud Monitoring and Prometheus, specify backends:
2682 // ["cloudmonitoring", "prometheus"]
2683 type PolicyControllerMonitoringConfig struct {
2684 // Backends: Specifies the list of backends Policy Controller will export to.
2685 // An empty list would effectively disable metrics export.
2686 //
2687 // Possible values:
2688 // "MONITORING_BACKEND_UNSPECIFIED" - Backend cannot be determined
2689 // "PROMETHEUS" - Prometheus backend for monitoring
2690 // "CLOUD_MONITORING" - Stackdriver/Cloud Monitoring backend for monitoring
2691 Backends []string `json:"backends,omitempty"`
2692 // ForceSendFields is a list of field names (e.g. "Backends") to
2693 // unconditionally include in API requests. By default, fields with empty or
2694 // default values are omitted from API requests. See
2695 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2696 // details.
2697 ForceSendFields []string `json:"-"`
2698 // NullFields is a list of field names (e.g. "Backends") to include in API
2699 // requests with the JSON null value. By default, fields with empty values are
2700 // omitted from API requests. See
2701 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2702 NullFields []string `json:"-"`
2703 }
2704
2705 func (s PolicyControllerMonitoringConfig) MarshalJSON() ([]byte, error) {
2706 type NoMethod PolicyControllerMonitoringConfig
2707 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2708 }
2709
2710 // PolicyControllerOnClusterState: OnClusterState represents the state of a
2711 // sub-component of Policy Controller.
2712 type PolicyControllerOnClusterState struct {
2713 // Details: Surface potential errors or information logs.
2714 Details string `json:"details,omitempty"`
2715 // State: The lifecycle state of this component.
2716 //
2717 // Possible values:
2718 // "LIFECYCLE_STATE_UNSPECIFIED" - The lifecycle state is unspecified.
2719 // "NOT_INSTALLED" - The PC does not exist on the given cluster, and no k8s
2720 // resources of any type that are associated with the PC should exist there.
2721 // The cluster does not possess a membership with the PCH.
2722 // "INSTALLING" - The PCH possesses a Membership, however the PC is not fully
2723 // installed on the cluster. In this state the hub can be expected to be taking
2724 // actions to install the PC on the cluster.
2725 // "ACTIVE" - The PC is fully installed on the cluster and in an operational
2726 // mode. In this state PCH will be reconciling state with the PC, and the PC
2727 // will be performing it's operational tasks per that software. Entering a
2728 // READY state requires that the hub has confirmed the PC is installed and its
2729 // pods are operational with the version of the PC the PCH expects.
2730 // "UPDATING" - The PC is fully installed, but in the process of changing the
2731 // configuration (including changing the version of PC either up and down, or
2732 // modifying the manifests of PC) of the resources running on the cluster. The
2733 // PCH has a Membership, is aware of the version the cluster should be running
2734 // in, but has not confirmed for itself that the PC is running with that
2735 // version.
2736 // "DECOMMISSIONING" - The PC may have resources on the cluster, but the PCH
2737 // wishes to remove the Membership. The Membership still exists.
2738 // "CLUSTER_ERROR" - The PC is not operational, and the PCH is unable to act
2739 // to make it operational. Entering a CLUSTER_ERROR state happens automatically
2740 // when the PCH determines that a PC installed on the cluster is non-operative
2741 // or that the cluster does not meet requirements set for the PCH to administer
2742 // the cluster but has nevertheless been given an instruction to do so (such as
2743 // ‘install').
2744 // "HUB_ERROR" - In this state, the PC may still be operational, and only the
2745 // PCH is unable to act. The hub should not issue instructions to change the PC
2746 // state, or otherwise interfere with the on-cluster resources. Entering a
2747 // HUB_ERROR state happens automatically when the PCH determines the hub is in
2748 // an unhealthy state and it wishes to ‘take hands off' to avoid corrupting
2749 // the PC or other data.
2750 // "SUSPENDED" - Policy Controller (PC) is installed but suspended. This
2751 // means that the policies are not enforced, but violations are still recorded
2752 // (through audit).
2753 // "DETACHED" - PoCo Hub is not taking any action to reconcile cluster
2754 // objects. Changes to those objects will not be overwritten by PoCo Hub.
2755 State string `json:"state,omitempty"`
2756 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally
2757 // include in API requests. By default, fields with empty or default values are
2758 // omitted from API requests. See
2759 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2760 // details.
2761 ForceSendFields []string `json:"-"`
2762 // NullFields is a list of field names (e.g. "Details") to include in API
2763 // requests with the JSON null value. By default, fields with empty values are
2764 // omitted from API requests. See
2765 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2766 NullFields []string `json:"-"`
2767 }
2768
2769 func (s PolicyControllerOnClusterState) MarshalJSON() ([]byte, error) {
2770 type NoMethod PolicyControllerOnClusterState
2771 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2772 }
2773
2774 // PolicyControllerPolicyContentSpec: PolicyContentSpec defines the user's
2775 // desired content configuration on the cluster.
2776 type PolicyControllerPolicyContentSpec struct {
2777 // Bundles: map of bundle name to BundleInstallSpec. The bundle name maps to
2778 // the `bundleName` key in the `policycontroller.gke.io/constraintData`
2779 // annotation on a constraint.
2780 Bundles map[string]PolicyControllerBundleInstallSpec `json:"bundles,omitempty"`
2781 // TemplateLibrary: Configures the installation of the Template Library.
2782 TemplateLibrary *PolicyControllerTemplateLibraryConfig `json:"templateLibrary,omitempty"`
2783 // ForceSendFields is a list of field names (e.g. "Bundles") to unconditionally
2784 // include in API requests. By default, fields with empty or default values are
2785 // omitted from API requests. See
2786 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2787 // details.
2788 ForceSendFields []string `json:"-"`
2789 // NullFields is a list of field names (e.g. "Bundles") to include in API
2790 // requests with the JSON null value. By default, fields with empty values are
2791 // omitted from API requests. See
2792 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2793 NullFields []string `json:"-"`
2794 }
2795
2796 func (s PolicyControllerPolicyContentSpec) MarshalJSON() ([]byte, error) {
2797 type NoMethod PolicyControllerPolicyContentSpec
2798 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2799 }
2800
2801 // PolicyControllerPolicyContentState: The state of the policy controller
2802 // policy content
2803 type PolicyControllerPolicyContentState struct {
2804 // BundleStates: The state of the any bundles included in the chosen version of
2805 // the manifest
2806 BundleStates map[string]PolicyControllerOnClusterState `json:"bundleStates,omitempty"`
2807 // ReferentialSyncConfigState: The state of the referential data sync
2808 // configuration. This could represent the state of either the syncSet
2809 // object(s) or the config object, depending on the version of PoCo configured
2810 // by the user.
2811 ReferentialSyncConfigState *PolicyControllerOnClusterState `json:"referentialSyncConfigState,omitempty"`
2812 // TemplateLibraryState: The state of the template library
2813 TemplateLibraryState *PolicyControllerOnClusterState `json:"templateLibraryState,omitempty"`
2814 // ForceSendFields is a list of field names (e.g. "BundleStates") to
2815 // unconditionally include in API requests. By default, fields with empty or
2816 // default values are omitted from API requests. See
2817 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2818 // details.
2819 ForceSendFields []string `json:"-"`
2820 // NullFields is a list of field names (e.g. "BundleStates") to include in API
2821 // requests with the JSON null value. By default, fields with empty values are
2822 // omitted from API requests. See
2823 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2824 NullFields []string `json:"-"`
2825 }
2826
2827 func (s PolicyControllerPolicyContentState) MarshalJSON() ([]byte, error) {
2828 type NoMethod PolicyControllerPolicyContentState
2829 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2830 }
2831
2832 // PolicyControllerPolicyControllerDeploymentConfig: Deployment-specific
2833 // configuration.
2834 type PolicyControllerPolicyControllerDeploymentConfig struct {
2835 // ContainerResources: Container resource requirements.
2836 ContainerResources *PolicyControllerResourceRequirements `json:"containerResources,omitempty"`
2837 // PodAffinity: Pod affinity configuration.
2838 //
2839 // Possible values:
2840 // "AFFINITY_UNSPECIFIED" - No affinity configuration has been specified.
2841 // "NO_AFFINITY" - Affinity configurations will be removed from the
2842 // deployment.
2843 // "ANTI_AFFINITY" - Anti-affinity configuration will be applied to this
2844 // deployment. Default for admissions deployment.
2845 PodAffinity string `json:"podAffinity,omitempty"`
2846 // PodAntiAffinity: Pod anti-affinity enablement. Deprecated: use
2847 // `pod_affinity` instead.
2848 PodAntiAffinity bool `json:"podAntiAffinity,omitempty"`
2849 // PodTolerations: Pod tolerations of node taints.
2850 PodTolerations []*PolicyControllerToleration `json:"podTolerations,omitempty"`
2851 // ReplicaCount: Pod replica count.
2852 ReplicaCount int64 `json:"replicaCount,omitempty,string"`
2853 // ForceSendFields is a list of field names (e.g. "ContainerResources") to
2854 // unconditionally include in API requests. By default, fields with empty or
2855 // default values are omitted from API requests. See
2856 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2857 // details.
2858 ForceSendFields []string `json:"-"`
2859 // NullFields is a list of field names (e.g. "ContainerResources") to include
2860 // in API requests with the JSON null value. By default, fields with empty
2861 // values are omitted from API requests. See
2862 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2863 NullFields []string `json:"-"`
2864 }
2865
2866 func (s PolicyControllerPolicyControllerDeploymentConfig) MarshalJSON() ([]byte, error) {
2867 type NoMethod PolicyControllerPolicyControllerDeploymentConfig
2868 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2869 }
2870
2871 // PolicyControllerResourceList: ResourceList contains container resource
2872 // requirements.
2873 type PolicyControllerResourceList struct {
2874 // Cpu: CPU requirement expressed in Kubernetes resource units.
2875 Cpu string `json:"cpu,omitempty"`
2876 // Memory: Memory requirement expressed in Kubernetes resource units.
2877 Memory string `json:"memory,omitempty"`
2878 // ForceSendFields is a list of field names (e.g. "Cpu") to unconditionally
2879 // include in API requests. By default, fields with empty or default values are
2880 // omitted from API requests. See
2881 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2882 // details.
2883 ForceSendFields []string `json:"-"`
2884 // NullFields is a list of field names (e.g. "Cpu") to include in API requests
2885 // with the JSON null value. By default, fields with empty values are omitted
2886 // from API requests. See
2887 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2888 NullFields []string `json:"-"`
2889 }
2890
2891 func (s PolicyControllerResourceList) MarshalJSON() ([]byte, error) {
2892 type NoMethod PolicyControllerResourceList
2893 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2894 }
2895
2896 // PolicyControllerResourceRequirements: ResourceRequirements describes the
2897 // compute resource requirements.
2898 type PolicyControllerResourceRequirements struct {
2899 // Limits: Limits describes the maximum amount of compute resources allowed for
2900 // use by the running container.
2901 Limits *PolicyControllerResourceList `json:"limits,omitempty"`
2902 // Requests: Requests describes the amount of compute resources reserved for
2903 // the container by the kube-scheduler.
2904 Requests *PolicyControllerResourceList `json:"requests,omitempty"`
2905 // ForceSendFields is a list of field names (e.g. "Limits") to unconditionally
2906 // include in API requests. By default, fields with empty or default values are
2907 // omitted from API requests. See
2908 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2909 // details.
2910 ForceSendFields []string `json:"-"`
2911 // NullFields is a list of field names (e.g. "Limits") to include in API
2912 // requests with the JSON null value. By default, fields with empty values are
2913 // omitted from API requests. See
2914 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2915 NullFields []string `json:"-"`
2916 }
2917
2918 func (s PolicyControllerResourceRequirements) MarshalJSON() ([]byte, error) {
2919 type NoMethod PolicyControllerResourceRequirements
2920 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2921 }
2922
2923 // PolicyControllerSpec: **Policy Controller**: Configuration for a single
2924 // cluster. Intended to parallel the PolicyController CR.
2925 type PolicyControllerSpec struct {
2926 // PolicyControllerHubConfig: Policy Controller configuration for the cluster.
2927 PolicyControllerHubConfig *PolicyControllerHubConfig `json:"policyControllerHubConfig,omitempty"`
2928 // Version: Version of Policy Controller installed.
2929 Version string `json:"version,omitempty"`
2930 // ForceSendFields is a list of field names (e.g. "PolicyControllerHubConfig")
2931 // to unconditionally include in API requests. By default, fields with empty or
2932 // default values are omitted from API requests. See
2933 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2934 // details.
2935 ForceSendFields []string `json:"-"`
2936 // NullFields is a list of field names (e.g. "PolicyControllerHubConfig") to
2937 // include in API requests with the JSON null value. By default, fields with
2938 // empty values are omitted from API requests. See
2939 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2940 NullFields []string `json:"-"`
2941 }
2942
2943 func (s PolicyControllerSpec) MarshalJSON() ([]byte, error) {
2944 type NoMethod PolicyControllerSpec
2945 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2946 }
2947
2948 // PolicyControllerState: **Policy Controller**: State for a single cluster.
2949 type PolicyControllerState struct {
2950 // ComponentStates: Currently these include (also serving as map keys): 1.
2951 // "admission" 2. "audit" 3. "mutation"
2952 ComponentStates map[string]PolicyControllerOnClusterState `json:"componentStates,omitempty"`
2953 // PolicyContentState: The overall content state observed by the Hub Feature
2954 // controller.
2955 PolicyContentState *PolicyControllerPolicyContentState `json:"policyContentState,omitempty"`
2956 // State: The overall Policy Controller lifecycle state observed by the Hub
2957 // Feature controller.
2958 //
2959 // Possible values:
2960 // "LIFECYCLE_STATE_UNSPECIFIED" - The lifecycle state is unspecified.
2961 // "NOT_INSTALLED" - The PC does not exist on the given cluster, and no k8s
2962 // resources of any type that are associated with the PC should exist there.
2963 // The cluster does not possess a membership with the PCH.
2964 // "INSTALLING" - The PCH possesses a Membership, however the PC is not fully
2965 // installed on the cluster. In this state the hub can be expected to be taking
2966 // actions to install the PC on the cluster.
2967 // "ACTIVE" - The PC is fully installed on the cluster and in an operational
2968 // mode. In this state PCH will be reconciling state with the PC, and the PC
2969 // will be performing it's operational tasks per that software. Entering a
2970 // READY state requires that the hub has confirmed the PC is installed and its
2971 // pods are operational with the version of the PC the PCH expects.
2972 // "UPDATING" - The PC is fully installed, but in the process of changing the
2973 // configuration (including changing the version of PC either up and down, or
2974 // modifying the manifests of PC) of the resources running on the cluster. The
2975 // PCH has a Membership, is aware of the version the cluster should be running
2976 // in, but has not confirmed for itself that the PC is running with that
2977 // version.
2978 // "DECOMMISSIONING" - The PC may have resources on the cluster, but the PCH
2979 // wishes to remove the Membership. The Membership still exists.
2980 // "CLUSTER_ERROR" - The PC is not operational, and the PCH is unable to act
2981 // to make it operational. Entering a CLUSTER_ERROR state happens automatically
2982 // when the PCH determines that a PC installed on the cluster is non-operative
2983 // or that the cluster does not meet requirements set for the PCH to administer
2984 // the cluster but has nevertheless been given an instruction to do so (such as
2985 // ‘install').
2986 // "HUB_ERROR" - In this state, the PC may still be operational, and only the
2987 // PCH is unable to act. The hub should not issue instructions to change the PC
2988 // state, or otherwise interfere with the on-cluster resources. Entering a
2989 // HUB_ERROR state happens automatically when the PCH determines the hub is in
2990 // an unhealthy state and it wishes to ‘take hands off' to avoid corrupting
2991 // the PC or other data.
2992 // "SUSPENDED" - Policy Controller (PC) is installed but suspended. This
2993 // means that the policies are not enforced, but violations are still recorded
2994 // (through audit).
2995 // "DETACHED" - PoCo Hub is not taking any action to reconcile cluster
2996 // objects. Changes to those objects will not be overwritten by PoCo Hub.
2997 State string `json:"state,omitempty"`
2998 // ForceSendFields is a list of field names (e.g. "ComponentStates") to
2999 // unconditionally include in API requests. By default, fields with empty or
3000 // default values are omitted from API requests. See
3001 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3002 // details.
3003 ForceSendFields []string `json:"-"`
3004 // NullFields is a list of field names (e.g. "ComponentStates") to include in
3005 // API requests with the JSON null value. By default, fields with empty values
3006 // are omitted from API requests. See
3007 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3008 NullFields []string `json:"-"`
3009 }
3010
3011 func (s PolicyControllerState) MarshalJSON() ([]byte, error) {
3012 type NoMethod PolicyControllerState
3013 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3014 }
3015
3016 // PolicyControllerTemplateLibraryConfig: The config specifying which default
3017 // library templates to install.
3018 type PolicyControllerTemplateLibraryConfig struct {
3019 // Installation: Configures the manner in which the template library is
3020 // installed on the cluster.
3021 //
3022 // Possible values:
3023 // "INSTALLATION_UNSPECIFIED" - No installation strategy has been specified.
3024 // "NOT_INSTALLED" - Do not install the template library.
3025 // "ALL" - Install the entire template library.
3026 Installation string `json:"installation,omitempty"`
3027 // ForceSendFields is a list of field names (e.g. "Installation") to
3028 // unconditionally include in API requests. By default, fields with empty or
3029 // default values are omitted from API requests. See
3030 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3031 // details.
3032 ForceSendFields []string `json:"-"`
3033 // NullFields is a list of field names (e.g. "Installation") to include in API
3034 // requests with the JSON null value. By default, fields with empty values are
3035 // omitted from API requests. See
3036 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3037 NullFields []string `json:"-"`
3038 }
3039
3040 func (s PolicyControllerTemplateLibraryConfig) MarshalJSON() ([]byte, error) {
3041 type NoMethod PolicyControllerTemplateLibraryConfig
3042 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3043 }
3044
3045 // PolicyControllerToleration: Toleration of a node taint.
3046 type PolicyControllerToleration struct {
3047 // Effect: Matches a taint effect.
3048 Effect string `json:"effect,omitempty"`
3049 // Key: Matches a taint key (not necessarily unique).
3050 Key string `json:"key,omitempty"`
3051 // Operator: Matches a taint operator.
3052 Operator string `json:"operator,omitempty"`
3053 // Value: Matches a taint value.
3054 Value string `json:"value,omitempty"`
3055 // ForceSendFields is a list of field names (e.g. "Effect") to unconditionally
3056 // include in API requests. By default, fields with empty or default values are
3057 // omitted from API requests. See
3058 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3059 // details.
3060 ForceSendFields []string `json:"-"`
3061 // NullFields is a list of field names (e.g. "Effect") to include in API
3062 // requests with the JSON null value. By default, fields with empty values are
3063 // omitted from API requests. See
3064 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3065 NullFields []string `json:"-"`
3066 }
3067
3068 func (s PolicyControllerToleration) MarshalJSON() ([]byte, error) {
3069 type NoMethod PolicyControllerToleration
3070 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3071 }
3072
3073 // RBACRoleBindingActuationRBACRoleBindingState: RBACRoleBindingState is the
3074 // status of an RBACRoleBinding which exists on a membership.
3075 type RBACRoleBindingActuationRBACRoleBindingState struct {
3076 // Description: The reason for the failure.
3077 Description string `json:"description,omitempty"`
3078 // State: Output only. The state of the RBACRoleBinding.
3079 //
3080 // Possible values:
3081 // "ROLE_BINDING_STATE_UNSPECIFIED" - Unspecified state.
3082 // "OK" - RBACRoleBinding is created properly on the cluster.
3083 // "CUSTOM_ROLE_MISSING_FROM_CLUSTER" - The RBACRoleBinding was created on
3084 // the cluster but the specified custom role does not exist on the cluster,
3085 // hence the RBACRoleBinding has no effect.
3086 State string `json:"state,omitempty"`
3087 // UpdateTime: The time the RBACRoleBinding status was last updated.
3088 UpdateTime string `json:"updateTime,omitempty"`
3089 // ForceSendFields is a list of field names (e.g. "Description") to
3090 // unconditionally include in API requests. By default, fields with empty or
3091 // default values are omitted from API requests. See
3092 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3093 // details.
3094 ForceSendFields []string `json:"-"`
3095 // NullFields is a list of field names (e.g. "Description") to include in API
3096 // requests with the JSON null value. By default, fields with empty values are
3097 // omitted from API requests. See
3098 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3099 NullFields []string `json:"-"`
3100 }
3101
3102 func (s RBACRoleBindingActuationRBACRoleBindingState) MarshalJSON() ([]byte, error) {
3103 type NoMethod RBACRoleBindingActuationRBACRoleBindingState
3104 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3105 }
3106
3107 // RBACRoleBindingActuationSpec: **RBAC RoleBinding Actuation**: The
3108 // membership-specific input for RBACRoleBindingActuation feature.
3109 type RBACRoleBindingActuationSpec struct {
3110 }
3111
3112 // RBACRoleBindingActuationState: **RBAC RoleBinding Actuation**: A
3113 // membership-specific Feature state for the RBACRoleBindingActuation fleet
3114 // feature.
3115 type RBACRoleBindingActuationState struct {
3116 // RbacrolebindingStates: Output only. The state of RBACRoleBindings using
3117 // custom roles that exist on the cluster, keyed by RBACRoleBinding resource
3118 // name with format:
3119 // projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbac
3120 // rolebinding}.
3121 RbacrolebindingStates map[string]RBACRoleBindingActuationRBACRoleBindingState `json:"rbacrolebindingStates,omitempty"`
3122 // ForceSendFields is a list of field names (e.g. "RbacrolebindingStates") to
3123 // unconditionally include in API requests. By default, fields with empty or
3124 // default values are omitted from API requests. See
3125 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3126 // details.
3127 ForceSendFields []string `json:"-"`
3128 // NullFields is a list of field names (e.g. "RbacrolebindingStates") to
3129 // include in API requests with the JSON null value. By default, fields with
3130 // empty values are omitted from API requests. See
3131 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3132 NullFields []string `json:"-"`
3133 }
3134
3135 func (s RBACRoleBindingActuationState) MarshalJSON() ([]byte, error) {
3136 type NoMethod RBACRoleBindingActuationState
3137 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3138 }
3139
3140 // ServiceMeshAnalysisMessage: AnalysisMessage is a single message produced by
3141 // an analyzer, and it used to communicate to the end user about the state of
3142 // their Service Mesh configuration.
3143 type ServiceMeshAnalysisMessage struct {
3144 // Args: A UI can combine these args with a template (based on
3145 // message_base.type) to produce an internationalized message.
3146 Args googleapi.RawMessage `json:"args,omitempty"`
3147 // Description: A human readable description of what the error means. It is
3148 // suitable for non-internationalize display purposes.
3149 Description string `json:"description,omitempty"`
3150 // MessageBase: Details common to all types of Istio and ServiceMesh analysis
3151 // messages.
3152 MessageBase *ServiceMeshAnalysisMessageBase `json:"messageBase,omitempty"`
3153 // ResourcePaths: A list of strings specifying the resource identifiers that
3154 // were the cause of message generation. A "path" here may be: * MEMBERSHIP_ID
3155 // if the cause is a specific member cluster *
3156 // MEMBERSHIP_ID/(NAMESPACE\/)?RESOURCETYPE/NAME if the cause is a resource in
3157 // a cluster
3158 ResourcePaths []string `json:"resourcePaths,omitempty"`
3159 // ForceSendFields is a list of field names (e.g. "Args") to unconditionally
3160 // include in API requests. By default, fields with empty or default values are
3161 // omitted from API requests. See
3162 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3163 // details.
3164 ForceSendFields []string `json:"-"`
3165 // NullFields is a list of field names (e.g. "Args") to include in API requests
3166 // with the JSON null value. By default, fields with empty values are omitted
3167 // from API requests. See
3168 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3169 NullFields []string `json:"-"`
3170 }
3171
3172 func (s ServiceMeshAnalysisMessage) MarshalJSON() ([]byte, error) {
3173 type NoMethod ServiceMeshAnalysisMessage
3174 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3175 }
3176
3177 // ServiceMeshAnalysisMessageBase: AnalysisMessageBase describes some common
3178 // information that is needed for all messages.
3179 type ServiceMeshAnalysisMessageBase struct {
3180 // DocumentationUrl: A url pointing to the Service Mesh or Istio documentation
3181 // for this specific error type.
3182 DocumentationUrl string `json:"documentationUrl,omitempty"`
3183 // Level: Represents how severe a message is.
3184 //
3185 // Possible values:
3186 // "LEVEL_UNSPECIFIED" - Illegal. Same
3187 // istio.analysis.v1alpha1.AnalysisMessageBase.Level.UNKNOWN.
3188 // "ERROR" - ERROR represents a misconfiguration that must be fixed.
3189 // "WARNING" - WARNING represents a misconfiguration that should be fixed.
3190 // "INFO" - INFO represents an informational finding.
3191 Level string `json:"level,omitempty"`
3192 // Type: Represents the specific type of a message.
3193 Type *ServiceMeshType `json:"type,omitempty"`
3194 // ForceSendFields is a list of field names (e.g. "DocumentationUrl") to
3195 // unconditionally include in API requests. By default, fields with empty or
3196 // default values are omitted from API requests. See
3197 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3198 // details.
3199 ForceSendFields []string `json:"-"`
3200 // NullFields is a list of field names (e.g. "DocumentationUrl") to include in
3201 // API requests with the JSON null value. By default, fields with empty values
3202 // are omitted from API requests. See
3203 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3204 NullFields []string `json:"-"`
3205 }
3206
3207 func (s ServiceMeshAnalysisMessageBase) MarshalJSON() ([]byte, error) {
3208 type NoMethod ServiceMeshAnalysisMessageBase
3209 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3210 }
3211
3212 // ServiceMeshCondition: Condition being reported.
3213 type ServiceMeshCondition struct {
3214 // Code: Unique identifier of the condition which describes the condition
3215 // recognizable to the user.
3216 //
3217 // Possible values:
3218 // "CODE_UNSPECIFIED" - Default Unspecified code
3219 // "MESH_IAM_PERMISSION_DENIED" - Mesh IAM permission denied error code
3220 // "MESH_IAM_CROSS_PROJECT_PERMISSION_DENIED" - Permission denied error code
3221 // for cross-project
3222 // "CNI_CONFIG_UNSUPPORTED" - CNI config unsupported error code
3223 // "GKE_SANDBOX_UNSUPPORTED" - GKE sandbox unsupported error code
3224 // "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED" - Nodepool workload
3225 // identity federation required error code
3226 // "CNI_INSTALLATION_FAILED" - CNI installation failed error code
3227 // "CNI_POD_UNSCHEDULABLE" - CNI pod unschedulable error code
3228 // "CLUSTER_HAS_ZERO_NODES" - Cluster has zero node code
3229 // "CANONICAL_SERVICE_ERROR" - Failure to reconcile CanonicalServices
3230 // "UNSUPPORTED_MULTIPLE_CONTROL_PLANES" - Multiple control planes
3231 // unsupported error code
3232 // "VPCSC_GA_SUPPORTED" - VPC-SC GA is supported for this control plane.
3233 // "DEPRECATED_SPEC_CONTROL_PLANE_MANAGEMENT" - User is using deprecated
3234 // ControlPlaneManagement and they have not yet set Management.
3235 // "DEPRECATED_SPEC_CONTROL_PLANE_MANAGEMENT_SAFE" - User is using deprecated
3236 // ControlPlaneManagement and they have already set Management.
3237 // "CONFIG_APPLY_INTERNAL_ERROR" - Configuration (Istio/k8s resources) failed
3238 // to apply due to internal error.
3239 // "CONFIG_VALIDATION_ERROR" - Configuration failed to be applied due to
3240 // being invalid.
3241 // "CONFIG_VALIDATION_WARNING" - Encountered configuration(s) with possible
3242 // unintended behavior or invalid configuration. These configs may not have
3243 // been applied.
3244 // "QUOTA_EXCEEDED_BACKEND_SERVICES" - BackendService quota exceeded error
3245 // code.
3246 // "QUOTA_EXCEEDED_HEALTH_CHECKS" - HealthCheck quota exceeded error code.
3247 // "QUOTA_EXCEEDED_HTTP_ROUTES" - HTTPRoute quota exceeded error code.
3248 // "QUOTA_EXCEEDED_TCP_ROUTES" - TCPRoute quota exceeded error code.
3249 // "QUOTA_EXCEEDED_TLS_ROUTES" - TLS routes quota exceeded error code.
3250 // "QUOTA_EXCEEDED_TRAFFIC_POLICIES" - TrafficPolicy quota exceeded error
3251 // code.
3252 // "QUOTA_EXCEEDED_ENDPOINT_POLICIES" - EndpointPolicy quota exceeded error
3253 // code.
3254 // "QUOTA_EXCEEDED_GATEWAYS" - Gateway quota exceeded error code.
3255 // "QUOTA_EXCEEDED_MESHES" - Mesh quota exceeded error code.
3256 // "QUOTA_EXCEEDED_SERVER_TLS_POLICIES" - ServerTLSPolicy quota exceeded
3257 // error code.
3258 // "QUOTA_EXCEEDED_CLIENT_TLS_POLICIES" - ClientTLSPolicy quota exceeded
3259 // error code.
3260 // "QUOTA_EXCEEDED_SERVICE_LB_POLICIES" - ServiceLBPolicy quota exceeded
3261 // error code.
3262 // "QUOTA_EXCEEDED_HTTP_FILTERS" - HTTPFilter quota exceeded error code.
3263 // "QUOTA_EXCEEDED_TCP_FILTERS" - TCPFilter quota exceeded error code.
3264 // "QUOTA_EXCEEDED_NETWORK_ENDPOINT_GROUPS" - NetworkEndpointGroup quota
3265 // exceeded error code.
3266 // "CONFIG_APPLY_BLOCKED" - Configuration failed to apply due to fleet being
3267 // blocked.
3268 // "LEGACY_MC_SECRETS" - Legacy istio secrets found for multicluster error
3269 // code
3270 // "WORKLOAD_IDENTITY_REQUIRED" - Workload identity required error code
3271 // "NON_STANDARD_BINARY_USAGE" - Non-standard binary usage error code
3272 // "UNSUPPORTED_GATEWAY_CLASS" - Unsupported gateway class error code
3273 // "MANAGED_CNI_NOT_ENABLED" - Managed CNI not enabled error code
3274 // "MODERNIZATION_SCHEDULED" - Modernization is scheduled for a cluster.
3275 // "MODERNIZATION_IN_PROGRESS" - Modernization is in progress for a cluster.
3276 // "MODERNIZATION_COMPLETED" - Modernization is completed for a cluster.
3277 // "MODERNIZATION_ABORTED" - Modernization is aborted for a cluster.
3278 // "MODERNIZATION_PREPARING" - Preparing cluster so that its workloads can be
3279 // migrated.
3280 // "MODERNIZATION_STALLED" - Modernization is stalled for a cluster.
3281 // "MODERNIZATION_PREPARED" - Cluster has been prepared for its workloads to
3282 // be migrated.
3283 // "MODERNIZATION_MIGRATING_WORKLOADS" - Migrating the cluster's workloads to
3284 // the new implementation.
3285 // "MODERNIZATION_ROLLING_BACK_CLUSTER" - Rollback is in progress for
3286 // modernization of a cluster.
3287 // "MODERNIZATION_WILL_BE_SCHEDULED" - Modernization will be scheduled for a
3288 // fleet.
3289 // "MODERNIZATION_MANUAL" - Fleet is opted out from automated modernization.
3290 // "MODERNIZATION_ELIGIBLE" - Fleet is eligible for modernization.
3291 // "MODERNIZATION_MODERNIZING" - Modernization of one or more clusters in a
3292 // fleet is in progress.
3293 // "MODERNIZATION_MODERNIZED_SOAKING" - Modernization of all the fleet's
3294 // clusters is complete. Soaking before finalizing the modernization.
3295 // "MODERNIZATION_FINALIZED" - Modernization is finalized for all clusters in
3296 // a fleet. Rollback is no longer allowed.
3297 // "MODERNIZATION_ROLLING_BACK_FLEET" - Rollback is in progress for
3298 // modernization of all clusters in a fleet.
3299 Code string `json:"code,omitempty"`
3300 // Details: A short summary about the issue.
3301 Details string `json:"details,omitempty"`
3302 // DocumentationLink: Links contains actionable information.
3303 DocumentationLink string `json:"documentationLink,omitempty"`
3304 // Severity: Severity level of the condition.
3305 //
3306 // Possible values:
3307 // "SEVERITY_UNSPECIFIED" - Unspecified severity
3308 // "ERROR" - Indicates an issue that prevents the mesh from operating
3309 // correctly
3310 // "WARNING" - Indicates a setting is likely wrong, but the mesh is still
3311 // able to operate
3312 // "INFO" - An informational message, not requiring any action
3313 Severity string `json:"severity,omitempty"`
3314 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
3315 // include in API requests. By default, fields with empty or default values are
3316 // omitted from API requests. See
3317 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3318 // details.
3319 ForceSendFields []string `json:"-"`
3320 // NullFields is a list of field names (e.g. "Code") to include in API requests
3321 // with the JSON null value. By default, fields with empty values are omitted
3322 // from API requests. See
3323 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3324 NullFields []string `json:"-"`
3325 }
3326
3327 func (s ServiceMeshCondition) MarshalJSON() ([]byte, error) {
3328 type NoMethod ServiceMeshCondition
3329 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3330 }
3331
3332 // ServiceMeshControlPlaneManagement: Status of control plane management.
3333 type ServiceMeshControlPlaneManagement struct {
3334 // Details: Explanation of state.
3335 Details []*ServiceMeshStatusDetails `json:"details,omitempty"`
3336 // Implementation: Output only. Implementation of managed control plane.
3337 //
3338 // Possible values:
3339 // "IMPLEMENTATION_UNSPECIFIED" - Unspecified
3340 // "ISTIOD" - A Google build of istiod is used for the managed control plane.
3341 // "TRAFFIC_DIRECTOR" - Traffic director is used for the managed control
3342 // plane.
3343 // "UPDATING" - The control plane implementation is being updated.
3344 Implementation string `json:"implementation,omitempty"`
3345 // State: LifecycleState of control plane management.
3346 //
3347 // Possible values:
3348 // "LIFECYCLE_STATE_UNSPECIFIED" - Unspecified
3349 // "DISABLED" - DISABLED means that the component is not enabled.
3350 // "FAILED_PRECONDITION" - FAILED_PRECONDITION means that provisioning cannot
3351 // proceed because of some characteristic of the member cluster.
3352 // "PROVISIONING" - PROVISIONING means that provisioning is in progress.
3353 // "ACTIVE" - ACTIVE means that the component is ready for use.
3354 // "STALLED" - STALLED means that provisioning could not be done.
3355 // "NEEDS_ATTENTION" - NEEDS_ATTENTION means that the component is ready, but
3356 // some user intervention is required. (For example that the user should
3357 // migrate workloads to a new control plane revision.)
3358 // "DEGRADED" - DEGRADED means that the component is ready, but operating in
3359 // a degraded state.
3360 // "DEPROVISIONING" - DEPROVISIONING means that deprovisioning is in
3361 // progress.
3362 State string `json:"state,omitempty"`
3363 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally
3364 // include in API requests. By default, fields with empty or default values are
3365 // omitted from API requests. See
3366 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3367 // details.
3368 ForceSendFields []string `json:"-"`
3369 // NullFields is a list of field names (e.g. "Details") to include in API
3370 // requests with the JSON null value. By default, fields with empty values are
3371 // omitted from API requests. See
3372 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3373 NullFields []string `json:"-"`
3374 }
3375
3376 func (s ServiceMeshControlPlaneManagement) MarshalJSON() ([]byte, error) {
3377 type NoMethod ServiceMeshControlPlaneManagement
3378 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3379 }
3380
3381 // ServiceMeshDataPlaneManagement: Status of data plane management. Only
3382 // reported per-member.
3383 type ServiceMeshDataPlaneManagement struct {
3384 // Details: Explanation of the status.
3385 Details []*ServiceMeshStatusDetails `json:"details,omitempty"`
3386 // State: Lifecycle status of data plane management.
3387 //
3388 // Possible values:
3389 // "LIFECYCLE_STATE_UNSPECIFIED" - Unspecified
3390 // "DISABLED" - DISABLED means that the component is not enabled.
3391 // "FAILED_PRECONDITION" - FAILED_PRECONDITION means that provisioning cannot
3392 // proceed because of some characteristic of the member cluster.
3393 // "PROVISIONING" - PROVISIONING means that provisioning is in progress.
3394 // "ACTIVE" - ACTIVE means that the component is ready for use.
3395 // "STALLED" - STALLED means that provisioning could not be done.
3396 // "NEEDS_ATTENTION" - NEEDS_ATTENTION means that the component is ready, but
3397 // some user intervention is required. (For example that the user should
3398 // migrate workloads to a new control plane revision.)
3399 // "DEGRADED" - DEGRADED means that the component is ready, but operating in
3400 // a degraded state.
3401 // "DEPROVISIONING" - DEPROVISIONING means that deprovisioning is in
3402 // progress.
3403 State string `json:"state,omitempty"`
3404 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally
3405 // include in API requests. By default, fields with empty or default values are
3406 // omitted from API requests. See
3407 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3408 // details.
3409 ForceSendFields []string `json:"-"`
3410 // NullFields is a list of field names (e.g. "Details") to include in API
3411 // requests with the JSON null value. By default, fields with empty values are
3412 // omitted from API requests. See
3413 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3414 NullFields []string `json:"-"`
3415 }
3416
3417 func (s ServiceMeshDataPlaneManagement) MarshalJSON() ([]byte, error) {
3418 type NoMethod ServiceMeshDataPlaneManagement
3419 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3420 }
3421
3422 // ServiceMeshSpec: **Service Mesh**: Spec for a single Membership for the
3423 // servicemesh feature
3424 type ServiceMeshSpec struct {
3425 // ConfigApi: Optional. Specifies the API that will be used for configuring the
3426 // mesh workloads.
3427 //
3428 // Possible values:
3429 // "CONFIG_API_UNSPECIFIED" - Unspecified
3430 // "CONFIG_API_ISTIO" - Use the Istio API for configuration.
3431 // "CONFIG_API_GATEWAY" - Use the K8s Gateway API for configuration.
3432 ConfigApi string `json:"configApi,omitempty"`
3433 // ControlPlane: Deprecated: use `management` instead Enables automatic control
3434 // plane management.
3435 //
3436 // Possible values:
3437 // "CONTROL_PLANE_MANAGEMENT_UNSPECIFIED" - Unspecified
3438 // "AUTOMATIC" - Google should provision a control plane revision and make it
3439 // available in the cluster. Google will enroll this revision in a release
3440 // channel and keep it up to date. The control plane revision may be a managed
3441 // service, or a managed install.
3442 // "MANUAL" - User will manually configure the control plane (e.g. via CLI,
3443 // or via the ControlPlaneRevision KRM API)
3444 ControlPlane string `json:"controlPlane,omitempty"`
3445 // DefaultChannel: Determines which release channel to use for default
3446 // injection and service mesh APIs.
3447 //
3448 // Possible values:
3449 // "CHANNEL_UNSPECIFIED" - Unspecified
3450 // "RAPID" - RAPID channel is offered on an early access basis for customers
3451 // who want to test new releases.
3452 // "REGULAR" - REGULAR channel is intended for production users who want to
3453 // take advantage of new features.
3454 // "STABLE" - STABLE channel includes versions that are known to be stable
3455 // and reliable in production.
3456 DefaultChannel string `json:"defaultChannel,omitempty"`
3457 // Management: Optional. Enables automatic Service Mesh management.
3458 //
3459 // Possible values:
3460 // "MANAGEMENT_UNSPECIFIED" - Unspecified.
3461 // "MANAGEMENT_AUTOMATIC" - Google should manage my Service Mesh for the
3462 // cluster.
3463 // "MANAGEMENT_MANUAL" - User will manually configure their service mesh
3464 // components.
3465 // "MANAGEMENT_NOT_INSTALLED" - Google should remove any managed Service Mesh
3466 // components from this cluster and deprovision any resources.
3467 Management string `json:"management,omitempty"`
3468 // ForceSendFields is a list of field names (e.g. "ConfigApi") to
3469 // unconditionally include in API requests. By default, fields with empty or
3470 // default values are omitted from API requests. See
3471 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3472 // details.
3473 ForceSendFields []string `json:"-"`
3474 // NullFields is a list of field names (e.g. "ConfigApi") to include in API
3475 // requests with the JSON null value. By default, fields with empty values are
3476 // omitted from API requests. See
3477 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3478 NullFields []string `json:"-"`
3479 }
3480
3481 func (s ServiceMeshSpec) MarshalJSON() ([]byte, error) {
3482 type NoMethod ServiceMeshSpec
3483 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3484 }
3485
3486 // ServiceMeshState: **Service Mesh**: State for a single Membership, as
3487 // analyzed by the Service Mesh Hub Controller.
3488 type ServiceMeshState struct {
3489 // AnalysisMessages: Output only. Results of running Service Mesh analyzers.
3490 AnalysisMessages []*ServiceMeshAnalysisMessage `json:"analysisMessages,omitempty"`
3491 // Conditions: Output only. List of conditions reported for this membership.
3492 Conditions []*ServiceMeshCondition `json:"conditions,omitempty"`
3493 // ConfigApiVersion: The API version (i.e. Istio CRD version) for configuring
3494 // service mesh in this cluster. This version is influenced by the
3495 // `default_channel` field.
3496 ConfigApiVersion string `json:"configApiVersion,omitempty"`
3497 // ControlPlaneManagement: Output only. Status of control plane management
3498 ControlPlaneManagement *ServiceMeshControlPlaneManagement `json:"controlPlaneManagement,omitempty"`
3499 // DataPlaneManagement: Output only. Status of data plane management.
3500 DataPlaneManagement *ServiceMeshDataPlaneManagement `json:"dataPlaneManagement,omitempty"`
3501 // ForceSendFields is a list of field names (e.g. "AnalysisMessages") to
3502 // unconditionally include in API requests. By default, fields with empty or
3503 // default values are omitted from API requests. See
3504 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3505 // details.
3506 ForceSendFields []string `json:"-"`
3507 // NullFields is a list of field names (e.g. "AnalysisMessages") to include in
3508 // API requests with the JSON null value. By default, fields with empty values
3509 // are omitted from API requests. See
3510 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3511 NullFields []string `json:"-"`
3512 }
3513
3514 func (s ServiceMeshState) MarshalJSON() ([]byte, error) {
3515 type NoMethod ServiceMeshState
3516 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3517 }
3518
3519 // ServiceMeshStatusDetails: Structured and human-readable details for a
3520 // status.
3521 type ServiceMeshStatusDetails struct {
3522 // Code: A machine-readable code that further describes a broad status.
3523 Code string `json:"code,omitempty"`
3524 // Details: Human-readable explanation of code.
3525 Details string `json:"details,omitempty"`
3526 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
3527 // include in API requests. By default, fields with empty or default values are
3528 // omitted from API requests. See
3529 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3530 // details.
3531 ForceSendFields []string `json:"-"`
3532 // NullFields is a list of field names (e.g. "Code") to include in API requests
3533 // with the JSON null value. By default, fields with empty values are omitted
3534 // from API requests. See
3535 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3536 NullFields []string `json:"-"`
3537 }
3538
3539 func (s ServiceMeshStatusDetails) MarshalJSON() ([]byte, error) {
3540 type NoMethod ServiceMeshStatusDetails
3541 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3542 }
3543
3544 // ServiceMeshType: A unique identifier for the type of message. Display_name
3545 // is intended to be human-readable, code is intended to be machine readable.
3546 // There should be a one-to-one mapping between display_name and code. (i.e. do
3547 // not re-use display_names or codes between message types.) See
3548 // istio.analysis.v1alpha1.AnalysisMessageBase.Type
3549 type ServiceMeshType struct {
3550 // Code: A 7 character code matching `^IST[0-9]{4}$` or `^ASM[0-9]{4}$`,
3551 // intended to uniquely identify the message type. (e.g. "IST0001" is mapped to
3552 // the "InternalError" message type.)
3553 Code string `json:"code,omitempty"`
3554 // DisplayName: A human-readable name for the message type. e.g.
3555 // "InternalError", "PodMissingProxy". This should be the same for all messages
3556 // of the same type. (This corresponds to the `name` field in open-source
3557 // Istio.)
3558 DisplayName string `json:"displayName,omitempty"`
3559 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
3560 // include in API requests. By default, fields with empty or default values are
3561 // omitted from API requests. See
3562 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3563 // details.
3564 ForceSendFields []string `json:"-"`
3565 // NullFields is a list of field names (e.g. "Code") to include in API requests
3566 // with the JSON null value. By default, fields with empty values are omitted
3567 // from API requests. See
3568 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3569 NullFields []string `json:"-"`
3570 }
3571
3572 func (s ServiceMeshType) MarshalJSON() ([]byte, error) {
3573 type NoMethod ServiceMeshType
3574 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3575 }
3576
3577 // State: High-level state of a MembershipFeature.
3578 type State struct {
3579 // Code: The high-level, machine-readable status of this MembershipFeature.
3580 //
3581 // Possible values:
3582 // "CODE_UNSPECIFIED" - Unknown or not set.
3583 // "OK" - The MembershipFeature is operating normally.
3584 // "WARNING" - The MembershipFeature has encountered an issue, and is
3585 // operating in a degraded state. The MembershipFeature may need intervention
3586 // to return to normal operation. See the description and any associated
3587 // MembershipFeature-specific details for more information.
3588 // "ERROR" - The MembershipFeature is not operating or is in a severely
3589 // degraded state. The MembershipFeature may need intervention to return to
3590 // normal operation. See the description and any associated
3591 // MembershipFeature-specific details for more information.
3592 Code string `json:"code,omitempty"`
3593 // Description: A human-readable description of the current status.
3594 Description string `json:"description,omitempty"`
3595 // UpdateTime: The time this status and any related Feature-specific details
3596 // were updated.
3597 UpdateTime string `json:"updateTime,omitempty"`
3598 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
3599 // include in API requests. By default, fields with empty or default values are
3600 // omitted from API requests. See
3601 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3602 // details.
3603 ForceSendFields []string `json:"-"`
3604 // NullFields is a list of field names (e.g. "Code") to include in API requests
3605 // with the JSON null value. By default, fields with empty values are omitted
3606 // from API requests. See
3607 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3608 NullFields []string `json:"-"`
3609 }
3610
3611 func (s State) MarshalJSON() ([]byte, error) {
3612 type NoMethod State
3613 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3614 }
3615
3616 // WorkloadCertificateSpec: **WorkloadCertificate**: The membership-specific
3617 // input for WorkloadCertificate feature.
3618 type WorkloadCertificateSpec struct {
3619 // CertificateManagement: CertificateManagement specifies workload certificate
3620 // management.
3621 //
3622 // Possible values:
3623 // "CERTIFICATE_MANAGEMENT_UNSPECIFIED" - Disable workload certificate
3624 // feature.
3625 // "DISABLED" - Disable workload certificate feature.
3626 // "ENABLED" - Enable workload certificate feature.
3627 CertificateManagement string `json:"certificateManagement,omitempty"`
3628 // ForceSendFields is a list of field names (e.g. "CertificateManagement") to
3629 // unconditionally include in API requests. By default, fields with empty or
3630 // default values are omitted from API requests. See
3631 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3632 // details.
3633 ForceSendFields []string `json:"-"`
3634 // NullFields is a list of field names (e.g. "CertificateManagement") to
3635 // include in API requests with the JSON null value. By default, fields with
3636 // empty values are omitted from API requests. See
3637 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3638 NullFields []string `json:"-"`
3639 }
3640
3641 func (s WorkloadCertificateSpec) MarshalJSON() ([]byte, error) {
3642 type NoMethod WorkloadCertificateSpec
3643 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3644 }
3645
3646 // WorkloadIdentityIdentityProviderStateDetail: IdentityProviderStateDetail
3647 // represents the state of an Identity Provider.
3648 type WorkloadIdentityIdentityProviderStateDetail struct {
3649 // Code: The state of the Identity Provider.
3650 //
3651 // Possible values:
3652 // "IDENTITY_PROVIDER_STATE_UNSPECIFIED" - Unknown state.
3653 // "IDENTITY_PROVIDER_STATE_OK" - The Identity Provider was created/updated
3654 // successfully.
3655 // "IDENTITY_PROVIDER_STATE_ERROR" - The Identity Provider was not
3656 // created/updated successfully. The error message is in the description field.
3657 Code string `json:"code,omitempty"`
3658 // Description: A human-readable description of the current state or returned
3659 // error.
3660 Description string `json:"description,omitempty"`
3661 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
3662 // include in API requests. By default, fields with empty or default values are
3663 // omitted from API requests. See
3664 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3665 // details.
3666 ForceSendFields []string `json:"-"`
3667 // NullFields is a list of field names (e.g. "Code") to include in API requests
3668 // with the JSON null value. By default, fields with empty values are omitted
3669 // from API requests. See
3670 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3671 NullFields []string `json:"-"`
3672 }
3673
3674 func (s WorkloadIdentityIdentityProviderStateDetail) MarshalJSON() ([]byte, error) {
3675 type NoMethod WorkloadIdentityIdentityProviderStateDetail
3676 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3677 }
3678
3679 // WorkloadIdentityState: **WorkloadIdentity**: The membership-specific state
3680 // for WorkloadIdentity feature.
3681 type WorkloadIdentityState struct {
3682 // Description: Deprecated, this field will be erased after code is changed to
3683 // use the new field.
3684 Description string `json:"description,omitempty"`
3685 // IdentityProviderStateDetails: The state of the Identity Providers
3686 // corresponding to the membership.
3687 IdentityProviderStateDetails map[string]WorkloadIdentityIdentityProviderStateDetail `json:"identityProviderStateDetails,omitempty"`
3688 // ForceSendFields is a list of field names (e.g. "Description") to
3689 // unconditionally include in API requests. By default, fields with empty or
3690 // default values are omitted from API requests. See
3691 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3692 // details.
3693 ForceSendFields []string `json:"-"`
3694 // NullFields is a list of field names (e.g. "Description") to include in API
3695 // requests with the JSON null value. By default, fields with empty values are
3696 // omitted from API requests. See
3697 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3698 NullFields []string `json:"-"`
3699 }
3700
3701 func (s WorkloadIdentityState) MarshalJSON() ([]byte, error) {
3702 type NoMethod WorkloadIdentityState
3703 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3704 }
3705
3706 type ProjectsLocationsGetCall struct {
3707 s *Service
3708 name string
3709 urlParams_ gensupport.URLParams
3710 ifNoneMatch_ string
3711 ctx_ context.Context
3712 header_ http.Header
3713 }
3714
3715 // Get: Gets information about a location.
3716 //
3717 // - name: Resource name for the location.
3718 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
3719 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3720 c.name = name
3721 return c
3722 }
3723
3724 // Fields allows partial responses to be retrieved. See
3725 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3726 // details.
3727 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
3728 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3729 return c
3730 }
3731
3732 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3733 // object's ETag matches the given value. This is useful for getting updates
3734 // only after the object has changed since the last request.
3735 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
3736 c.ifNoneMatch_ = entityTag
3737 return c
3738 }
3739
3740 // Context sets the context to be used in this call's Do method.
3741 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
3742 c.ctx_ = ctx
3743 return c
3744 }
3745
3746 // Header returns a http.Header that can be modified by the caller to add
3747 // headers to the request.
3748 func (c *ProjectsLocationsGetCall) Header() http.Header {
3749 if c.header_ == nil {
3750 c.header_ = make(http.Header)
3751 }
3752 return c.header_
3753 }
3754
3755 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
3756 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3757 if c.ifNoneMatch_ != "" {
3758 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3759 }
3760 c.urlParams_.Set("alt", alt)
3761 c.urlParams_.Set("prettyPrint", "false")
3762 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}")
3763 urls += "?" + c.urlParams_.Encode()
3764 req, err := http.NewRequest("GET", urls, nil)
3765 if err != nil {
3766 return nil, err
3767 }
3768 req.Header = reqHeaders
3769 googleapi.Expand(req.URL, map[string]string{
3770 "name": c.name,
3771 })
3772 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.get", "request", internallog.HTTPRequest(req, nil))
3773 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3774 }
3775
3776 // Do executes the "gkehub.projects.locations.get" call.
3777 // Any non-2xx status code is an error. Response headers are in either
3778 // *Location.ServerResponse.Header or (if a response was returned at all) in
3779 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3780 // whether the returned error was because http.StatusNotModified was returned.
3781 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
3782 gensupport.SetOptions(c.urlParams_, opts...)
3783 res, err := c.doRequest("json")
3784 if res != nil && res.StatusCode == http.StatusNotModified {
3785 if res.Body != nil {
3786 res.Body.Close()
3787 }
3788 return nil, gensupport.WrapError(&googleapi.Error{
3789 Code: res.StatusCode,
3790 Header: res.Header,
3791 })
3792 }
3793 if err != nil {
3794 return nil, err
3795 }
3796 defer googleapi.CloseBody(res)
3797 if err := googleapi.CheckResponse(res); err != nil {
3798 return nil, gensupport.WrapError(err)
3799 }
3800 ret := &Location{
3801 ServerResponse: googleapi.ServerResponse{
3802 Header: res.Header,
3803 HTTPStatusCode: res.StatusCode,
3804 },
3805 }
3806 target := &ret
3807 b, err := gensupport.DecodeResponseBytes(target, res)
3808 if err != nil {
3809 return nil, err
3810 }
3811 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.get", "response", internallog.HTTPResponse(res, b))
3812 return ret, nil
3813 }
3814
3815 type ProjectsLocationsListCall struct {
3816 s *Service
3817 name string
3818 urlParams_ gensupport.URLParams
3819 ifNoneMatch_ string
3820 ctx_ context.Context
3821 header_ http.Header
3822 }
3823
3824 // List: Lists information about the supported locations for this service. This
3825 // method lists locations based on the resource scope provided in the
3826 // [ListLocationsRequest.name] field: * **Global locations**: If `name` is
3827 // empty, the method lists the public locations available to all projects. *
3828 // **Project-specific locations**: If `name` follows the format
3829 // `projects/{project}`, the method lists locations visible to that specific
3830 // project. This includes public, private, or other project-specific locations
3831 // enabled for the project. For gRPC and client library implementations, the
3832 // resource name is passed as the `name` field. For direct service calls, the
3833 // resource name is incorporated into the request path based on the specific
3834 // service implementation and version.
3835 //
3836 // - name: The resource that owns the locations collection, if applicable.
3837 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
3838 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3839 c.name = name
3840 return c
3841 }
3842
3843 // ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not
3844 // use this field. It is unsupported and is ignored unless explicitly
3845 // documented otherwise. This is primarily for internal usage.
3846 func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall {
3847 c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...))
3848 return c
3849 }
3850
3851 // Filter sets the optional parameter "filter": A filter to narrow down results
3852 // to a preferred subset. The filtering language accepts strings like
3853 // "displayName=tokyo", and is documented in more detail in AIP-160
3854 // (https://google.aip.dev/160).
3855 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
3856 c.urlParams_.Set("filter", filter)
3857 return c
3858 }
3859
3860 // PageSize sets the optional parameter "pageSize": The maximum number of
3861 // results to return. If not set, the service selects a default.
3862 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
3863 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3864 return c
3865 }
3866
3867 // PageToken sets the optional parameter "pageToken": A page token received
3868 // from the `next_page_token` field in the response. Send that page token to
3869 // receive the subsequent page.
3870 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
3871 c.urlParams_.Set("pageToken", pageToken)
3872 return c
3873 }
3874
3875 // Fields allows partial responses to be retrieved. See
3876 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3877 // details.
3878 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
3879 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3880 return c
3881 }
3882
3883 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3884 // object's ETag matches the given value. This is useful for getting updates
3885 // only after the object has changed since the last request.
3886 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
3887 c.ifNoneMatch_ = entityTag
3888 return c
3889 }
3890
3891 // Context sets the context to be used in this call's Do method.
3892 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
3893 c.ctx_ = ctx
3894 return c
3895 }
3896
3897 // Header returns a http.Header that can be modified by the caller to add
3898 // headers to the request.
3899 func (c *ProjectsLocationsListCall) Header() http.Header {
3900 if c.header_ == nil {
3901 c.header_ = make(http.Header)
3902 }
3903 return c.header_
3904 }
3905
3906 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
3907 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3908 if c.ifNoneMatch_ != "" {
3909 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3910 }
3911 c.urlParams_.Set("alt", alt)
3912 c.urlParams_.Set("prettyPrint", "false")
3913 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}/locations")
3914 urls += "?" + c.urlParams_.Encode()
3915 req, err := http.NewRequest("GET", urls, nil)
3916 if err != nil {
3917 return nil, err
3918 }
3919 req.Header = reqHeaders
3920 googleapi.Expand(req.URL, map[string]string{
3921 "name": c.name,
3922 })
3923 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.list", "request", internallog.HTTPRequest(req, nil))
3924 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3925 }
3926
3927 // Do executes the "gkehub.projects.locations.list" call.
3928 // Any non-2xx status code is an error. Response headers are in either
3929 // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
3930 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3931 // check whether the returned error was because http.StatusNotModified was
3932 // returned.
3933 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
3934 gensupport.SetOptions(c.urlParams_, opts...)
3935 res, err := c.doRequest("json")
3936 if res != nil && res.StatusCode == http.StatusNotModified {
3937 if res.Body != nil {
3938 res.Body.Close()
3939 }
3940 return nil, gensupport.WrapError(&googleapi.Error{
3941 Code: res.StatusCode,
3942 Header: res.Header,
3943 })
3944 }
3945 if err != nil {
3946 return nil, err
3947 }
3948 defer googleapi.CloseBody(res)
3949 if err := googleapi.CheckResponse(res); err != nil {
3950 return nil, gensupport.WrapError(err)
3951 }
3952 ret := &ListLocationsResponse{
3953 ServerResponse: googleapi.ServerResponse{
3954 Header: res.Header,
3955 HTTPStatusCode: res.StatusCode,
3956 },
3957 }
3958 target := &ret
3959 b, err := gensupport.DecodeResponseBytes(target, res)
3960 if err != nil {
3961 return nil, err
3962 }
3963 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.list", "response", internallog.HTTPResponse(res, b))
3964 return ret, nil
3965 }
3966
3967 // Pages invokes f for each page of results.
3968 // A non-nil error returned from f will halt the iteration.
3969 // The provided context supersedes any context provided to the Context method.
3970 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
3971 c.ctx_ = ctx
3972 defer c.PageToken(c.urlParams_.Get("pageToken"))
3973 for {
3974 x, err := c.Do()
3975 if err != nil {
3976 return err
3977 }
3978 if err := f(x); err != nil {
3979 return err
3980 }
3981 if x.NextPageToken == "" {
3982 return nil
3983 }
3984 c.PageToken(x.NextPageToken)
3985 }
3986 }
3987
3988 type ProjectsLocationsMembershipsFeaturesCreateCall struct {
3989 s *Service
3990 parent string
3991 membershipfeature *MembershipFeature
3992 urlParams_ gensupport.URLParams
3993 ctx_ context.Context
3994 header_ http.Header
3995 }
3996
3997 // Create: Creates membershipFeature under a given parent.
3998 //
3999 // - parent: The name of parent where the MembershipFeature will be created.
4000 // Specified in the format `projects/*/locations/*/memberships/*`.
4001 func (r *ProjectsLocationsMembershipsFeaturesService) Create(parent string, membershipfeature *MembershipFeature) *ProjectsLocationsMembershipsFeaturesCreateCall {
4002 c := &ProjectsLocationsMembershipsFeaturesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4003 c.parent = parent
4004 c.membershipfeature = membershipfeature
4005 return c
4006 }
4007
4008 // FeatureId sets the optional parameter "featureId": Required. The ID of the
4009 // membership_feature to create.
4010 func (c *ProjectsLocationsMembershipsFeaturesCreateCall) FeatureId(featureId string) *ProjectsLocationsMembershipsFeaturesCreateCall {
4011 c.urlParams_.Set("featureId", featureId)
4012 return c
4013 }
4014
4015 // RequestId sets the optional parameter "requestId": Idempotent request UUID.
4016 func (c *ProjectsLocationsMembershipsFeaturesCreateCall) RequestId(requestId string) *ProjectsLocationsMembershipsFeaturesCreateCall {
4017 c.urlParams_.Set("requestId", requestId)
4018 return c
4019 }
4020
4021 // Fields allows partial responses to be retrieved. See
4022 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4023 // details.
4024 func (c *ProjectsLocationsMembershipsFeaturesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsFeaturesCreateCall {
4025 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4026 return c
4027 }
4028
4029 // Context sets the context to be used in this call's Do method.
4030 func (c *ProjectsLocationsMembershipsFeaturesCreateCall) Context(ctx context.Context) *ProjectsLocationsMembershipsFeaturesCreateCall {
4031 c.ctx_ = ctx
4032 return c
4033 }
4034
4035 // Header returns a http.Header that can be modified by the caller to add
4036 // headers to the request.
4037 func (c *ProjectsLocationsMembershipsFeaturesCreateCall) Header() http.Header {
4038 if c.header_ == nil {
4039 c.header_ = make(http.Header)
4040 }
4041 return c.header_
4042 }
4043
4044 func (c *ProjectsLocationsMembershipsFeaturesCreateCall) doRequest(alt string) (*http.Response, error) {
4045 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4046 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.membershipfeature)
4047 if err != nil {
4048 return nil, err
4049 }
4050 c.urlParams_.Set("alt", alt)
4051 c.urlParams_.Set("prettyPrint", "false")
4052 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/features")
4053 urls += "?" + c.urlParams_.Encode()
4054 req, err := http.NewRequest("POST", urls, body)
4055 if err != nil {
4056 return nil, err
4057 }
4058 req.Header = reqHeaders
4059 googleapi.Expand(req.URL, map[string]string{
4060 "parent": c.parent,
4061 })
4062 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.features.create", "request", internallog.HTTPRequest(req, body.Bytes()))
4063 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4064 }
4065
4066 // Do executes the "gkehub.projects.locations.memberships.features.create" call.
4067 // Any non-2xx status code is an error. Response headers are in either
4068 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4069 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4070 // whether the returned error was because http.StatusNotModified was returned.
4071 func (c *ProjectsLocationsMembershipsFeaturesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4072 gensupport.SetOptions(c.urlParams_, opts...)
4073 res, err := c.doRequest("json")
4074 if res != nil && res.StatusCode == http.StatusNotModified {
4075 if res.Body != nil {
4076 res.Body.Close()
4077 }
4078 return nil, gensupport.WrapError(&googleapi.Error{
4079 Code: res.StatusCode,
4080 Header: res.Header,
4081 })
4082 }
4083 if err != nil {
4084 return nil, err
4085 }
4086 defer googleapi.CloseBody(res)
4087 if err := googleapi.CheckResponse(res); err != nil {
4088 return nil, gensupport.WrapError(err)
4089 }
4090 ret := &Operation{
4091 ServerResponse: googleapi.ServerResponse{
4092 Header: res.Header,
4093 HTTPStatusCode: res.StatusCode,
4094 },
4095 }
4096 target := &ret
4097 b, err := gensupport.DecodeResponseBytes(target, res)
4098 if err != nil {
4099 return nil, err
4100 }
4101 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.features.create", "response", internallog.HTTPResponse(res, b))
4102 return ret, nil
4103 }
4104
4105 type ProjectsLocationsMembershipsFeaturesDeleteCall struct {
4106 s *Service
4107 name string
4108 urlParams_ gensupport.URLParams
4109 ctx_ context.Context
4110 header_ http.Header
4111 }
4112
4113 // Delete: Removes a membershipFeature.
4114 //
4115 // - name: The name of the membershipFeature to be deleted. Specified in the
4116 // format `projects/*/locations/*/memberships/*/features/*`.
4117 func (r *ProjectsLocationsMembershipsFeaturesService) Delete(name string) *ProjectsLocationsMembershipsFeaturesDeleteCall {
4118 c := &ProjectsLocationsMembershipsFeaturesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4119 c.name = name
4120 return c
4121 }
4122
4123 // RequestId sets the optional parameter "requestId": Idempotent request UUID.
4124 func (c *ProjectsLocationsMembershipsFeaturesDeleteCall) RequestId(requestId string) *ProjectsLocationsMembershipsFeaturesDeleteCall {
4125 c.urlParams_.Set("requestId", requestId)
4126 return c
4127 }
4128
4129 // Fields allows partial responses to be retrieved. See
4130 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4131 // details.
4132 func (c *ProjectsLocationsMembershipsFeaturesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsFeaturesDeleteCall {
4133 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4134 return c
4135 }
4136
4137 // Context sets the context to be used in this call's Do method.
4138 func (c *ProjectsLocationsMembershipsFeaturesDeleteCall) Context(ctx context.Context) *ProjectsLocationsMembershipsFeaturesDeleteCall {
4139 c.ctx_ = ctx
4140 return c
4141 }
4142
4143 // Header returns a http.Header that can be modified by the caller to add
4144 // headers to the request.
4145 func (c *ProjectsLocationsMembershipsFeaturesDeleteCall) Header() http.Header {
4146 if c.header_ == nil {
4147 c.header_ = make(http.Header)
4148 }
4149 return c.header_
4150 }
4151
4152 func (c *ProjectsLocationsMembershipsFeaturesDeleteCall) doRequest(alt string) (*http.Response, error) {
4153 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4154 c.urlParams_.Set("alt", alt)
4155 c.urlParams_.Set("prettyPrint", "false")
4156 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}")
4157 urls += "?" + c.urlParams_.Encode()
4158 req, err := http.NewRequest("DELETE", urls, nil)
4159 if err != nil {
4160 return nil, err
4161 }
4162 req.Header = reqHeaders
4163 googleapi.Expand(req.URL, map[string]string{
4164 "name": c.name,
4165 })
4166 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.features.delete", "request", internallog.HTTPRequest(req, nil))
4167 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4168 }
4169
4170 // Do executes the "gkehub.projects.locations.memberships.features.delete" call.
4171 // Any non-2xx status code is an error. Response headers are in either
4172 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4173 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4174 // whether the returned error was because http.StatusNotModified was returned.
4175 func (c *ProjectsLocationsMembershipsFeaturesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4176 gensupport.SetOptions(c.urlParams_, opts...)
4177 res, err := c.doRequest("json")
4178 if res != nil && res.StatusCode == http.StatusNotModified {
4179 if res.Body != nil {
4180 res.Body.Close()
4181 }
4182 return nil, gensupport.WrapError(&googleapi.Error{
4183 Code: res.StatusCode,
4184 Header: res.Header,
4185 })
4186 }
4187 if err != nil {
4188 return nil, err
4189 }
4190 defer googleapi.CloseBody(res)
4191 if err := googleapi.CheckResponse(res); err != nil {
4192 return nil, gensupport.WrapError(err)
4193 }
4194 ret := &Operation{
4195 ServerResponse: googleapi.ServerResponse{
4196 Header: res.Header,
4197 HTTPStatusCode: res.StatusCode,
4198 },
4199 }
4200 target := &ret
4201 b, err := gensupport.DecodeResponseBytes(target, res)
4202 if err != nil {
4203 return nil, err
4204 }
4205 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.features.delete", "response", internallog.HTTPResponse(res, b))
4206 return ret, nil
4207 }
4208
4209 type ProjectsLocationsMembershipsFeaturesGetCall struct {
4210 s *Service
4211 name string
4212 urlParams_ gensupport.URLParams
4213 ifNoneMatch_ string
4214 ctx_ context.Context
4215 header_ http.Header
4216 }
4217
4218 // Get: ========= MembershipFeature Services ========= Gets details of a
4219 // membershipFeature.
4220 //
4221 // - name: The MembershipFeature resource name in the format
4222 // `projects/*/locations/*/memberships/*/features/*`.
4223 func (r *ProjectsLocationsMembershipsFeaturesService) Get(name string) *ProjectsLocationsMembershipsFeaturesGetCall {
4224 c := &ProjectsLocationsMembershipsFeaturesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4225 c.name = name
4226 return c
4227 }
4228
4229 // Fields allows partial responses to be retrieved. See
4230 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4231 // details.
4232 func (c *ProjectsLocationsMembershipsFeaturesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsFeaturesGetCall {
4233 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4234 return c
4235 }
4236
4237 // IfNoneMatch sets an optional parameter which makes the operation fail if the
4238 // object's ETag matches the given value. This is useful for getting updates
4239 // only after the object has changed since the last request.
4240 func (c *ProjectsLocationsMembershipsFeaturesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsFeaturesGetCall {
4241 c.ifNoneMatch_ = entityTag
4242 return c
4243 }
4244
4245 // Context sets the context to be used in this call's Do method.
4246 func (c *ProjectsLocationsMembershipsFeaturesGetCall) Context(ctx context.Context) *ProjectsLocationsMembershipsFeaturesGetCall {
4247 c.ctx_ = ctx
4248 return c
4249 }
4250
4251 // Header returns a http.Header that can be modified by the caller to add
4252 // headers to the request.
4253 func (c *ProjectsLocationsMembershipsFeaturesGetCall) Header() http.Header {
4254 if c.header_ == nil {
4255 c.header_ = make(http.Header)
4256 }
4257 return c.header_
4258 }
4259
4260 func (c *ProjectsLocationsMembershipsFeaturesGetCall) doRequest(alt string) (*http.Response, error) {
4261 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4262 if c.ifNoneMatch_ != "" {
4263 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4264 }
4265 c.urlParams_.Set("alt", alt)
4266 c.urlParams_.Set("prettyPrint", "false")
4267 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}")
4268 urls += "?" + c.urlParams_.Encode()
4269 req, err := http.NewRequest("GET", urls, nil)
4270 if err != nil {
4271 return nil, err
4272 }
4273 req.Header = reqHeaders
4274 googleapi.Expand(req.URL, map[string]string{
4275 "name": c.name,
4276 })
4277 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.features.get", "request", internallog.HTTPRequest(req, nil))
4278 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4279 }
4280
4281 // Do executes the "gkehub.projects.locations.memberships.features.get" call.
4282 // Any non-2xx status code is an error. Response headers are in either
4283 // *MembershipFeature.ServerResponse.Header or (if a response was returned at
4284 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4285 // check whether the returned error was because http.StatusNotModified was
4286 // returned.
4287 func (c *ProjectsLocationsMembershipsFeaturesGetCall) Do(opts ...googleapi.CallOption) (*MembershipFeature, error) {
4288 gensupport.SetOptions(c.urlParams_, opts...)
4289 res, err := c.doRequest("json")
4290 if res != nil && res.StatusCode == http.StatusNotModified {
4291 if res.Body != nil {
4292 res.Body.Close()
4293 }
4294 return nil, gensupport.WrapError(&googleapi.Error{
4295 Code: res.StatusCode,
4296 Header: res.Header,
4297 })
4298 }
4299 if err != nil {
4300 return nil, err
4301 }
4302 defer googleapi.CloseBody(res)
4303 if err := googleapi.CheckResponse(res); err != nil {
4304 return nil, gensupport.WrapError(err)
4305 }
4306 ret := &MembershipFeature{
4307 ServerResponse: googleapi.ServerResponse{
4308 Header: res.Header,
4309 HTTPStatusCode: res.StatusCode,
4310 },
4311 }
4312 target := &ret
4313 b, err := gensupport.DecodeResponseBytes(target, res)
4314 if err != nil {
4315 return nil, err
4316 }
4317 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.features.get", "response", internallog.HTTPResponse(res, b))
4318 return ret, nil
4319 }
4320
4321 type ProjectsLocationsMembershipsFeaturesListCall struct {
4322 s *Service
4323 parent string
4324 urlParams_ gensupport.URLParams
4325 ifNoneMatch_ string
4326 ctx_ context.Context
4327 header_ http.Header
4328 }
4329
4330 // List: Lists MembershipFeatures in a given project and location.
4331 //
4332 // - parent: The parent where the MembershipFeature will be listed. In the
4333 // format: `projects/*/locations/*/memberships/*`.
4334 func (r *ProjectsLocationsMembershipsFeaturesService) List(parent string) *ProjectsLocationsMembershipsFeaturesListCall {
4335 c := &ProjectsLocationsMembershipsFeaturesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4336 c.parent = parent
4337 return c
4338 }
4339
4340 // Filter sets the optional parameter "filter": Lists MembershipFeatures that
4341 // match the filter expression, following the syntax outlined in
4342 // https://google.aip.dev/160. Examples: - Feature with the name "helloworld"
4343 // in project "foo-proj" and membership "member-bar": name =
4344 // "projects/foo-proj/locations/global/memberships/member-bar/features/helloworl
4345 // d" - Features that have a label called `foo`: labels.foo:* - Features that
4346 // have a label called `foo` whose value is `bar`: labels.foo = bar
4347 func (c *ProjectsLocationsMembershipsFeaturesListCall) Filter(filter string) *ProjectsLocationsMembershipsFeaturesListCall {
4348 c.urlParams_.Set("filter", filter)
4349 return c
4350 }
4351
4352 // OrderBy sets the optional parameter "orderBy": One or more fields to compare
4353 // and use to sort the output. See https://google.aip.dev/132#ordering.
4354 func (c *ProjectsLocationsMembershipsFeaturesListCall) OrderBy(orderBy string) *ProjectsLocationsMembershipsFeaturesListCall {
4355 c.urlParams_.Set("orderBy", orderBy)
4356 return c
4357 }
4358
4359 // PageSize sets the optional parameter "pageSize": When requesting a 'page' of
4360 // resources, `page_size` specifies number of resources to return. If
4361 // unspecified or set to 0, all resources will be returned.
4362 func (c *ProjectsLocationsMembershipsFeaturesListCall) PageSize(pageSize int64) *ProjectsLocationsMembershipsFeaturesListCall {
4363 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4364 return c
4365 }
4366
4367 // PageToken sets the optional parameter "pageToken": Token returned by
4368 // previous call to `ListFeatures` which specifies the position in the list
4369 // from where to continue listing the resources.
4370 func (c *ProjectsLocationsMembershipsFeaturesListCall) PageToken(pageToken string) *ProjectsLocationsMembershipsFeaturesListCall {
4371 c.urlParams_.Set("pageToken", pageToken)
4372 return c
4373 }
4374
4375 // Fields allows partial responses to be retrieved. See
4376 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4377 // details.
4378 func (c *ProjectsLocationsMembershipsFeaturesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsFeaturesListCall {
4379 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4380 return c
4381 }
4382
4383 // IfNoneMatch sets an optional parameter which makes the operation fail if the
4384 // object's ETag matches the given value. This is useful for getting updates
4385 // only after the object has changed since the last request.
4386 func (c *ProjectsLocationsMembershipsFeaturesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsFeaturesListCall {
4387 c.ifNoneMatch_ = entityTag
4388 return c
4389 }
4390
4391 // Context sets the context to be used in this call's Do method.
4392 func (c *ProjectsLocationsMembershipsFeaturesListCall) Context(ctx context.Context) *ProjectsLocationsMembershipsFeaturesListCall {
4393 c.ctx_ = ctx
4394 return c
4395 }
4396
4397 // Header returns a http.Header that can be modified by the caller to add
4398 // headers to the request.
4399 func (c *ProjectsLocationsMembershipsFeaturesListCall) Header() http.Header {
4400 if c.header_ == nil {
4401 c.header_ = make(http.Header)
4402 }
4403 return c.header_
4404 }
4405
4406 func (c *ProjectsLocationsMembershipsFeaturesListCall) doRequest(alt string) (*http.Response, error) {
4407 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4408 if c.ifNoneMatch_ != "" {
4409 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4410 }
4411 c.urlParams_.Set("alt", alt)
4412 c.urlParams_.Set("prettyPrint", "false")
4413 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/features")
4414 urls += "?" + c.urlParams_.Encode()
4415 req, err := http.NewRequest("GET", urls, nil)
4416 if err != nil {
4417 return nil, err
4418 }
4419 req.Header = reqHeaders
4420 googleapi.Expand(req.URL, map[string]string{
4421 "parent": c.parent,
4422 })
4423 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.features.list", "request", internallog.HTTPRequest(req, nil))
4424 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4425 }
4426
4427 // Do executes the "gkehub.projects.locations.memberships.features.list" call.
4428 // Any non-2xx status code is an error. Response headers are in either
4429 // *ListMembershipFeaturesResponse.ServerResponse.Header or (if a response was
4430 // returned at all) in error.(*googleapi.Error).Header. Use
4431 // googleapi.IsNotModified to check whether the returned error was because
4432 // http.StatusNotModified was returned.
4433 func (c *ProjectsLocationsMembershipsFeaturesListCall) Do(opts ...googleapi.CallOption) (*ListMembershipFeaturesResponse, error) {
4434 gensupport.SetOptions(c.urlParams_, opts...)
4435 res, err := c.doRequest("json")
4436 if res != nil && res.StatusCode == http.StatusNotModified {
4437 if res.Body != nil {
4438 res.Body.Close()
4439 }
4440 return nil, gensupport.WrapError(&googleapi.Error{
4441 Code: res.StatusCode,
4442 Header: res.Header,
4443 })
4444 }
4445 if err != nil {
4446 return nil, err
4447 }
4448 defer googleapi.CloseBody(res)
4449 if err := googleapi.CheckResponse(res); err != nil {
4450 return nil, gensupport.WrapError(err)
4451 }
4452 ret := &ListMembershipFeaturesResponse{
4453 ServerResponse: googleapi.ServerResponse{
4454 Header: res.Header,
4455 HTTPStatusCode: res.StatusCode,
4456 },
4457 }
4458 target := &ret
4459 b, err := gensupport.DecodeResponseBytes(target, res)
4460 if err != nil {
4461 return nil, err
4462 }
4463 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.features.list", "response", internallog.HTTPResponse(res, b))
4464 return ret, nil
4465 }
4466
4467 // Pages invokes f for each page of results.
4468 // A non-nil error returned from f will halt the iteration.
4469 // The provided context supersedes any context provided to the Context method.
4470 func (c *ProjectsLocationsMembershipsFeaturesListCall) Pages(ctx context.Context, f func(*ListMembershipFeaturesResponse) error) error {
4471 c.ctx_ = ctx
4472 defer c.PageToken(c.urlParams_.Get("pageToken"))
4473 for {
4474 x, err := c.Do()
4475 if err != nil {
4476 return err
4477 }
4478 if err := f(x); err != nil {
4479 return err
4480 }
4481 if x.NextPageToken == "" {
4482 return nil
4483 }
4484 c.PageToken(x.NextPageToken)
4485 }
4486 }
4487
4488 type ProjectsLocationsMembershipsFeaturesPatchCall struct {
4489 s *Service
4490 nameid string
4491 membershipfeature *MembershipFeature
4492 urlParams_ gensupport.URLParams
4493 ctx_ context.Context
4494 header_ http.Header
4495 }
4496
4497 // Patch: Updates an existing MembershipFeature.
4498 //
4499 // - name: Output only. The resource name of the membershipFeature, in the
4500 // format:
4501 // `projects/{project}/locations/{location}/memberships/{membership}/features/
4502 // {feature}`. Note that `membershipFeatures` is shortened to `features` in
4503 // the resource name. (see http://go/aip/122#collection-identifiers).
4504 func (r *ProjectsLocationsMembershipsFeaturesService) Patch(nameid string, membershipfeature *MembershipFeature) *ProjectsLocationsMembershipsFeaturesPatchCall {
4505 c := &ProjectsLocationsMembershipsFeaturesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4506 c.nameid = nameid
4507 c.membershipfeature = membershipfeature
4508 return c
4509 }
4510
4511 // AllowMissing sets the optional parameter "allowMissing": If set to true, and
4512 // the MembershipFeature is not found, a new MembershipFeature will be created.
4513 // In this situation, `update_mask` is ignored.
4514 func (c *ProjectsLocationsMembershipsFeaturesPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsMembershipsFeaturesPatchCall {
4515 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
4516 return c
4517 }
4518
4519 // RequestId sets the optional parameter "requestId": Idempotent request UUID.
4520 func (c *ProjectsLocationsMembershipsFeaturesPatchCall) RequestId(requestId string) *ProjectsLocationsMembershipsFeaturesPatchCall {
4521 c.urlParams_.Set("requestId", requestId)
4522 return c
4523 }
4524
4525 // UpdateMask sets the optional parameter "updateMask": Required. Mask of
4526 // fields to update.
4527 func (c *ProjectsLocationsMembershipsFeaturesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMembershipsFeaturesPatchCall {
4528 c.urlParams_.Set("updateMask", updateMask)
4529 return c
4530 }
4531
4532 // Fields allows partial responses to be retrieved. See
4533 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4534 // details.
4535 func (c *ProjectsLocationsMembershipsFeaturesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsFeaturesPatchCall {
4536 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4537 return c
4538 }
4539
4540 // Context sets the context to be used in this call's Do method.
4541 func (c *ProjectsLocationsMembershipsFeaturesPatchCall) Context(ctx context.Context) *ProjectsLocationsMembershipsFeaturesPatchCall {
4542 c.ctx_ = ctx
4543 return c
4544 }
4545
4546 // Header returns a http.Header that can be modified by the caller to add
4547 // headers to the request.
4548 func (c *ProjectsLocationsMembershipsFeaturesPatchCall) Header() http.Header {
4549 if c.header_ == nil {
4550 c.header_ = make(http.Header)
4551 }
4552 return c.header_
4553 }
4554
4555 func (c *ProjectsLocationsMembershipsFeaturesPatchCall) doRequest(alt string) (*http.Response, error) {
4556 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4557 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.membershipfeature)
4558 if err != nil {
4559 return nil, err
4560 }
4561 c.urlParams_.Set("alt", alt)
4562 c.urlParams_.Set("prettyPrint", "false")
4563 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}")
4564 urls += "?" + c.urlParams_.Encode()
4565 req, err := http.NewRequest("PATCH", urls, body)
4566 if err != nil {
4567 return nil, err
4568 }
4569 req.Header = reqHeaders
4570 googleapi.Expand(req.URL, map[string]string{
4571 "name": c.nameid,
4572 })
4573 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.features.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
4574 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4575 }
4576
4577 // Do executes the "gkehub.projects.locations.memberships.features.patch" call.
4578 // Any non-2xx status code is an error. Response headers are in either
4579 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4580 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4581 // whether the returned error was because http.StatusNotModified was returned.
4582 func (c *ProjectsLocationsMembershipsFeaturesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4583 gensupport.SetOptions(c.urlParams_, opts...)
4584 res, err := c.doRequest("json")
4585 if res != nil && res.StatusCode == http.StatusNotModified {
4586 if res.Body != nil {
4587 res.Body.Close()
4588 }
4589 return nil, gensupport.WrapError(&googleapi.Error{
4590 Code: res.StatusCode,
4591 Header: res.Header,
4592 })
4593 }
4594 if err != nil {
4595 return nil, err
4596 }
4597 defer googleapi.CloseBody(res)
4598 if err := googleapi.CheckResponse(res); err != nil {
4599 return nil, gensupport.WrapError(err)
4600 }
4601 ret := &Operation{
4602 ServerResponse: googleapi.ServerResponse{
4603 Header: res.Header,
4604 HTTPStatusCode: res.StatusCode,
4605 },
4606 }
4607 target := &ret
4608 b, err := gensupport.DecodeResponseBytes(target, res)
4609 if err != nil {
4610 return nil, err
4611 }
4612 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.memberships.features.patch", "response", internallog.HTTPResponse(res, b))
4613 return ret, nil
4614 }
4615
4616 type ProjectsLocationsOperationsCancelCall struct {
4617 s *Service
4618 name string
4619 canceloperationrequest *CancelOperationRequest
4620 urlParams_ gensupport.URLParams
4621 ctx_ context.Context
4622 header_ http.Header
4623 }
4624
4625 // Cancel: Starts asynchronous cancellation on a long-running operation. The
4626 // server makes a best effort to cancel the operation, but success is not
4627 // guaranteed. If the server doesn't support this method, it returns
4628 // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
4629 // other methods to check whether the cancellation succeeded or whether the
4630 // operation completed despite cancellation. On successful cancellation, the
4631 // operation is not deleted; instead, it becomes an operation with an
4632 // Operation.error value with a google.rpc.Status.code of `1`, corresponding to
4633 // `Code.CANCELLED`.
4634 //
4635 // - name: The name of the operation resource to be cancelled.
4636 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
4637 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4638 c.name = name
4639 c.canceloperationrequest = canceloperationrequest
4640 return c
4641 }
4642
4643 // Fields allows partial responses to be retrieved. See
4644 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4645 // details.
4646 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
4647 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4648 return c
4649 }
4650
4651 // Context sets the context to be used in this call's Do method.
4652 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
4653 c.ctx_ = ctx
4654 return c
4655 }
4656
4657 // Header returns a http.Header that can be modified by the caller to add
4658 // headers to the request.
4659 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
4660 if c.header_ == nil {
4661 c.header_ = make(http.Header)
4662 }
4663 return c.header_
4664 }
4665
4666 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
4667 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4668 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.canceloperationrequest)
4669 if err != nil {
4670 return nil, err
4671 }
4672 c.urlParams_.Set("alt", alt)
4673 c.urlParams_.Set("prettyPrint", "false")
4674 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}:cancel")
4675 urls += "?" + c.urlParams_.Encode()
4676 req, err := http.NewRequest("POST", urls, body)
4677 if err != nil {
4678 return nil, err
4679 }
4680 req.Header = reqHeaders
4681 googleapi.Expand(req.URL, map[string]string{
4682 "name": c.name,
4683 })
4684 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.cancel", "request", internallog.HTTPRequest(req, body.Bytes()))
4685 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4686 }
4687
4688 // Do executes the "gkehub.projects.locations.operations.cancel" call.
4689 // Any non-2xx status code is an error. Response headers are in either
4690 // *Empty.ServerResponse.Header or (if a response was returned at all) in
4691 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4692 // whether the returned error was because http.StatusNotModified was returned.
4693 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4694 gensupport.SetOptions(c.urlParams_, opts...)
4695 res, err := c.doRequest("json")
4696 if res != nil && res.StatusCode == http.StatusNotModified {
4697 if res.Body != nil {
4698 res.Body.Close()
4699 }
4700 return nil, gensupport.WrapError(&googleapi.Error{
4701 Code: res.StatusCode,
4702 Header: res.Header,
4703 })
4704 }
4705 if err != nil {
4706 return nil, err
4707 }
4708 defer googleapi.CloseBody(res)
4709 if err := googleapi.CheckResponse(res); err != nil {
4710 return nil, gensupport.WrapError(err)
4711 }
4712 ret := &Empty{
4713 ServerResponse: googleapi.ServerResponse{
4714 Header: res.Header,
4715 HTTPStatusCode: res.StatusCode,
4716 },
4717 }
4718 target := &ret
4719 b, err := gensupport.DecodeResponseBytes(target, res)
4720 if err != nil {
4721 return nil, err
4722 }
4723 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.cancel", "response", internallog.HTTPResponse(res, b))
4724 return ret, nil
4725 }
4726
4727 type ProjectsLocationsOperationsGetCall struct {
4728 s *Service
4729 name string
4730 urlParams_ gensupport.URLParams
4731 ifNoneMatch_ string
4732 ctx_ context.Context
4733 header_ http.Header
4734 }
4735
4736 // Get: Gets the latest state of a long-running operation. Clients can use this
4737 // method to poll the operation result at intervals as recommended by the API
4738 // service.
4739 //
4740 // - name: The name of the operation resource.
4741 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
4742 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4743 c.name = name
4744 return c
4745 }
4746
4747 // Fields allows partial responses to be retrieved. See
4748 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4749 // details.
4750 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
4751 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4752 return c
4753 }
4754
4755 // IfNoneMatch sets an optional parameter which makes the operation fail if the
4756 // object's ETag matches the given value. This is useful for getting updates
4757 // only after the object has changed since the last request.
4758 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
4759 c.ifNoneMatch_ = entityTag
4760 return c
4761 }
4762
4763 // Context sets the context to be used in this call's Do method.
4764 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
4765 c.ctx_ = ctx
4766 return c
4767 }
4768
4769 // Header returns a http.Header that can be modified by the caller to add
4770 // headers to the request.
4771 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
4772 if c.header_ == nil {
4773 c.header_ = make(http.Header)
4774 }
4775 return c.header_
4776 }
4777
4778 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
4779 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4780 if c.ifNoneMatch_ != "" {
4781 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4782 }
4783 c.urlParams_.Set("alt", alt)
4784 c.urlParams_.Set("prettyPrint", "false")
4785 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}")
4786 urls += "?" + c.urlParams_.Encode()
4787 req, err := http.NewRequest("GET", urls, nil)
4788 if err != nil {
4789 return nil, err
4790 }
4791 req.Header = reqHeaders
4792 googleapi.Expand(req.URL, map[string]string{
4793 "name": c.name,
4794 })
4795 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.get", "request", internallog.HTTPRequest(req, nil))
4796 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4797 }
4798
4799 // Do executes the "gkehub.projects.locations.operations.get" call.
4800 // Any non-2xx status code is an error. Response headers are in either
4801 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4802 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4803 // whether the returned error was because http.StatusNotModified was returned.
4804 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4805 gensupport.SetOptions(c.urlParams_, opts...)
4806 res, err := c.doRequest("json")
4807 if res != nil && res.StatusCode == http.StatusNotModified {
4808 if res.Body != nil {
4809 res.Body.Close()
4810 }
4811 return nil, gensupport.WrapError(&googleapi.Error{
4812 Code: res.StatusCode,
4813 Header: res.Header,
4814 })
4815 }
4816 if err != nil {
4817 return nil, err
4818 }
4819 defer googleapi.CloseBody(res)
4820 if err := googleapi.CheckResponse(res); err != nil {
4821 return nil, gensupport.WrapError(err)
4822 }
4823 ret := &Operation{
4824 ServerResponse: googleapi.ServerResponse{
4825 Header: res.Header,
4826 HTTPStatusCode: res.StatusCode,
4827 },
4828 }
4829 target := &ret
4830 b, err := gensupport.DecodeResponseBytes(target, res)
4831 if err != nil {
4832 return nil, err
4833 }
4834 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.get", "response", internallog.HTTPResponse(res, b))
4835 return ret, nil
4836 }
4837
4838 type ProjectsLocationsOperationsListCall struct {
4839 s *Service
4840 name string
4841 urlParams_ gensupport.URLParams
4842 ifNoneMatch_ string
4843 ctx_ context.Context
4844 header_ http.Header
4845 }
4846
4847 // List: Lists operations that match the specified filter in the request. If
4848 // the server doesn't support this method, it returns `UNIMPLEMENTED`.
4849 //
4850 // - name: The name of the operation's parent resource.
4851 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
4852 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4853 c.name = name
4854 return c
4855 }
4856
4857 // Filter sets the optional parameter "filter": The standard list filter.
4858 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
4859 c.urlParams_.Set("filter", filter)
4860 return c
4861 }
4862
4863 // PageSize sets the optional parameter "pageSize": The standard list page
4864 // size.
4865 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
4866 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4867 return c
4868 }
4869
4870 // PageToken sets the optional parameter "pageToken": The standard list page
4871 // token.
4872 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
4873 c.urlParams_.Set("pageToken", pageToken)
4874 return c
4875 }
4876
4877 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess":
4878 // When set to `true`, operations that are reachable are returned as normal,
4879 // and those that are unreachable are returned in the
4880 // ListOperationsResponse.unreachable field. This can only be `true` when
4881 // reading across collections. For example, when `parent` is set to
4882 // "projects/example/locations/-". This field is not supported by default and
4883 // will result in an `UNIMPLEMENTED` error if set unless explicitly documented
4884 // otherwise in service or product specific documentation.
4885 func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall {
4886 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
4887 return c
4888 }
4889
4890 // Fields allows partial responses to be retrieved. See
4891 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4892 // details.
4893 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
4894 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4895 return c
4896 }
4897
4898 // IfNoneMatch sets an optional parameter which makes the operation fail if the
4899 // object's ETag matches the given value. This is useful for getting updates
4900 // only after the object has changed since the last request.
4901 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
4902 c.ifNoneMatch_ = entityTag
4903 return c
4904 }
4905
4906 // Context sets the context to be used in this call's Do method.
4907 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
4908 c.ctx_ = ctx
4909 return c
4910 }
4911
4912 // Header returns a http.Header that can be modified by the caller to add
4913 // headers to the request.
4914 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
4915 if c.header_ == nil {
4916 c.header_ = make(http.Header)
4917 }
4918 return c.header_
4919 }
4920
4921 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
4922 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4923 if c.ifNoneMatch_ != "" {
4924 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4925 }
4926 c.urlParams_.Set("alt", alt)
4927 c.urlParams_.Set("prettyPrint", "false")
4928 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}/operations")
4929 urls += "?" + c.urlParams_.Encode()
4930 req, err := http.NewRequest("GET", urls, nil)
4931 if err != nil {
4932 return nil, err
4933 }
4934 req.Header = reqHeaders
4935 googleapi.Expand(req.URL, map[string]string{
4936 "name": c.name,
4937 })
4938 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.list", "request", internallog.HTTPRequest(req, nil))
4939 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4940 }
4941
4942 // Do executes the "gkehub.projects.locations.operations.list" call.
4943 // Any non-2xx status code is an error. Response headers are in either
4944 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
4945 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4946 // check whether the returned error was because http.StatusNotModified was
4947 // returned.
4948 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
4949 gensupport.SetOptions(c.urlParams_, opts...)
4950 res, err := c.doRequest("json")
4951 if res != nil && res.StatusCode == http.StatusNotModified {
4952 if res.Body != nil {
4953 res.Body.Close()
4954 }
4955 return nil, gensupport.WrapError(&googleapi.Error{
4956 Code: res.StatusCode,
4957 Header: res.Header,
4958 })
4959 }
4960 if err != nil {
4961 return nil, err
4962 }
4963 defer googleapi.CloseBody(res)
4964 if err := googleapi.CheckResponse(res); err != nil {
4965 return nil, gensupport.WrapError(err)
4966 }
4967 ret := &ListOperationsResponse{
4968 ServerResponse: googleapi.ServerResponse{
4969 Header: res.Header,
4970 HTTPStatusCode: res.StatusCode,
4971 },
4972 }
4973 target := &ret
4974 b, err := gensupport.DecodeResponseBytes(target, res)
4975 if err != nil {
4976 return nil, err
4977 }
4978 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "gkehub.projects.locations.operations.list", "response", internallog.HTTPResponse(res, b))
4979 return ret, nil
4980 }
4981
4982 // Pages invokes f for each page of results.
4983 // A non-nil error returned from f will halt the iteration.
4984 // The provided context supersedes any context provided to the Context method.
4985 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
4986 c.ctx_ = ctx
4987 defer c.PageToken(c.urlParams_.Get("pageToken"))
4988 for {
4989 x, err := c.Do()
4990 if err != nil {
4991 return err
4992 }
4993 if err := f(x); err != nil {
4994 return err
4995 }
4996 if x.NextPageToken == "" {
4997 return nil
4998 }
4999 c.PageToken(x.NextPageToken)
5000 }
5001 }